ZaiZai %!s(int64=3) %!d(string=hai) anos
pai
achega
5d0bb65b22

+ 19 - 1
src/api/manager/archivetree.js

@@ -81,4 +81,22 @@ export const submitDisplayConfigTree = (params) => {
         method: 'post',
         params
     })
-}
+}
+
+//获取归档树同级节点
+export const getSameGradeNode = (params) => {
+  return request({
+    url: '/api/blade-manager/archiveTree/getSameGradeNode',
+    method: 'get',
+    params
+  })
+}
+
+//提交归档树手动排序
+export const submitArchiveTreeSort = (data) => {
+  return request({
+    url: '/api/blade-manager/archiveTree/submitArchiveTreeSort',
+    method: 'post',
+    data
+  })
+}

+ 2 - 4
src/components/WbsTree/ManualSorting.vue

@@ -12,9 +12,7 @@
       >
         <div>
           <span class="marleft10 marright20">{{key+1}}</span>
-          <span
-            style="color:black;"
-          >{{item.deptName}}</span>
+          <span style="color:black;">{{item.deptName}}{{item.nodeName}}</span>
           <span class="marleft20">{{item.tableName}}</span>
         </div>
         <div class="flexItemsC marright20">
@@ -62,7 +60,7 @@ export default {
     },
 
     listChange(){
-      
+
     }
   }
 }

+ 3 - 4
src/components/tree-tree/main.vue

@@ -17,9 +17,8 @@
       </div>
     </el-card>
     <div class="flex flex-d-c flex-center" style="width:50px;">
-      <div><el-button @click="addTree" size="mini" icon="el-icon-arrow-right"></el-button></div>
-      <div><el-button @click="delTree" size="mini" icon="el-icon-arrow-left"></el-button></div>
-
+      <div><el-button @click="addTree" :disabled="leftNum <= 0" size="mini" icon="el-icon-arrow-right"></el-button></div>
+      <div><el-button @click="delTree" :disabled="rightNum <= 0" size="mini" icon="el-icon-arrow-left"></el-button></div>
     </div>
     <el-card class="box-card flex1">
       <div slot="header" class="clearfix">
@@ -139,7 +138,7 @@ export default {
         })
 
       }
