소스 검색

清表模板排序

duy 2 년 전
부모
커밋
6c6b181fc1
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. 16 2
      src/views/exctab/excelmodel/excelmodel.vue

+ 16 - 2
src/views/exctab/excelmodel/excelmodel.vue

@@ -504,7 +504,8 @@ export default {
       saveExcelLoad:false,
       sortTag: false,
       sortTag2: false,
-      sort:[]
+      sort:[],
+      curTreeData:{}
     }
   },
   methods: {
@@ -514,6 +515,7 @@ export default {
       await this.findWbsTreePrivateSameLevel(node,data)
       this.sortTag = true;
       this.sortTag2 = true;
+      this.curTreeData=data
     },
     editSort() {
       this.exctabSort();
@@ -535,7 +537,7 @@ export default {
       if (res.code == 200) {
         this.sortTag = false;
         this.sortTag2 = false;
-        this.getLazytreessss();
+        this.updateTreeNewNode();
       }
     },
     async findWbsTreePrivateSameLevel(node,data) {
@@ -551,6 +553,18 @@ export default {
         this.sort =res.data
       }
     },
+   updateTreeNewNode () {
+      tabLazytree( {
+         parentId:this.curTreeData.parentId,
+         modeId:this.$route.params.id
+       }).then((res) => {
+        let node = this.$refs.trees.getNode(this.curTreeData.parentId.parentId);
+        // node.isLeaf = false;
+        // node.isLeafByUser = false;
+        //console.log(node)
+        this.$refs.trees.updateKeyChildren(this.curTreeData.parentId, res.data.data)
+      })
+    },
     async getLazytreessss() {
       const { data: res } = await tabLazytree(
        {