Explorar el Código

节点参数删除到空

gangyj hace 2 años
padre
commit
d1cf891c1a
Se han modificado 2 ficheros con 26 adiciones y 0 borrados
  1. 13 0
      src/views/manager/projectinfo/tree.vue
  2. 13 0
      src/views/manager/wbsinfo/edit.vue

+ 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) {