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 === '选择责任工程师') {