|
@@ -27,9 +27,14 @@
|
|
|
>
|
|
|
<div style="width:100%;">
|
|
|
<span style="text-overflow: ellipsis;"> {{ data.title }} </span>
|
|
|
- <!-- <span> {{ node}} </span> -->
|
|
|
- <!-- 添加 -->
|
|
|
-
|
|
|
+
|
|
|
+ <!-- 调整排序 -->
|
|
|
+ <i
|
|
|
+ class="el-icon-sort"
|
|
|
+ @click="sortpai(data, node)"
|
|
|
+ v-if="node.level == 2"
|
|
|
+ title="调整排序"
|
|
|
+ ></i>
|
|
|
</div>
|
|
|
</span>
|
|
|
</el-tree>
|
|
@@ -192,22 +197,38 @@
|
|
|
v-if="formulaCompVisible"
|
|
|
></FormulaEdit>
|
|
|
</el-dialog>
|
|
|
+ <!-- 排序弹框 -->
|
|
|
+ <el-dialog
|
|
|
+ title="调整排序"
|
|
|
+ :visible.sync="sortTag"
|
|
|
+ width="50%"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <ManualSorting v-if="sortTag2" @bianhua="bianhua()" :sort="sort" />
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="(sortTag = false), (sortTag2 = false)"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="editSort()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {tabTypeLazyTree,delAprojectTab} from "@/api/manager/wbsprivate";
|
|
|
-import {selectFormElements,selectPrivateFormElements} from "@/api/manager/wbstree";
|
|
|
+import {selectPrivateFormElements} from "@/api/manager/wbstree";
|
|
|
import {getExcelHtml} from "@/api/exctab/excelmodel"
|
|
|
import Qute from "./qutediaolog/qute1.vue";//引入元素库
|
|
|
import Relation from './qutediaolog/relation.vue'//关联清表
|
|
|
import EditElement from "@/views/manager/projectinfo/editElement/editElement.vue";//编辑元素
|
|
|
import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
|
|
|
import FormulaEdit from "@/views/formula/edit.vue";
|
|
|
+import ManualSorting from '@/components/WbsTree/ManualSorting'
|
|
|
|
|
|
|
|
|
export default {
|
|
|
- components: { dynamicExcel, EditElement, Qute,Relation,FormulaEdit },
|
|
|
+ components: { dynamicExcel, EditElement, Qute,Relation,FormulaEdit,ManualSorting },
|
|
|
computed:{
|
|
|
ids () {
|
|
|
let ids = [];
|
|
@@ -364,8 +385,9 @@ export default {
|
|
|
curTreeData: {},
|
|
|
projectid:'',
|
|
|
treeId:"",
|
|
|
- curNode:{}
|
|
|
-
|
|
|
+ curNode:{},
|
|
|
+ sortTag: false,
|
|
|
+ sortTag2: false,
|
|
|
|
|
|
|
|
|
};
|
|
@@ -377,7 +399,44 @@ export default {
|
|
|
// this.treeLoad1()
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ async sortpai(data,node) {
|
|
|
+ console.log(data,node);
|
|
|
+ await this.findWbsTreePrivateSameLevel(node,data)
|
|
|
+ this.sortTag = true;
|
|
|
+ this.sortTag2 = true;
|
|
|
+ },
|
|
|
+ editSort() {
|
|
|
+ this.wbsTreePrivateSort();
|
|
|
+ },
|
|
|
+ bianhua() {
|
|
|
+ this.sortTag2 = false;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ 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 findWbsTreePrivateSameLevel(node,data) {
|
|
|
+ const { data: res } =await tabTypeLazyTree({parentId:node.data.parentId,projectId:this.projectid,current:1,size:1000})
|
|
|
+ if (res.code == 200) {
|
|
|
+ console.log(res.data,'res1111111');
|
|
|
+ let tabArr=res.data.records
|
|
|
+ tabArr.forEach((item)=>{
|
|
|
+ item.tableName=item.title
|
|
|
+ })
|
|
|
+ console.log(tabArr,'tabArr');
|
|
|
+ this.sort =tabArr
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
async treeLoad1 () {
|
|
|
let id = 12345678910
|
|
|
let das = await this.tabTypeLazyTree(id, this.projectid,this.page.current,this.page.size)
|