diff --git a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
index 7a36f9b..6833af9 100644
--- a/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
+++ b/src/views/services/serviceDirective/ConfigServiceDirectiveList.vue
@@ -34,19 +34,22 @@
-
+ -->
新增分类标签
-
+
-
+
@@ -716,34 +719,39 @@ function getDropDownAction(record) {
}
function expandTreeNodeToLevel4(directiveData: any) {
- // 清空之前展开的节点
- expandedKeys.value = [];
- // 递归查找并展开相应的节点
- const findAndExpandNode = (nodes: any[], level: number, directiveData: any) => {
- for (const node of nodes) {
- // 判断当前节点的 level 是否与 directiveData 的级别匹配
- if (level === 1 && node.instructionId === directiveData.instructionTagId) {
- expandedKeys.value.push(node.key);
- if (node.children && node.children.length > 0) {
- findAndExpandNode(node.children, 2, directiveData);
- }
- } else if (level === 2 && node.categoryId === directiveData.categoryId) {
- expandedKeys.value.push(node.key);
- if (node.children && node.children.length > 0) {
- findAndExpandNode(node.children, 3, directiveData);
- }
- } else if (level === 3 && node.typeId === directiveData.typeId) {
- expandedKeys.value.push(node.key);
- if (node.children && node.children.length > 0) {
- findAndExpandNode(node.children, 4, directiveData);
- }
- } else if (level === 4 && node.key === directiveData.id) {
- expandedKeys.value.push(node.key);
- }
- }
- };
- // 调用递归方法,从树的根节点开始查找
- findAndExpandNode(treeData.value, 1, directiveData);
+console.log("🚀 ~ expandTreeNodeToLevel4 ~ directiveData:", directiveData)
+
+
+ selectedKeys.value = [ directiveData.instructionTagId, directiveData.categoryId, directiveData.typeId, directiveData.id ]
+ openKeys.value = [ directiveData.instructionTagId, directiveData.categoryId, directiveData.typeId, directiveData.id ]
+ // // 清空之前展开的节点
+ // expandedKeys.value = [];
+ // // 递归查找并展开相应的节点
+ // const findAndExpandNode = (nodes: any[], level: number, directiveData: any) => {
+ // for (const node of nodes) {
+ // // 判断当前节点的 level 是否与 directiveData 的级别匹配
+ // if (level === 1 && node.instructionId === directiveData.instructionTagId) {
+ // expandedKeys.value.push(node.key);
+ // if (node.children && node.children.length > 0) {
+ // findAndExpandNode(node.children, 2, directiveData);
+ // }
+ // } else if (level === 2 && node.categoryId === directiveData.categoryId) {
+ // expandedKeys.value.push(node.key);
+ // if (node.children && node.children.length > 0) {
+ // findAndExpandNode(node.children, 3, directiveData);
+ // }
+ // } else if (level === 3 && node.typeId === directiveData.typeId) {
+ // expandedKeys.value.push(node.key);
+ // if (node.children && node.children.length > 0) {
+ // findAndExpandNode(node.children, 4, directiveData);
+ // }
+ // } else if (level === 4 && node.key === directiveData.id) {
+ // expandedKeys.value.push(node.key);
+ // }
+ // }
+ // };
+ // // 调用递归方法,从树的根节点开始查找
+ // findAndExpandNode(treeData.value, 1, directiveData);
}
/**