Ver Fonte

节点参数删除到空

gangyj há 2 anos atrás
pai
commit
d1cf891c1a

+ 13 - 0
src/views/manager/projectinfo/tree.vue

@@ -2567,6 +2567,19 @@ export default {
     },
     async nodeInfoSave () {//节点参数弹框保存按钮
       if (this.nodeInfoTable) {
+        if(this.nodeInfoTable.length == 0){
+          await this.saveOrUpdateBatch({
+            "wbsId": this.id,
+            "type": -1,
+          })
+          this.nodeInfoVisible = false
+          this.$message({
+            type: "success",
+            message: "保存参数节点成功!"
+          })
+          return;
+        }
+
         let tag = true
         this.nodeInfoTable.forEach(val => {
           if (!val.k | !val.v) {

+ 13 - 0
src/views/manager/wbsinfo/edit.vue

@@ -2589,6 +2589,19 @@ export default {
     },
     async nodeInfoSave () {//节点参数弹框保存按钮
       if (this.nodeInfoTable) {
+        if(this.nodeInfoTable.length == 0){
+          await this.saveOrUpdateBatch({
+            "wbsId": this.id,
+            "type": -1,
+          })
+          this.nodeInfoVisible = false
+          this.$message({
+            type: "success",
+            message: "保存参数节点成功!"
+          })
+          return;
+        }
+
         let tag = true
         this.nodeInfoTable.forEach(val => {
           if (!val.k | !val.v) {