rui.jiang 11 月之前
父節點
當前提交
cf0acd7f5e
共有 1 個文件被更改,包括 7 次插入6 次删除
  1. 7 6
      src/views/admin/cockpitManage/Index.vue

+ 7 - 6
src/views/admin/cockpitManage/Index.vue

@@ -125,12 +125,13 @@ export default {
       const treedata = res.data;
       const processedData = this.processTreeData(treedata);
       this.parentOpt = processedData;
-
-      // Automatically handle the first layer of children where codeType === "field"
-      const firstLayer = this.findFirstFieldLayer(processedData);
-      if (firstLayer) {
-        this.parentChange(firstLayer);
-      }
+      this.defaultdata = res.data[0];
+      this.parentChange(  this.defaultdata);
+      // const firstLayer = this.findFirstFieldLayer(processedData);
+      // if (firstLayer) {
+      //   this.parentChange(  this.defaultdata);
+    // }
+    
     },
     //过滤数据
     processTreeData(treeData) {