add 企标稽查整改

This commit is contained in:
danshihao
2023-11-02 10:33:26 +08:00
parent a035ac63aa
commit 6d6e1fa505
7 changed files with 603 additions and 13 deletions
@@ -164,7 +164,7 @@ export default {
},
// 点击选择按钮
workGroupClick () {
this.$refs.workGroupSelectionModal.show()
this.$refs.workGroupSelectionModal.show(this.textVals)
},
// 输入框输入监听
indexClick (event) {
@@ -96,10 +96,32 @@ export default {
}
},
methods: {
show () {
show (textVals) {
this.visible = true
this.checkedRows = []
this.checkedKeys = []
if (textVals) {
this.$nextTick(() => {
const nodes = this.findKeysByNodes(textVals.split(','))
this.checkedRows = nodes
this.checkedKeys = nodes.map(item => item.key)
})
}
},
findKeysByNodes (titles) {
const nodes = []
function searchTree (node) {
if (titles.includes(node.title)) {
nodes.push(node)
}
if (node.children) {
for (const child of node.children) {
searchTree(child)
}
}
}
searchTree(this.treeData[0])
return nodes
},
// 处理工作组树数据结构
dealTreeData (treeData) {