1
李喆(开发组)
2025-07-09 30fd6d4936b28ac6618b1751a5c4c0142c0b6a4b
1
已修改1个文件
18 ■■■■ 文件已修改
src/views/wel/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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) => {