Эх сурвалжийг харах

Merge branch 'master' of http://47.110.251.215:3000/web/saber into master

zhangh 3 жил өмнө
parent
commit
913c7fa795

+ 9 - 0
src/api/manager/wbsprivate.js

@@ -60,3 +60,12 @@ export const removeTableByCondition = (id,projectId,wbsId, params) => {
   })
 }
 
+export const removePrivateTreeNode = (pKeyId) => {
+  return request({
+    url: '/api/blade-manager/wbsPrivate/remove',
+    method: 'post',
+    params: {
+      pKeyId,
+    }
+  })
+}

+ 13 - 0
src/views/manager/contractinfo/detail.vue

@@ -706,6 +706,7 @@ export default {
         if (val.id === this.rId) {
           if (val.children) {
             this.postList = val.children
+            this.postId = this.postList[0].id;//切换的时候默认选中第一个岗位
           } else {
             this.postList = []
           }
@@ -861,6 +862,12 @@ export default {
           if (Number(this.contractForm.contractAmount) < 0) {
             this.contractForm.contractAmount = 0;
           }
+          if(Number(this.contractForm.securityLevel) <0){
+            this.contractForm.securityLevel = 0;
+          }
+          if(Number(this.contractForm.storagePeriod) <0){
+            this.contractForm.storagePeriod = 0;
+          }
           this.$nextTick(() => {
             this.typeChang['1'] = false;
           })
@@ -891,6 +898,12 @@ export default {
           if (Number(this.contractForm.contractAmount) < 0) {
             this.contractForm.contractAmount = 0;
           }
+          if(Number(this.contractForm.securityLevel) <0){
+            this.contractForm.securityLevel = 0;
+          }
+          if(Number(this.contractForm.storagePeriod) <0){
+            this.contractForm.storagePeriod = 0;
+          }
           this.$nextTick(() => {
             this.typeChang['1'] = false;
           })

+ 32 - 1
src/views/manager/projectinfo/tree.vue

@@ -9,6 +9,7 @@
               placeholder="输入关键字进行过滤"
               v-model="filterText"
               @input="filterChange"
+              clearable
             ></el-input>
             <!-- <el-button type="info" class="mg-l-20">导入划分</el-button> -->
           </div>
@@ -49,6 +50,7 @@
                         <el-dropdown-item
                           @click.native="setLeftType(1,data,node)"
                           icon="el-icon-circle-plus-outline"
+                          v-if="data.deptCategory != 6 && data.isExistForm != 1"
                         >新增子级</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="setLeftType(2,data,node)"
@@ -58,6 +60,11 @@
                           @click.native="setLeftType(3,data,node)"
                           icon="el-icon-document-copy"
                         >复制节点</el-dropdown-item>
+                        <el-dropdown-item
+                          @click.native="deleNode(data,node)"
+                          icon="el-icon-close"
+                          v-if="node.level !=1"
+                        >删除节点</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="setLeftType(4,data,node)"
                           icon="iconfont hcicon-danganziliao-biaogetianxie"
@@ -119,6 +126,7 @@
                         <el-dropdown-item
                           @click.native="setLeftType(1,data,node)"
                           icon="el-icon-circle-plus-outline"
+                          v-if="data.deptCategory != 6 && data.isExistForm != 1"
                         >新增子级</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="setLeftType(2,data,node)"
@@ -128,6 +136,11 @@
                           @click.native="setLeftType(3,data,node)"
                           icon="el-icon-document-copy"
                         >复制节点</el-dropdown-item>
+                        <el-dropdown-item
+                          @click.native="deleNode(data,node)"
+                          icon="el-icon-close"
+                          v-if="node.level !=1"
+                        >删除节点</el-dropdown-item>
                         <el-dropdown-item
                           @click.native="setLeftType(4,data,node)"
                           icon="iconfont hcicon-danganziliao-biaogetianxie"
@@ -1345,7 +1358,7 @@ import {
   saveElement, remove as removeElement, updateBatchElements, getTemplate,
   importWbsElement
 } from "@/api/manager/wbsformelement";
-import { getLazytree, getDetail, update, findNodeTableByCondition as selectByNodeTable, removeTableByCondition as removeTableById } from "@/api/manager/wbsprivate";
+import { getLazytree, getDetail, update, findNodeTableByCondition as selectByNodeTable, removeTableByCondition as removeTableById ,removePrivateTreeNode} from "@/api/manager/wbsprivate";
 import { findProjectTree as getAlltree } from "@/api/manager/projectinfo";
 import { getList as getAttchFromOriginalName } from "@/api/resource/attach";
 import { getDictionary } from "@/api/system/dict";
@@ -1674,6 +1687,24 @@ export default {
       })
     },
 
+    deleNode (data, node) {
+      this.$confirm('此操作将删除节点【' + data.title + '】, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        removePrivateTreeNode(data.primaryKeyId).then(() => {
+          this.$refs.tree.remove(node);
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+        })
+      }).catch(() => {
+
+      });
+    },
+
     importHandle () {
 
     },

+ 3 - 2
src/views/manager/wbsinfo/edit.vue

@@ -1607,8 +1607,9 @@ export default {
       const { data: res } = await wbsTreeTableSort(this.sort)
       //console.log(res);
       if (res.code == 200) {
-        this.excelSortTag = true
-        this.excelSortTag2 = true
+        this.excelSortTag = false
+        this.excelSortTag2 = false
+        this.updateNodeTable();//更新元素表
       }
     },
     //#endregion