Forráskód Böngészése

模板节点节点参数配置-按钮loading、删除数据后提交失败bug修复

duy 1 hete
szülő
commit
eb2051dd85
1 módosított fájl, 19 hozzáadás és 12 törlés
  1. 19 12
      src/views/manager/projectinfo/tree.vue

+ 19 - 12
src/views/manager/projectinfo/tree.vue

@@ -5082,12 +5082,16 @@ async saveLinkTab() {
       });
     },
     delNodeInfo(key, obj) {
-      this.delids.push(obj.id);
+      if(obj.id){
+        this.delids.push(obj.id);
+      }      
       //设置参数名称中的删除按钮
       this.namelists.splice(key, 1);
     },
     delNodeInfoss(key, obj) {
-      this.delids.push(obj.id);
+      if(obj.id){
+        this.delids.push(obj.id);
+      }  
       //节点参数
       this.nodeInfoTable.splice(key, 1);
     },
@@ -5145,22 +5149,25 @@ async saveLinkTab() {
 
         if (tag) {
           this.nodeInfoSaveload = true;
-          await this.saveOrUpdateBatch({
+          this.saveOrUpdateBatch({
             scopeType: 10,
             projectId: this.projectid,
             nodeId: this.jiedianId,
             wps: this.nodeInfoTable,
             type: 1,
             delIds: this.delids,
-          });
-          this.delIds = [];
-          this.$message({
-            type: "success",
-            message: "设置参数节点成功!",
-          });
-          this.nodeInfoSaveload = false;
-          this.parameters(this.jiedianId);
-          // this.nodeInfoVisible = false;
+          }).then(()=>{
+            this.delIds = [];
+            this.$message({
+              type: "success",
+              message: "设置参数节点成功!",
+            });
+            this.nodeInfoSaveload = false;
+            this.parameters(this.jiedianId);
+            // this.nodeInfoVisible = false;
+          }).catch(()=>{
+            this.nodeInfoSaveload = false;
+          });          
         } else {
           this.$message({
             type: "error",