-      
+
       this.$emit('onAddTree',this.rightTreeData);
     },
     getRightTree(arr,keys){

+ 92 - 8
src/views/manager/archivetree.vue

@@ -57,6 +57,12 @@
                   style="fontSize:18px;"
                   v-if="node.level!=1"
                 ></i>
+                <i
+                  @click.stop='paixuMD(data)'
+                  class="el-icon-sort marleft5"
+                  style="fontSize:18px;"
+                  v-if="node.level!=1"
+                ></i>
               </span>
             </span>
           </el-tree>
@@ -100,6 +106,12 @@
                   style="fontSize:18px;"
                   v-if="node.level!=1"
                 ></i>
+                <i
+                  @click.stop='paixuMD(data)'
+                  class="el-icon-sort marleft5"
+                  style="fontSize:18px;"
+                  v-if="node.level!=1"
+                ></i>
               </span>
             </span>
           </el-tree>
@@ -357,14 +369,43 @@
         >确 定</el-button>
       </span>
     </el-dialog>
+
+    <!-- wbs树排序弹框 -->
+    <el-dialog
+      title="调整排序"
+      :visible="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>
+
   </basic-container>
 </template>
 
 <script>
-import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree } from "@/api/manager/archivetree";
+import ManualSorting from '@/components/WbsTree/ManualSorting'
+import { archiveTreeInit, lazyTree, dictionary, remove, archiveTreeSave, archiveTreeUpdate, archiveTreeDetail, archiveTreetree, submitDisplayConfigTree, getSameGradeNode, submitArchiveTreeSort } from "@/api/manager/archivetree";
 import { getToken } from '@/util/auth';
 import { roletree } from "@/api/system/role.js";
 export default {
+  components: {
+    ManualSorting,
+  },
   data () {
     return {
       //#region 左侧树
@@ -485,9 +526,52 @@ export default {
       checkXuan: [],
       //#endregion
       heights: '',
+
+      sortTag2: false,
+      sortTag: false,
+      sort: [],
     }
   },
   methods: {
+    paixuMD (data) {
+      this.sortTag = true
+      this.sortTag2 = true
+      this.curTreeData = data;
+      this.findWbsTreeSameLevel(data.id)
+    },
+    async findWbsTreeSameLevel (parentId) {//查询当前节点的同级节点
+      const { data: res } = await getSameGradeNode({ id: parentId })
+      //console.log(res);
+      if (res.code === 200) {
+        this.sort = res.data
+      }
+    },
+    bianhua () {
+      this.sortTag2 = false
+      this.$nextTick(() => {
+        this.sortTag2 = true
+      })
+    },
+    editSort () {//修改排序
+      let sortArr = this.sort, newArr = []
+      for (let i = 0; i < sortArr.length; i++) {
+        newArr.push({
+          id: sortArr[i].id,
+          deptName: sortArr[i].nodeName
+        })
+      }
+      this.wbsTreeSort(newArr)
+    },
+    async wbsTreeSort (newArr) {//修改排序
+      const { data: res } = await submitArchiveTreeSort(newArr)
+      //console.log(res);
+      if (res.code == 200) {
+        this.sortTag = false
+        this.sortTag2 = false
+        //刷新页面
+        window.location.reload()
+      }
+    },
     //#region 左侧树方法
     async loadNode (node, resolve) {
       console.log(node);
@@ -588,7 +672,7 @@ export default {
           }).catch(()=>{
 
           })
-          
+
         })
         .catch(() => {
 
@@ -686,7 +770,7 @@ export default {
                   id: this.form.id,
                   parentId: this.form.parentId, //上级节点id
                   nodeName: this.form.nodeName,  //节点名称
-                  nodeType: this.form.nodeType,  // 节点类型  
+                  nodeType: this.form.nodeType,  // 节点类型
                   postType: this.form.postType,  //岗位类型
                   isStorageNode: this.form.isStorageNode,  //是否为存储节点
                   isBuiltDrawing: this.form.isBuiltDrawing,  //竣工图
@@ -698,7 +782,7 @@ export default {
                   id: this.form.id,
                   parentId: this.form.parentId, //上级节点id
                   nodeName: this.form.nodeName,  //节点名称
-                  nodeType: this.form.nodeType,  // 节点类型  
+                  nodeType: this.form.nodeType,  // 节点类型
                   postType: this.form.postType,  //岗位类型
                   isStorageNode: this.form.isStorageNode,  //是否为存储节点
                   isBuiltDrawing: this.form.isBuiltDrawing,  //竣工图
@@ -710,7 +794,7 @@ export default {
                 id: this.form.id,
                 parentId: this.form.parentId, //上级节点id
                 nodeName: this.form.nodeName,  //节点名称
-                nodeType: this.form.nodeType,  // 节点类型  
+                nodeType: this.form.nodeType,  // 节点类型
                 postType: this.form.postType,  //岗位类型
                 isStorageNode: this.form.isStorageNode,  //是否为存储节点
               })
@@ -721,7 +805,7 @@ export default {
                 id: this.form.id,
                 parentId: this.form.parentId, //上级节点id
                 nodeName: this.form.nodeName,  //节点名称
-                nodeType: this.form.nodeType,  // 节点类型 
+                nodeType: this.form.nodeType,  // 节点类型
                 associationType: this.form.associationType,  //关联类型
                 majorDataType: this.form.majorDataType, //内业资料类型
                 displayHierarchy: this.form.displayHierarchy,  //显示层级
@@ -731,7 +815,7 @@ export default {
                 id: this.form.id,
                 parentId: this.form.parentId, //上级节点id
                 nodeName: this.form.nodeName,  //节点名称
-                nodeType: this.form.nodeType,  // 节点类型  
+                nodeType: this.form.nodeType,  // 节点类型
                 associationType: this.form.associationType,  //关联类型
               })
             }
@@ -908,4 +992,4 @@ export default {
   border-radius: 5px;
   padding: 15px 10px;
 }
-</style>
+</style>

+ 57 - 11
src/views/manager/contractinfo/detail.vue

@@ -9,6 +9,7 @@
         <el-tab-pane
           label="合同段信息"
           name="1"
+          :disabled="btnLoad"
         >
           <div>
             <el-form
@@ -418,6 +419,7 @@
           v-if="contractForm.contractType == 1"
           label="分配WBS"
           name="2"
+          :disabled="btnLoad"
         >
           <div>
             <div
@@ -438,6 +440,7 @@
         <el-tab-pane
           label="分配项目人员"
           name="3"
+          :disabled="btnLoad"
         >
           <div>
             <div class="flex jc-al-c">
@@ -588,28 +591,28 @@
       </el-tabs>
       <div class="flexEnd marbottom20">
         <el-button
-          type="success"
+          :type="activeType != 3?'info':'success'"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnDisabled"
+          :loading="saveBtnLoad"
           @click="saveQuit"
-        >保存并退出
-        </el-button>
+        >保存并退出</el-button>
         <el-button
           type="info"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnBackDisabled"
+          :loading="saveBtnBackLoad"
           v-if="activeType != 1"
           @click="saveNext('p')"
-        >保存并返回上一步
-        </el-button>
+        >保存并返回上一步</el-button>
         <el-button
-          type="info"
+          type="success"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnNextDisabled"
+          :loading="saveBtnNextLoad"
           v-if="activeType != 3"
           @click="saveNext('n')"
-        >保存并进入下一步
-        </el-button>
+        >保存并进入下一步</el-button>
       </div>
     </div>
   </basic-container>
@@ -691,6 +694,13 @@ export default {
         3: false,
       },
       btnLoad: false,
+      saveBtnLoad: false,
+      saveBtnDisabled: false,
+      saveBtnBackLoad: false,
+      saveBtnBackDisabled: false,
+      saveBtnNextLoad: false,
+      saveBtnNextDisabled: false,
+
       pid: '',
       cid: '',
       projectInfo: {},
@@ -1037,6 +1047,9 @@ export default {
     },
     async saveQuit() {
       this.btnLoad = true;
+      this.saveBtnLoad = true;
+      this.saveBtnBackDisabled = true
+      this.saveBtnNextDisabled = true
       try {
         if (this.activeType == '1') {
           await this.savecontract();
@@ -1045,6 +1058,9 @@ export default {
         }
       } catch (error) {
         this.btnLoad = false;
+        this.saveBtnLoad = false;
+        this.saveBtnBackDisabled = false
+        this.saveBtnNextDisabled = false
         if(this.activeType == '2'){
           this.getRightTree();
         }
@@ -1056,10 +1072,22 @@ export default {
         message: "保存成功!"
       });
       this.btnLoad = false;
+      this.saveBtnLoad = false;
+      this.saveBtnBackDisabled = false
+      this.saveBtnNextDisabled = false
       this.$router.go(-1);
     },
     async saveNext(type) {
       this.btnLoad = true;
+      if (type == 'n') {
+        this.saveBtnNextLoad = true;
+        this.saveBtnBackDisabled = true
+        this.saveBtnDisabled = true
+      } else if (type == 'p') {
+        this.saveBtnBackLoad = true;
+        this.saveBtnNextDisabled = true
+        this.saveBtnDisabled = true
+      }
       try {
         if (this.activeType == '1') {
           let res = await this.savecontract();
@@ -1069,6 +1097,15 @@ export default {
         }
       } catch (error) {
         this.btnLoad = false;
+        if (type == 'n') {
+          this.saveBtnNextLoad = false;
+          this.saveBtnBackDisabled = false
+          this.saveBtnDisabled = false
+        } else if (type == 'p') {
+          this.saveBtnBackLoad = false;
+          this.saveBtnNextDisabled = false
+          this.saveBtnDisabled = false
+        }
         if(this.activeType == '2'){
           this.getRightTree();
         }
@@ -1095,6 +1132,15 @@ export default {
       }
       this.activeType = num.toString();
       this.btnLoad = false;
+      if (type == 'n') {
+        this.saveBtnNextLoad = false;
+        this.saveBtnBackDisabled = false
+        this.saveBtnDisabled = false
+      } else if (type == 'p') {
+        this.saveBtnBackLoad = false;
+        this.saveBtnNextDisabled = false
+        this.saveBtnDisabled = false
+      }
     },
     getIds() {
 

+ 53 - 5
src/views/manager/projectinfo/detail.vue

@@ -8,6 +8,7 @@
         <el-tab-pane
           label="项目基本信息"
           name="1"
+          :disabled="btnLoad"
         >
           <div>
             <el-form
@@ -158,6 +159,7 @@
         <el-tab-pane
           label="分配WBS模版"
           name="2"
+          :disabled="btnLoad"
         >
           <div>
             <div class="text-align-c">
@@ -210,6 +212,7 @@
         <el-tab-pane
           label="分配日志WBS"
           name="3"
+          :disabled="btnLoad"
         >
           <div>
             <div class="text-align-c mg-t-20">
@@ -251,6 +254,7 @@
         <el-tab-pane
           label="分配系统维护人员"
           name="4"
+          :disabled="btnLoad"
         >
           <div>
             <div class="flex jc-al-c">
@@ -386,22 +390,25 @@
 
       <div class="flexEnd">
         <el-button
-          type="info"
+          :type="activeType != 4?'info':'success'"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnDisabled"
+          :loading="saveBtnLoad"
           @click="saveQuit"
         >保存并退出</el-button>
         <el-button
           type="info"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnBackDisabled"
+          :loading="saveBtnBackLoad"
           v-if="activeType != 1"
           @click="saveNext('p')"
         >保存并返回上一步</el-button>
         <el-button
           type="success"
           size="medium"
-          :loading="btnLoad"
+          :disabled="saveBtnNextDisabled"
+          :loading="saveBtnNextLoad"
           v-if="activeType != 4"
           @click="saveNext('n')"
         >保存并进入下一步</el-button>
@@ -490,7 +497,12 @@ export default {
         4: false,
       },
       btnLoad: false,
-
+      saveBtnLoad: false,
+      saveBtnDisabled: false,
+      saveBtnBackLoad: false,
+      saveBtnBackDisabled: false,
+      saveBtnNextLoad: false,
+      saveBtnNextDisabled: false,
       id: '',
       highwayGradeList: [],
       radioType: '总里程',
@@ -683,6 +695,9 @@ export default {
 
     async saveQuit () {
       this.btnLoad = true;
+      this.saveBtnLoad = true;
+      this.saveBtnBackDisabled = true
+      this.saveBtnNextDisabled = true
       try {
         if (this.activeType == '1') {
           await this.saveProject();
@@ -693,6 +708,9 @@ export default {
         }
       } catch (error) {
         this.btnLoad = false;
+        this.saveBtnLoad = false;
+        this.saveBtnBackDisabled = false
+        this.saveBtnNextDisabled = false
         if(this.activeType == '2'){
           this.getRightTree();
         }
@@ -704,10 +722,22 @@ export default {
         message: "保存成功!"
       });
       this.btnLoad = false;
+      this.saveBtnLoad = false;
+      this.saveBtnBackDisabled = false
+      this.saveBtnNextDisabled = false
       this.$router.go(-1);
     },
     async saveNext (type) {
       this.btnLoad = true;
+      if (type == 'n') {
+        this.saveBtnNextLoad = true;
+        this.saveBtnBackDisabled = true
+        this.saveBtnDisabled = true
+      } else if (type == 'p') {
+        this.saveBtnBackLoad = true;
+        this.saveBtnNextDisabled = true
+        this.saveBtnDisabled = true
+      }
       try {
         if (this.activeType == '1') {
           let res = await this.saveProject();
@@ -717,6 +747,15 @@ export default {
         }
       } catch (error) {
         this.btnLoad = false;
+        if (type == 'n') {
+          this.saveBtnNextLoad = false;
+          this.saveBtnBackDisabled = false
+          this.saveBtnDisabled = false
+        } else if (type == 'p') {
+          this.saveBtnBackLoad = false;
+          this.saveBtnNextDisabled = false
+          this.saveBtnDisabled = false
+        }
         if(this.activeType == '2'){
           this.getRightTree();
         }
@@ -737,6 +776,15 @@ export default {
 
       this.activeType = num.toString();
       this.btnLoad = false;
+      if (type == 'n') {
+        this.saveBtnNextLoad = false;
+        this.saveBtnBackDisabled = false
+        this.saveBtnDisabled = false
+      } else if (type == 'p') {
+        this.saveBtnBackLoad = false;
+        this.saveBtnNextDisabled = false
+        this.saveBtnDisabled = false
+      }
     },
 
     saveProject () {

+ 2 - 5
src/views/manager/projectinfo/tree.vue

@@ -577,7 +577,6 @@
         <el-form-item label="上级节点">
           <el-input
             v-model="nodeDetail.parentName"
-            disabled
           ></el-input>
         </el-form-item>
         <el-form-item
@@ -599,17 +598,16 @@
           </el-select>
         </el-form-item>
         <el-form-item label="划分编号">
-          <el-input v-model="nodeDetail.partitionCode" disabled></el-input>
+          <el-input v-model="nodeDetail.partitionCode"></el-input>
         </el-form-item>
         <el-form-item label="唯一编码">
-          <el-input v-model="nodeDetail.uniqueCode" disabled></el-input>
+          <el-input v-model="nodeDetail.uniqueCode"></el-input>
         </el-form-item>
         <template v-if="nodeDetail.deptCategory == 6">
           <el-form-item label="是否有混凝土">
             <el-radio-group
               v-model="nodeDetail.isConcrete"
               size="small"
-              disabled
             >
               <el-radio
                 :label="0"
@@ -625,7 +623,6 @@
             <el-radio-group
               v-model="nodeDetail.isExpernode"
               size="small"
-              disabled
             >
               <el-radio
                 :label="0"