zhangh vor 2 Jahren
Ursprung
Commit
aa2c404854

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

@@ -185,4 +185,13 @@ export const wbsTreePrivateSort = (data) => {
         method: 'post',
         method: 'post',
         data
         data
     })
     })
+}
+
+// 节点参数列表
+export const parameters = (params) => {
+    return request({
+        url: '/api/blade-manager/param/list',
+        method: 'get',
+        params
+    })
 }
 }

+ 22 - 10
src/views/manager/contractinfo/detail.vue

@@ -567,6 +567,7 @@ export default {
       callback();
       callback();
     };
     };
     return {
     return {
+      postIdss: '',
       //#region
       //#region
       pageindx: 1,
       pageindx: 1,
       pagesize: 10,
       pagesize: 10,
@@ -673,6 +674,7 @@ export default {
       }
       }
     },
     },
     rId: function () {
     rId: function () {
+      this.postIdss = ''
       this.postId = ''
       this.postId = ''
       this.roleList.forEach(val => {
       this.roleList.forEach(val => {
         if (val.id === this.rId) {
         if (val.id === this.rId) {
@@ -681,8 +683,10 @@ export default {
           } else {
           } else {
             this.postList = []
             this.postList = []
           }
           }
-        } else {
-          this.findAllUserByCondition(this.rId)
+          if (val.roleName === '超级管理员') {
+            this.postIdss = this.rId
+            this.findAllUserByCondition(this.rId)
+          }
         }
         }
       })
       })
     },
     },
@@ -937,21 +941,29 @@ export default {
         });
         });
         return;
         return;
       }
       }
-      if (!this.postId) {
-        this.$message({
-          type: "warning",
-          message: "请先选择岗位再进行添加"
-        });
-        return;
+      let roleId = ''
+      if (!this.postIdss) {
+        if (!this.postId) {
+          this.$message({
+            type: "warning",
+            message: "请先选择岗位再进行添加"
+          });
+          return;
+        } else {
+          roleId = this.postId
+        }
+      } else {
+        roleId = this.postIdss
       }
       }
+
       let list = [{
       let list = [{
         projectId: this.pid,
         projectId: this.pid,
         contractId: this.contractForm.id,
         contractId: this.contractForm.id,
         userId: this.userId,
         userId: this.userId,
-        roleId: this.postId,
+        roleId: roleId,
       }];
       }];
       saveUserInfoByProjectTow(list).then(() => {
       saveUserInfoByProjectTow(list).then(() => {
-        // this.findAllUserByCondition();
+        this.findAllUserByCondition(this.rId);
       })
       })
     },
     },
 
 

+ 33 - 3
src/views/manager/projectinfo/tree.vue

@@ -138,7 +138,7 @@
                           icon="el-icon-coin"
                           icon="el-icon-coin"
                         >元素设置</el-dropdown-item>
                         >元素设置</el-dropdown-item>
                         <el-dropdown-item
                         <el-dropdown-item
-                          @click.native="nodeInfo(data,node)"
+                          @click.native="nodeInfo(data)"
                           icon="el-icon-help"
                           icon="el-icon-help"
                         >节点参数</el-dropdown-item>
                         >节点参数</el-dropdown-item>
                         <el-dropdown-item
                         <el-dropdown-item
@@ -1172,9 +1172,17 @@
       :visible.sync="infoNameVisible"
       :visible.sync="infoNameVisible"
       width="800px"
       width="800px"
       append-to-body
       append-to-body
+      class="jiedian"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
     >
     >
       <div>
       <div>
+        <div class="flexEnd">
+          <i
+            class="el-icon-circle-plus marbottom10"
+            @click="setParameterName()"
+            style="font-size:24px;color:rgb(37, 193, 99);cursor: pointer;"
+          ></i>
+        </div>
         <el-table
         <el-table
           :data="namelist"
           :data="namelist"
           border
           border
@@ -1255,6 +1263,7 @@
         slot="footer"
         slot="footer"
         class="dialog-footer"
         class="dialog-footer"
       >
       >
+        <el-button @click="addParameterName()">保 存</el-button>
         <el-button @click="infoNameVisible = false">关 闭</el-button>
         <el-button @click="infoNameVisible = false">关 闭</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
@@ -1267,7 +1276,7 @@ import ManualSorting from '@/components/WbsTree/ManualSorting'
 import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
 import dynamicExcel from "./treeTemplate/dynamicExcel.vue";
 import {
 import {
   saveFormAndElement, selectFormElements,
   saveFormAndElement, selectFormElements,
-  importWbsTree, findWbsTreePrivateSameLevel, wbsTreePrivateSort
+  importWbsTree, findWbsTreePrivateSameLevel, wbsTreePrivateSort, parameters
 } from "@/api/manager/wbstree";
 } from "@/api/manager/wbstree";
 import {
 import {
   saveElement, remove as removeElement, updateBatchElements, getTemplate,
   saveElement, remove as removeElement, updateBatchElements, getTemplate,
@@ -1791,7 +1800,9 @@ export default {
       this.upFile = file;
       this.upFile = file;
     },
     },
 
 
-    nodeInfo () {
+    nodeInfo (data) {
+      console.log(data);
+      this.parameters(data.primaryKeyId)
       this.nodeInfoVisible = true;
       this.nodeInfoVisible = true;
     },
     },
     nodeInfoSave () {
     nodeInfoSave () {
@@ -2091,6 +2102,19 @@ export default {
     addNodeInfoTable () {//添加节点参数数据
     addNodeInfoTable () {//添加节点参数数据
       this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
       this.nodeInfoTable.unshift({ name: '', value: '', describe: '' })
     },
     },
+    async parameters (wbsId) {
+      const { data: res } = await parameters({ wbsId })
+      console.log(res);
+      if (res.code == 200) {
+        this.nodeInfoTable = res.data
+      }
+    },
+    //#endregion
+
+    //#region 
+    async setParameterName () {
+      this.namelist.unshift({ name: '', remark: '', k: '' })
+    },
     //#endregion
     //#endregion
 
 
     //#region 调整表单
     //#region 调整表单
@@ -2111,6 +2135,12 @@ export default {
       this.excelHtml = false
       this.excelHtml = false
     },
     },
     //#endregion
     //#endregion
+
+    //#region 编辑元素
+    rightClick () {
+
+    },
+    //#endregion
   },
   },
   watch: {
   watch: {
     'GLExcelFrom.search' (val) {
     'GLExcelFrom.search' (val) {

+ 2 - 1
vue.config.js

@@ -27,7 +27,8 @@ module.exports = {
             '/api': {
             '/api': {
                 //本地服务接口地址
                 //本地服务接口地址
                 // target: 'http://localhost',
                 // target: 'http://localhost',
-                target: 'http://192.168.4.12',
+                // target: 'http://192.168.4.6',
+                target: 'http://47.110.251.215',
                 // target: 'http://192.168.4.44',
                 // target: 'http://192.168.4.44',
                 //远程演示服务地址,可用于直接启动项目
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',
                 //target: 'https://saber.bladex.vip/api',