修改人员选择tree
This commit is contained in:
@@ -70,7 +70,8 @@
|
|||||||
show-checkbox
|
show-checkbox
|
||||||
ref="tree"
|
ref="tree"
|
||||||
:lazy="false"
|
:lazy="false"
|
||||||
:key="treeKey">
|
:key="treeKey"
|
||||||
|
>
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||||
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
|
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
|
||||||
<span> {{ node.label }} </span>
|
<span> {{ node.label }} </span>
|
||||||
@@ -159,7 +160,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose (tag) {
|
nameJoinAccount(treeData1){
|
||||||
|
treeData1.forEach(item=>{
|
||||||
|
if(item.account) item.name = `${item.name}(${item.account})`
|
||||||
|
if(item.children) this.nameJoinAccount(item.children)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleClose (tag) {
|
||||||
let arr = []
|
let arr = []
|
||||||
for (let a = 0; a < this.delList.length; a++) {
|
for (let a = 0; a < this.delList.length; a++) {
|
||||||
if (tag.id === this.delList[a].id) {
|
if (tag.id === this.delList[a].id) {
|
||||||
@@ -214,6 +221,7 @@
|
|||||||
this.treeData1.forEach(item => {
|
this.treeData1.forEach(item => {
|
||||||
this.defaultKey.push(item.id)
|
this.defaultKey.push(item.id)
|
||||||
})
|
})
|
||||||
|
this.nameJoinAccount(this.treeData1)
|
||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
})
|
})
|
||||||
// this.treeKey++
|
// this.treeKey++
|
||||||
@@ -333,7 +341,8 @@
|
|||||||
}
|
}
|
||||||
this.open1 = true
|
this.open1 = true
|
||||||
},
|
},
|
||||||
drawerCheck (data) {//当复选框被点击的时候触发
|
drawerCheck (data) {
|
||||||
|
//当复选框被点击的时候触发
|
||||||
//共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
|
//共两个参数,依次为:传递给 data 属性的数组中该节点所对应的对象、树目前的选中状态对象,包含 checkedNodes、checkedKeys、halfCheckedNodes、halfCheckedKeys 四个属性
|
||||||
if (this.checkBox) { // 单选
|
if (this.checkBox) { // 单选
|
||||||
// 单选判断
|
// 单选判断
|
||||||
|
|||||||
Reference in New Issue
Block a user