|
@@ -32,7 +32,7 @@
|
|
|
<el-link :underline="false">
|
|
|
<i
|
|
|
class="el-icon-sort"
|
|
|
- @click="sortpai(data, node)"
|
|
|
+ @click.stop="sortpai(data, node)"
|
|
|
v-if="node.level == 2"
|
|
|
title="调整排序"
|
|
|
></i>
|
|
@@ -223,6 +223,7 @@
|
|
|
<script>
|
|
|
import {tabTypeLazyTree,delAprojectTab} from "@/api/manager/wbsprivate";
|
|
|
import {selectPrivateFormElements} from "@/api/manager/wbstree";
|
|
|
+import {wbsInfotabSort} from "@/api/manager/wbsinfo";
|
|
|
import {getExcelHtml} from "@/api/exctab/excelmodel"
|
|
|
import Qute from "./qutediaolog/qute1.vue";//引入元素库
|
|
|
import Relation from './qutediaolog/relation.vue'//关联清表
|
|
@@ -398,6 +399,7 @@ export default {
|
|
|
curNode:{},
|
|
|
sortTag: false,
|
|
|
sortTag2: false,
|
|
|
+ sort:[]
|
|
|
|
|
|
|
|
|
};
|
|
@@ -409,12 +411,15 @@ export default {
|
|
|
methods: {
|
|
|
async sortpai(data,node) {
|
|
|
console.log(data,node);
|
|
|
+ this.curNode=node;
|
|
|
+ this.curTreeData=data
|
|
|
+
|
|
|
await this.findWbsTreePrivateSameLevel(node,data)
|
|
|
this.sortTag = true;
|
|
|
this.sortTag2 = true;
|
|
|
},
|
|
|
editSort() {
|
|
|
- this.wbsTreePrivateSort();
|
|
|
+ this.wbsInfotabSort();
|
|
|
},
|
|
|
bianhua() {
|
|
|
this.sortTag2 = false;
|
|
@@ -422,15 +427,18 @@ export default {
|
|
|
this.sortTag2 = true;
|
|
|
});
|
|
|
},
|
|
|
- async wbsTreePrivateSort() {
|
|
|
- //wbs私有树节点手动排序
|
|
|
- // const { data: res } = await wbsTreePrivateSort(this.sort);
|
|
|
- // console.log(res);
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.sortTag = false;
|
|
|
- // this.sortTag2 = false;
|
|
|
- // this. treeLoad1();
|
|
|
- // }
|
|
|
+ async wbsInfotabSort() {
|
|
|
+ //元素库、独立库节点排序
|
|
|
+ console.log(this.sort,'this.sort');
|
|
|
+ var newArr=this.sort.map((v)=>{return v.id})
|
|
|
+ newArr=newArr.join(',')
|
|
|
+ const { data: res } = await wbsInfotabSort(newArr);
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.sortTag = false;
|
|
|
+ this.sortTag2 = false;
|
|
|
+ this. refreshTree();
|
|
|
+ }
|
|
|
},
|
|
|
async findWbsTreePrivateSameLevel(node,data) {
|
|
|
const { data: res } =await tabTypeLazyTree({parentId:node.data.parentId,projectId:this.projectid,current:1,size:1000})
|
|
@@ -715,7 +723,6 @@ export default {
|
|
|
|
|
|
});
|
|
|
}else{
|
|
|
-
|
|
|
this.updateTreeNewNode()
|
|
|
}
|
|
|
},
|