yangyj 2 жил өмнө
parent
commit
25409add0a

+ 18 - 14
src/views/manager/projectinfo/tree.vue

@@ -2665,20 +2665,21 @@ export default {
     async nodeInfoSave() {
       //节点参数弹框保存按钮
       if (this.nodeInfoTable) {
-        if (this.nodeInfoTable.length == 0) {
-          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
-            {
-              nodeId: this.jiedianId,
-              type: -1,
-            },
-          ]});
-          this.nodeInfoVisible = false;
-          this.$message({
-            type: "success",
-            message: "保存参数节点成功!",
-          });
-          return;
-        }
+        // if (this.nodeInfoTable.length == 0) {
+        //   await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
+        //     {
+        //       nodeId: this.jiedianId,
+        //       type: -1,
+        //     },
+        //   ]});
+        //   this.nodeInfoVisible = false;
+        //   this.delIds=[];
+        //   this.$message({
+        //     type: "success",
+        //     message: "保存参数节点成功!",
+        //   });
+        //   return;
+        // }
         console.log(this.namelist)
         let tag = true;
         this.nodeInfoTable.forEach((val) => {
@@ -2698,6 +2699,7 @@ export default {
         if (tag) {
           await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.nodeInfoTable,type:1,delIds:this.delids});
           this.nodeInfoVisible = false;
+          this.delIds=[];
           this.$message({
             type: "success",
             message: "设置参数节点成功!",
@@ -2727,6 +2729,7 @@ export default {
         if (tag) {
           await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.namelists,type:0,delIds:this.delids}); //保存设置参数
           this.infoNameVisible = false;
+          this.delIds=[];
           this.keymap();
         } else {
           this.$message({
@@ -2757,6 +2760,7 @@ export default {
     async saveOrUpdateBatch(da) {
       //保存
       const { data: res } = await saveOrUpdateBatch(da);
+      this.delids=[];
       console.log(res);
     },
     async keymap() {

+ 20 - 16
src/views/manager/wbsinfo/edit.vue

@@ -2662,20 +2662,21 @@ export default {
     },
     async nodeInfoSave () {//节点参数弹框保存按钮
       if (this.nodeInfoTable) {
-        if(this.nodeInfoTable.length == 0){
-          await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
-            {
-              nodeId: this.jiedianId,
-              type: -1,
-            },
-          ]})
-          this.nodeInfoVisible = false
-          this.$message({
-            type: "success",
-            message: "保存参数节点成功!"
-          })
-          return;
-        }
+        // if(this.nodeInfoTable.length == 0){
+        //   await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,type:1,delIds:this.delids,wps:[
+        //     {
+        //       nodeId: this.jiedianId,
+        //       type: -1,
+        //     },
+        //   ]})
+        //   this.delIds=[];
+        //   this.nodeInfoVisible = false
+        //   this.$message({
+        //     type: "success",
+        //     message: "保存参数节点成功!"
+        //   })
+        //   return;
+        // }
 
         let tag = true
         this.nodeInfoTable.forEach(val => {
@@ -2695,7 +2696,8 @@ export default {
         })
         if (tag) {
           await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.nodeInfoTable,type:1,delIds:this.delids})
-          this.nodeInfoVisible = false
+          this.nodeInfoVisible = false;
+          this.delIds=[]
           this.$message({
             type: "success",
             message: "设置参数节点成功!"
@@ -2723,7 +2725,8 @@ export default {
         })
         if (tag) {
           await this.saveOrUpdateBatch({projectId:this.projectid,nodeId:this.jiedianId,wps:this.namelists,type:0,delIds:this.delids}) //保存设置参数
-          this.infoNameVisible = false
+          this.infoNameVisible = false;
+          this.delIds=[];
           this.keymap()
         } else {
           this.$message({
@@ -2751,6 +2754,7 @@ export default {
     },
     async saveOrUpdateBatch (da) {//保存
       const { data: res } = await saveOrUpdateBatch(da)
+      this.delids=[];
       //console.log(res);
     },
     async keymap () {//节点参数枚举

+ 1 - 2
vue.config.js

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