|
@@ -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(
|
|
|
{
|