From 78a4160bc90898d9018a5bbd798bc3cb5b9509d5 Mon Sep 17 00:00:00 2001 From: yangzijiao Date: Wed, 21 Jul 2021 10:39:42 +0800 Subject: [PATCH 01/18] Merge branch 'develop-1' of D:\yuedi\laws-system-front-FOTON with conflicts. --- package-lock.json | 195 +++++++++++++++++++++------------------------- vue.config.js | 2 +- 2 files changed, 90 insertions(+), 107 deletions(-) diff --git a/package-lock.json b/package-lock.json index b81c194e8..3d1e87236 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3619,23 +3619,6 @@ "upath": "^1.1.1" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", - "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", - "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", - "dev": true, - "optional": true - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -4581,94 +4564,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.3.0", - "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.3.0.tgz", - "integrity": "sha1-LxleS6D7DiY1ltaDDfF9Gjbok2w=", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995651629&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", - "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.nlark.com/big.js/download/big.js-5.2.2.tgz", - "integrity": "sha1-ZfCvOC9Xi83HQr2cKB6cstd2gyg=", - "dev": true, - "optional": true - }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz", - "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/emojis-list/download/emojis-list-3.0.0.tgz", - "integrity": "sha1-VXBmIEatKeLpFucariYKvf9Pang=", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", - "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", - "dev": true, - "optional": true - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/json5/download/json5-2.2.0.tgz", - "integrity": "sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM=", - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz", - "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622293630895&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", - "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-style-loader": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", @@ -9313,7 +9208,7 @@ }, "image-size": { "version": "0.5.5", - "resolved": "https://registry.nlark.com/image-size/download/image-size-0.5.5.tgz", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", "dev": true, "optional": true @@ -13622,6 +13517,94 @@ "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz", "integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q==" }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.3.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.3.3.tgz", + "integrity": "sha512-/1GzCuQ6MRORbC+leKTKoTGtpQt60bYe0gDGEextSteA2OM+v201FPha5jzmjQzVhRcwieZeUvezAtG5a/e5cw==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "hash-sum": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", + "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "vue-router": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.0.tgz", diff --git a/vue.config.js b/vue.config.js index 40b40d896..dcab907a6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -86,7 +86,7 @@ module.exports = { } }, '/onlyOffice': { - target: 'http://172.20.10.2:8888', + target: 'http://10.96.10.171', changeOrigin: true, pathRewrite: { '^/onlyOffice': '/api' From 59fee2f22428631cd346cb86ac624fd1acf317ec Mon Sep 17 00:00:00 2001 From: yangzijiao Date: Wed, 21 Jul 2021 13:56:18 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=A0=87=E5=87=86=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E5=AD=97=E6=AE=B5=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/addEdit.vue | 1 - .../pages/otherAddEit.vue | 37 ++++++++++++++++--- .../pages/projectAddEit.vue | 34 +++++++++++++++-- 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue index 9a8810380..8b3390df2 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/addEdit.vue @@ -459,7 +459,6 @@ 下移 diff --git a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue index 28e717fee..213a15d12 100644 --- a/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue +++ b/src/pages/regulatoryRepository/accessStandardsAndRegulations/pages/otherAddEit.vue @@ -211,17 +211,26 @@ prop="issueTime" sortable label="发布日期"> + + + + + - + diff --git a/src/pages/details/otherStandardDetails/index.vue b/src/pages/details/otherStandardDetails/index.vue index e50a50927..0d47b1ac6 100644 --- a/src/pages/details/otherStandardDetails/index.vue +++ b/src/pages/details/otherStandardDetails/index.vue @@ -56,7 +56,7 @@

{{ sarStandardsInfoEO.issueTime || '-' }}

{{sarStandardsInfoEO.isRelateAccess ? (sarStandardsInfoEO.isRelateAccess === '1' ? '是' : '否') : '-'}}

-

{{ sarStandardsInfoEO.standSystemName || '-' }}

+

{{ sarStandardsInfoEO.standSystem || '-' }}

diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue index aa58f9b7b..5808ce1f2 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue @@ -122,12 +122,17 @@ - + + :nodeKey="nodeKey" @popoverHide="popoverHide"> - + + :nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"> - + + :nodeKey="nodeKeyCode" @popoverHide="popoverHideCarVs"> - + + :nodeKey="nodeKeyModel" @popoverHide="popoverHideModel"> { this.treeData = res.data @@ -1889,29 +1953,51 @@ this.fileMadel = true this.fileType = type; }, - popoverHide (checkedIds, checkedData) { + popoverHide (checkedIds, checkedData,isShow,isLoadChild,topId) { if(checkedData) { - this.form.standSystem = checkedData.id - this.form.standSystemName = checkedData.menuName + if(checkedData.length > 0){ + this.form.standSystem = checkedData.map(item => item.menuName).join(",") + }else { + this.form.standSystem = checkedData.menuName + } } + this.modalShowFlag1 = false }, - popoverHideBusVs (checkedIds, checkedData) { - if(checkedData){ - this.form.cycvppsbm = checkedData.code - this.form.cycvppscn = checkedData.chineseName + popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.cycvppsbm = checkedData.map(item => item.code).join(",") + this.form.cycvppscn = checkedData.map(item => item.chineseName).join(",") + }else { + this.form.cycvppsbm = checkedData.code + this.form.cycvppscn = checkedData.chineseName + } } + this.modalShowFlag2 = false }, - popoverHideCarVs (checkedIds, checkedData) { - if(checkedData){ - this.form.kccvppsbm = checkedData.code - this.form.kccvppscn = checkedData.chineseName + popoverHideCarVs (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.kccvppsbm = checkedData.map(item => item.code).join(",") + this.form.kccvppscn = checkedData.map(item => item.chineseName).join(",") + }else { + this.form.kccvppsbm = checkedData.code + this.form.kccvppscn = checkedData.chineseName + } } + this.modalShowFlag3 = false }, - popoverHideModel (checkedIds, checkedData) { - if(checkedData){ - this.form.dybxh = checkedData.model - this.form.dymc = checkedData.name + popoverHideModel (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.dybxh = checkedData.map(item => item.model).join(",") + this.form.dymc = checkedData.map(item => item.name).join(",") + }else { + this.form.dybxh = checkedData.model + this.form.dymc = checkedData.name + } } + this.modalShowFlag4 = false }, closeDrawer() { this.ListModel = false @@ -2006,6 +2092,14 @@ this.busVppsOptions = res.data }) }, + busVsChildFunc(id){ + this.$http.get('sarVppsTree/childByList', {id:id}, { + _this: this + }, res => { + this.busVppsChildOptions = [] + this.busVppsChildOptions = res.data + }) + }, modelFunc(){ this.$http.get('sarModelTree/list', '', { _this: this diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue index 9d3675641..3eb2cc962 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step2.vue @@ -119,13 +119,7 @@ - + - + - + - + - + - + - + - + - + + :nodeKey="nodeKey" @popoverHide="popoverHide"> - + + :nodeKey="nodeKeyCode" @popoverHide="popoverHideBusVs"> - + + :nodeKey="nodeKeyCode" @popoverHide="popoverHideCarVs"> - + + :nodeKey="nodeKeyModel" @popoverHide="popoverHideModel"> 0){ + this.form.standSystem = checkedData.map(item => item.menuName).join(",") + }else { + this.form.standSystem = checkedData.menuName + } } + this.modalShowFlag1 = false }, - popoverHideBusVs (checkedIds, checkedData) { - if(checkedData){ - this.form.cycvppsbm = checkedData.code - this.form.cycvppscn = checkedData.chineseName + popoverHideBusVs (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.cycvppsbm = checkedData.map(item => item.code).join(",") + this.form.cycvppscn = checkedData.map(item => item.chineseName).join(",") + }else { + this.form.cycvppsbm = checkedData.code + this.form.cycvppscn = checkedData.chineseName + } } + this.modalShowFlag2 = false }, - popoverHideCarVs (checkedIds, checkedData) { - if(checkedData){ - this.form.kccvppsbm = checkedData.code - this.form.kccvppscn = checkedData.chineseName + popoverHideCarVs (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.kccvppsbm = checkedData.map(item => item.code).join(",") + this.form.kccvppscn = checkedData.map(item => item.chineseName).join(",") + }else { + this.form.kccvppsbm = checkedData.code + this.form.kccvppscn = checkedData.chineseName + } } + this.modalShowFlag3 = false }, - popoverHideModel (checkedIds, checkedData) { - if(checkedData){ - this.form.dybxh = checkedData.model - this.form.dymc = checkedData.name + popoverHideModel (checkedIds, checkedData,isShow,isLoadChild,topId) { + if(checkedData) { + if(checkedData.length > 0){ + this.form.dybxh = checkedData.map(item => item.model).join(",") + this.form.dymc = checkedData.map(item => item.name).join(",") + }else { + this.form.dybxh = checkedData.model + this.form.dymc = checkedData.name + } } + this.modalShowFlag4 = false }, processTable () { this.$http.get('lawss/activiti/get_list_by_instance', { diff --git a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue index 230417fee..fd1aa542f 100644 --- a/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/domesticStandardsAndRegulations/index.vue @@ -267,6 +267,7 @@ :wrapperClosable="false" size="800px" @close="resetForm" + append-to-body >
@@ -397,11 +398,7 @@ class="add-form-item" > - + @@ -893,6 +967,60 @@ export default { }, data () { return { + props: { + label: 'menuName', + children: 'children' + }, + productModal: false, // 模态框是否打开 + modalType: '', + productTitle: '', // 模态框标题 + // 规范 + productRules: { + menuName: [ + {required: true, message: '一级菜单不能为空', trigger: 'blur'}, + {type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'} + ], + displaySeq: [ + {type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, + {type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'} + ], + remarks: [ + {type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'} + ], + dicTypeName: [ + {required: true, message: '选项不能为空', trigger: 'blur'}, + {type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'} + ], + showIndex: [ + {type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, + {type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'} + ], + describes: [ + {type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'} + ] + }, + productModelAdd: { + id : "", + sorDivide : "INLAND_STAND", + menuName : "", + parentId : null, + parentIds : null, + parentIdsName : "", + displaySeq : "", + validFlag : "", + creationTime : "", + modifyTime : "", + remarks : "", + children : [], + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: "" + }, + treeList: [], standId: '', visibleOrgTable: false, visibleShare: false, @@ -1423,6 +1551,183 @@ export default { } }, methods: { + closeModal () { + this.productModal = false + this.closeDrawer() + }, + // 提交新增/修改 + saveProduct (name) { + this.$refs[name].validate((valid) => { + if (valid) { + if (this.modalType === 1) { + this.$http.postData('sarResource/ts-resource/add', this.productModelAdd, { + _this: this + }, res => { + if (res.ok) { + this.selectMenuList() + this.productModal = false + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + } else { + this.productModal = true + } + }, e => {}) + } else if (this.modalType === 2) { + this.$http.putData('sarResource/ts-resource', this.productModelAdd, { + _this: this + }, res => { + this.selectMenuList() + this.productModal = false + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + }, e => { + }) + } + } else { + } + }) + }, + closeDrawer () { + this.$nextTick(() => { + this.$refs['productModelAdd'].resetFields() + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: this.$route.params.id + } + }) + this.productModal = false + }, + // 查询二级菜单 + selectMenuList () { + this.$http.get('sarResource/ts-resource', { + sorDivide: 'BUSINESS_STAND' + }, {}, res => { + if (res.ok) { + this.treeList = res.data + } + }) + }, + // 查询二级菜单 + selectChildMenu (row) { + this.$http.get('sarResource/ts-resource/getMenuById', { + menuId: row.id + }, {}, res => { + if (res.ok) { + if(this.modalType === 1){ + let idsName = "" + if(row.parentIds !== null){ + if(row.parentIds.indexOf(res.data.id) != -1){ + this.productModelAdd.parentIds = row.parentIds + }else { + this.productModelAdd.parentIds = row.parentIds + ',' + res.data.id + idsName = row.parentIdsName + ',' + res.data.menuName + } + }else { + this.productModelAdd.parentIds = res.data.id + idsName = res.data.menuName; + } + this.productModelAdd.parentId = res.data.id + this.productModelAdd.parentIdsName = idsName + this.$forceUpdate() + }else { + this.productModelAdd = res.data + } + } + }) + }, + update(data) { + this.modalType = 2 + this.selectChildMenu(data) + this.productModal = true + this.productTitle = '编辑信息' + // const newChild = { id: this.id++, label: 'testtest', children: [] }; + // if (!data.children) { + // this.$set(data, 'children', []); + // } + // data.children.push(newChild); + }, + + append(data) { + this.modalType = 1 + this.selectChildMenu(data) + this.productModal = true + this.productTitle = '新增下级菜单信息' + this.productModelAdd.dicTypeCode = '' + // const newChild = { id: this.id++, label: 'testtest', children: [] }; + // if (!data.children) { + // this.$set(data, 'children', []); + // } + // data.children.push(newChild); + }, + + remove(node, data) { + this.$confirm('是否删除菜单?', '提示', { + confirmButtonText: '确定', + confirmButtonClass: 'common-button-primary', + cancelButtonText: '取消', + roundButton: true, + type: 'warning' + }).then(() => { + this.$http.delete("sarResource/ts-resource", { + resourceId: data.id + }, res => { + }, e => { + if(e.ok){ + this.$message({ + type: 'success', + message: "删除成功" + }) + this.selectMenuList() + }else { + this.$message({ + type: 'warning', + message: e.message + }) + } + }) + }).catch(() => { + this.$refs.selections.clearSelection() + this.$message({ + type: 'info', + message: '已取消删除' + }) + }) + // const parent = node.parent; + // const children = parent.data.children || parent.data; + // const index = children.findIndex(d => d.id === data.id); + // children.splice(index, 1); + }, + // 树节点鼠标移入移出 + mouseenter(data){ + console.log(data) + this.$set(data, 'show', true) + if(data.parentId !== null){ + this.$set(data, 'showDel', true) + } + }, + mouseleave(data){ + this.$set(data, 'show', false) + this.$set(data, 'showDel', false) + }, /** * @description: 起草人名称展示 * @author: chenxiaoxi @@ -3147,7 +3452,7 @@ export default { mounted () { this.treeReload = true // 进入页面后查询树形结构目录 - this.selectMenu() + this.selectMenuList() // 查询各下拉框数据 this.$http.get('sys/dictype/getDicTypeListCode', '', { _this: this @@ -3194,7 +3499,7 @@ export default { height: 100%; //background: #fff; .tree-content { - width: 16%; + width: 20%; position: relative; /*height: 100%;*/ background: #fff;