Browse Source

节点参数

yangyj 2 years ago
parent
commit
a54cd5c304
4 changed files with 17 additions and 12 deletions
  1. 2 0
      .gitignore
  2. 4 3
      src/views/manager/projectinfo/tree.vue
  3. 9 7
      src/views/manager/wbsinfo/edit.vue
  4. 2 2
      vue.config.js

+ 2 - 0
.gitignore

@@ -24,3 +24,5 @@ yarn-error.log*
 *.sw*
 *.lock
 workspace.code-workspace
+vue.config.js
+.gitignore

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

@@ -2631,9 +2631,10 @@ export default {
         k: "",
         v: "",
         remark: "",
-        wbsId: this.jiedianId,
+        nodeId: this.jiedianId,
         type: 1,
       });
+      console.log(this.nodeInfoTable)
     },
     delNodeInfo(key) {
       //设置参数名称中的删除按钮
@@ -2670,7 +2671,7 @@ export default {
           });
           return;
         }
-
+        console.log(this.namelist)
         let tag = true;
         this.nodeInfoTable.forEach((val) => {
           if (!val.k | !val.v) {
@@ -2716,7 +2717,7 @@ export default {
           }
         });
         if (tag) {
-          await this.saveOrUpdateBatch(this.namelists); //保存设置参数
+          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.namelists}); //保存设置参数
           this.infoNameVisible = false;
           this.keymap();
         } else {

+ 9 - 7
src/views/manager/wbsinfo/edit.vue

@@ -2644,7 +2644,7 @@ export default {
       this.nodeInfoVisible = true;
     },
     addNodeInfoTable () {//添加节点参数数据
-      this.nodeInfoTable.unshift({ k: '', v: '', remark: '', wbsId: this.jiedianId,type: 1 })
+      this.nodeInfoTable.unshift({ k: '', v: '', remark: '', nodeId: this.jiedianId,type: 1 })
     },
     delNodeInfo (key) {//设置参数名称中的删除按钮
       this.namelists.splice(key, 1)
@@ -2663,10 +2663,12 @@ export default {
     async nodeInfoSave () {//节点参数弹框保存按钮
       if (this.nodeInfoTable) {
         if(this.nodeInfoTable.length == 0){
-          await this.saveOrUpdateBatch([{
-            "wbsId": this.jiedianId,
-            "type": -1,
-          }])
+          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:[
+            {
+              nodeId: this.jiedianId,
+              type: -1,
+            },
+          ]})
           this.nodeInfoVisible = false
           this.$message({
             type: "success",
@@ -2692,7 +2694,7 @@ export default {
 
         })
         if (tag) {
-          await this.saveOrUpdateBatch(this.nodeInfoTable)
+          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.nodeInfoTable})
           this.nodeInfoVisible = false
           this.$message({
             type: "success",
@@ -2720,7 +2722,7 @@ export default {
           }
         })
         if (tag) {
-          await this.saveOrUpdateBatch(this.namelists) //保存设置参数
+          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.namelists}) //保存设置参数
           this.infoNameVisible = false
           this.keymap()
         } else {

+ 2 - 2
vue.config.js

@@ -27,8 +27,8 @@ module.exports = {
             '/api': {
                 //本地服务接口地址
                 // target: 'http://192.168.3.64',
-                target: 'http://47.110.251.215:8090',
-                //  target: 'http://192.168.1.179',
+                // target: 'http://47.110.251.215:8090',
+                 target: 'http://192.168.1.179',
                 // target: 'http://192.168.0.108',
                 // target: 'http://192.168.31.96',
                 //远程演示服务地址,可用于直接启动项目