From 30fd6d4936b28ac6618b1751a5c4c0142c0b6a4b Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期三, 09 七月 2025 14:58:34 +0800
Subject: [PATCH] 1

---
 src/views/wel/index.vue |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index ee3e2be..37ea1f7 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -198,6 +198,11 @@
         total: 0,
       },
       option: {
+        rowKey: "id",
+        treeProps: {
+          children: "children",
+          hasChildren: 'hasChildren',
+        },
         lazy: true,
         rowKey: 'id',
         addBtn: false,
@@ -255,6 +260,7 @@
         ],
       },
       data: [],
+      upData: []
     };
   },
   computed: {
@@ -373,7 +379,6 @@
       return false;
     },
     uploadAfter() {
-      alert(123)
     },
     uploadmodalSubmit(row,done) {
       if(this.file == null) {
@@ -550,7 +555,6 @@
             // 鏇存柊鑺傜偣鏁版嵁
             nodes[i].children = [...newChildren];
             this.data = [...this.data]; // 鏇挎崲椤跺眰寮曠敤
-            
             return true;
           }
           if (Array.isArray(nodes[i].children) && nodes[i].children.length > 0) {
@@ -562,12 +566,18 @@
         return false;
       };
       updateTree(this.data);
+      // this.upData = JSON.parse(JSON.stringify(this.data));
+      // this.data = [];
       // 寮哄埗鍒锋柊
       this.$nextTick(() => {
         this.$refs.crud?.refreshTable();
-        //this.$refs.crud.toggleRowExpansion('0', true);
-        console.log(this.data,222)
+        //this.data = this.upData;
       });
+      // setTimeout(()=> {
+      //   this.data = this.upData;
+      //   this.option.defaultExpandAll = true;
+      //   console.log(this.data,222)
+      // },3000)
     },
     updateLocalTreeNode(nodeData) {   //淇敼鐨勬柟娉�
       const updateNode = (nodes) => {

--
Gitblit v1.9.3