bill 1 месяц назад
Родитель
Сommit
61f1b60aa4
1 измененных файлов с 5 добавлено и 20 удалено
  1. 5 20
      src/api/tagging-style.ts

+ 5 - 20
src/api/tagging-style.ts

@@ -114,9 +114,12 @@ export const fetchTaggingStyles = async () => {
     for (const item of tree) {
       if (item.iconUrl) {
         if (level !== 0) {
-          delete parent.children;
+          // parent.children.filter(item => item.)
+          // console.log(parent.children)
+          // delete parent.children;
         }
         __map[item.iconId] = item.dictId || parent.dictId;
+        console.error(parent.id)
         styles.push(toLocal({ ...item, iconTitle: parent.id }));
       } else {
         const data = {
@@ -130,27 +133,9 @@ export const fetchTaggingStyles = async () => {
       }
     }
   };
-  // treeData = [{
-  //   iconId: 279,
-  //   iconTitle: "其他",
-  //   iconUrl: null,
-  //   userName: null,
-  //   isSystem: 1,
-  //   useNum: 13,
-  //   lastUse: 1,
-  //   isNew: 1,
-  //   caseId: null,
-  //   fusionId: null,
-  //   sort: 2,
-  //   parentId: null,
-  //   tbStatus: 0,
-  //   createTime: "2025-08-26 14:56:08",
-  //   updateTime: "2025-09-25 19:59:10",
-  //   childrenList: treeData,
-  // }];
   const tree: any = { children: [] };
   genTree(treeData, tree);
-  console.error("treeData", treeData, tree);
+  console.error("treeData", tree, styles);
   styleTypes.length = 0;
   styleTypes.push(...tree.children)
   Object.assign(defStyleType, tree.children[tree.children.length - 1]);