ソースを参照

修改保存判断条件

gangyj 3 年 前
コミット
5d485246bb
1 ファイル変更6 行追加1 行削除
  1. 6 1
      src/views/exctab/ElementIdentification/index.vue

+ 6 - 1
src/views/exctab/ElementIdentification/index.vue

@@ -526,7 +526,7 @@ export default {
     },
     saveElementMD () {//保存按钮
       if (this.addElementForm.wbsId) {
-        if (this.addTableData.length > 0) {
+        if (this.tableData.length > 0) {
           let tag = false
           this.addTableData.forEach(val => {
             if ((val.checknd == true && val.isLinkTable != 2) || (val.checknd == false && val.isLinkTable == 2)) {
@@ -551,6 +551,11 @@ export default {
               })
             }
           }
+        }else{
+          this.$message({
+          type: 'error',
+          message: '至少有一个元素才可以保存'
+        })
         }
       } else {
         this.$message({