add 企标稽查整改
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user