This commit is contained in:
sjl
2025-01-14 19:05:08 +08:00
parent 876c06ef54
commit 1c452b5574
4 changed files with 55 additions and 36 deletions

View File

@@ -69,6 +69,7 @@ const getTreeData = (val: any) => {
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
nextTick(() => {
treeRef.value?.setCurrentKey(node.id);
idd.value = node.id
});
//console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
}
@@ -87,7 +88,22 @@ watch(
deep: true,
},
)
const idd = ref('')
const handleNodeClick = (data: Plan.ResPlan) => {
if (data.name === '未检' || data.name === '检测中' || data.name === '检测完成') {
// 如果是父节点,不执行任何操作
//console.log('父节点不执行任何操作');
// 设置当前高亮节点
nextTick(() => {
treeRef.value?.setCurrentKey(idd.value);
});
return;
}
idd.value = data.id
checkStore.setPlanId(data.id)
checkStore.setPlanCode(data.code)
checkStore.setScriptId(data.scriptId)