yusheng 1 tuần trước cách đây
mục cha
commit
f5b316b434

+ 10 - 9
src/components/contact/parentList.vue

@@ -238,17 +238,18 @@
       },
       /* 递归过滤树节点 */
       filterTreeByCode(list, code) {
-        return list.reduce((acc, node) => {
-          if (node.code === code) {
-            acc.push(node);
-          } else if (node.children && node.children.length) {
-            const filteredChildren = this.filterTreeByCode(node.children, code);
-            if (filteredChildren.length) {
-              acc.push({ ...node, children: filteredChildren });
+        const result = [];
+        const walk = (nodes) => {
+          for (const node of nodes) {
+            if (node.code === code) {
+              result.push(node);
+            } else if (node.children && node.children.length) {
+              walk(node.children);
             }
           }
-          return acc;
-        }, []);
+        };
+        walk(list);
+        return result;
       },
 
       /* 刷新表格 */

+ 1 - 1
src/views/recordComponents/workOrderReport.vue

@@ -358,7 +358,7 @@
           ? '19'
           : '17'
       "
-      :code="pageName == 'QualityInspection' ? '06mei' : ''"
+      :code="pageName == 'QualityInspection' ? '02' : ''"
       ref="parentListRef"
       @changeParent="changeParent"
     >