From dc15b1e391e7f487292971994b8ef0af7e5927da Mon Sep 17 00:00:00 2001 From: zhangyichen <5277314+zacty@user.noreply.gitee.com> Date: Thu, 7 Apr 2022 15:36:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=2052218=20=E9=80=89?= =?UTF-8?q?=E4=BA=BA=E7=BB=84=E4=BB=B6=EF=BC=8C=E9=92=88=E5=AF=B9=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=A4=9A=E4=BA=BA=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E4=BA=BA=E5=91=98=E6=8C=89=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/roleTree/index.vue | 17 ++++++++++++++++- .../foreignStandardsAndRegulations/index.vue | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/roleTree/index.vue b/src/components/roleTree/index.vue index 52e99ada9..3b912a230 100644 --- a/src/components/roleTree/index.vue +++ b/src/components/roleTree/index.vue @@ -125,6 +125,7 @@ data () { return { visible: false, + selectList: [], nodeList2: [], delList: [], roleList: [], @@ -300,7 +301,21 @@ this.delList = [data] } } else { // 多选 - this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()) + if (this.roleList.length === 0) { + this.roleList.push(data) + } else { + let delFlag = true + this.roleList.forEach((item, index) => { + if (item.id === data.id) { + this.roleList.splice(index, 1) + delFlag = false + } + }) + if (delFlag) { + this.roleList.push(data) + } + } + // this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()) } }, loadNode(node, resolve) { diff --git a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue index 62fa258af..a6b77cbc1 100644 --- a/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue +++ b/src/pages/regulatoryRepository/foreignStandardsAndRegulations/index.vue @@ -2707,6 +2707,7 @@ export default { this.modalShowRoleFlag = true }, checkedRole2(data) { + console.log(data, '哈哈哈哈') let idList = '' let nameList = '' data.forEach(item => { @@ -2717,6 +2718,7 @@ export default { idList += item.id nameList += item.name }) + console.log(nameList , '额鹅鹅鹅饿') if (this.drawerTitle === '选择我司署名人') { this.sarStandardsInfoEO['WSSMR'] = nameList } else if (this.drawerTitle === '选择责任工程师') {