revert(测试跟踪): 回退代码

--bug=1028035 --user=王旭 高级搜索所属模块取消某个模块会把父级模块一起取消 https://www.tapd.cn/55049933/s/1404684
This commit is contained in:
WangXu10 2023-08-17 17:42:12 +08:00 committed by 刘瑞斌
parent d0e50060d1
commit d83c7eff98
1 changed files with 3 additions and 29 deletions

View File

@ -36,7 +36,6 @@
@check="handleCheckChange"
default-expand-all
show-checkbox
:check-strictly="true"
node-key="id"
class="search-tree"
ref="tree">
@ -155,34 +154,9 @@ export default {
}
}
},
handleCheckChange(data) {
const node = this.$refs.tree.getNode(data.id);
this.setNode(node);
},
setNode(node) {
if (node.checked) {
//,
this.setParentNode(node);
} else {
//,
this.setChildenNode(node);
}
},
setParentNode(node) {
if (node.parent) {
for (const key in node) {
if (key === "parent") {
node[key].checked = true;
this.setParentNode(node[key]);
}
}
}
},
setChildenNode(node) {
for (let i = 0; i < node.childNodes.length; i++) {
node.childNodes[i].checked = false;
this.setChildenNode(node.childNodes[i]);
}
handleCheckChange(data, curData) {
const {checkedKeys} = curData;
this.component.value = checkedKeys;
},
changeTreeTag() {
if (this.component.value) {