修改禅道已知bug

This commit is contained in:
sunFlower
2022-09-30 22:15:11 +08:00
parent 41ed6e8d4f
commit 718cf9333a
@@ -42,12 +42,15 @@
isLeaf: 'leaf'
}"
:defaultCheckedKeys="defaultCheckedKeys"
:defaultExpandAll="defaultExpandAll"
:check-strictly="false"
node-key="id"
@check-change="handleCheckChange"
:data.sync="gData">
<span slot-scope="{ data }">
<span>{{ data.title }}</span>
<span :class="{'active':data.color ? true:false}">
{{ data.title }}
</span>
</span>
</virtualNodeTree>
<!-- <a-tree-->
@@ -89,7 +92,7 @@
return {
loading: false,
gData: [],
autoExpandParent: true,
autoExpandParent: false,
checkboxList: [],
expandedKeys: [],
visible: false,
@@ -103,7 +106,8 @@
defaultCheckedKeys: [],
defaultCheckedKeysName: [],
content: [],
dataList: []
dataList: [],
defaultExpandAll: false
}
},
mounted() {
@@ -169,6 +173,7 @@
}
this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
this.defaultExpandAll = false
this.treeVisible = true
} else {
this.queryDepartUserTreeList(1)
@@ -307,7 +312,7 @@
},
onSearch(e) {
this.loading = true
// this.treeVisible = false
this.treeVisible = false
let p = new Promise((resolve, reject) => {
resolve()
})
@@ -319,6 +324,7 @@
JSON.parse(gData).forEach(res => {
if (res.type == 'User') {
if (res.name.includes(e)) {
res.color = true
content.push(res)
}
} else if (res.type == 'Depart') {
@@ -328,6 +334,7 @@
content.push(res)
}
})
this.defaultExpandAll = true
this.gData = this.toTree(content)
} else {
let content = JSON.parse(gData)
@@ -339,11 +346,12 @@
})
}
this.gData = this.toTree(content)
this.defaultExpandAll = false
}
}
this.defaultCheckedKeys = this.userIds
this.defaultCheckedKeys = [...this.defaultCheckedKeys]
// this.treeVisible = true
this.treeVisible = true
this.loading = false
})
// this.gData = []
@@ -444,6 +452,7 @@
// }
// }
}
this.defaultExpandAll = false
this.treeVisible = true
} else {
this.gData = []
@@ -537,4 +546,8 @@
.treeWrap {
height: calc(100vh - 240px);
}
.active{
color: #21c9cc;
display: inline-block;
}
</style>