王通 2 lat temu
rodzic
commit
2bd287bffb
1 zmienionych plików z 23 dodań i 21 usunięć
  1. 23 21
      src/views/firespread.vue

+ 23 - 21
src/views/firespread.vue

@@ -2768,28 +2768,30 @@ findUserByDept
           })
 
         } else if (eventStatus == 'gd') {
-          let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
-          let number = /^[+]{0,1}(\d+)$/g;    //正整数
+          if(this.eventTypeXl == 101) {
+            let double = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;    //数字和两位小数
+            let number = /^[+]{0,1}(\d+)$/g;    //正整数
 
-          if(!double.test(that.table2.areaTotal)){
-            that.$message.error(`面积只能填写到小数后两位!`)
-            return
-          }
-          if(!number.test(that.table2.peopleTotal)){
-            that.$message.error(`人员请填写正整数!`)
-            return
-          }
-          if(that.table2.forestComposition == '' || that.table2.forestComposition==null){
-            that.$message.error(`林木组成不能为空!`)
-            return
-          }
-          if(that.table2.forestToken == '' || that.table2.forestToken==null){
-            that.$message.error(`林令不能为空!`)
-            return
-          }
-          if(that.table2.porosities == '' || that.table2.porosities==null){
-            that.$message.error(`疏密度不能为空!`)
-            return
+            if (!double.test(that.table2.areaTotal)) {
+              that.$message.error(`面积只能填写到小数后两位!`)
+              return
+            }
+            if (!number.test(that.table2.peopleTotal)) {
+              that.$message.error(`人员请填写正整数!`)
+              return
+            }
+            if (that.table2.forestComposition == '' || that.table2.forestComposition == null) {
+              that.$message.error(`林木组成不能为空!`)
+              return
+            }
+            if (that.table2.forestToken == '' || that.table2.forestToken == null) {
+              that.$message.error(`林令不能为空!`)
+              return
+            }
+            if (that.table2.porosities == '' || that.table2.porosities == null) {
+              that.$message.error(`疏密度不能为空!`)
+              return
+            }
           }
 
           //事件处理流程--归档