This commit is contained in:
zhutianqi
2021-11-21 15:33:04 +08:00
parent 16741310cf
commit f4e39d5ac2
+26 -6
View File
@@ -26,6 +26,7 @@
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
:class="treeClass"
@check-change="checkChange"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
@@ -116,15 +117,25 @@
}
},
methods: {
checkChange (row, type, c) {
if (!type) {
if (this.nodeList.length > 0) {
for (let a = 0; a < this.nodeList.length; a ++) {
if (row.id === this.nodeList[a]) {
this.nodeList.splice(a, 1)
}
}
}
}
},
treeClass () {
},
handleTreeDrawerCancel () {
this.filterText = ''
this.isVisible2 = false
},
saveUserInfo () {
if (this.nodeList.length) {
if (this.nodeList.length > 0) {
let ids = ''
this.nodeList.forEach(item => {
if (ids.length > 0) {
@@ -134,18 +145,27 @@
ids = item
}
})
let oldList = []
this.$http.get('SarInstitution/institution/getNextById', {
ids: ids
}, {
_this: this
}, res => {
oldList = res
let oldList2 = res.concat(this.roleList)
let result = []
let obj = {}
for(let i = 0; i < oldList2.length; i++){
if(!obj[oldList2[i].id]){
result.push(oldList2[i]);
obj[oldList2[i].id] = true;
}
}
this.isVisible2 = false
this.$emit('checkedRole', result)
})
} else {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
}
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
},
drawerCheck (data) {
if (this.checkBox) {