Pārlūkot izejas kodu

Merge branch 'V0.0.6_iot' of http://10.87.21.221:8000/jzyd_yyds/soc_app into V0.0.6_iot

jiawuxian 1 gadu atpakaļ
vecāks
revīzija
6b19d92e71

+ 3 - 1
src/views/menu/problemItem/index.vue

@@ -209,7 +209,9 @@ export default {
         }
       });
       setTimeout(() => {
-        this.query.orgId = this.orgId;
+        if(!this.query.orgId){
+          this.query.orgId = this.orgId;
+        }        
       }, 200);
     },
     clickItem(id,type){

+ 13 - 1
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -406,8 +406,20 @@ export default {
       let startDate = JSON.parse(JSON.stringify(this.form.drillStartTime))
       startDate = Date.parse(new Date(startDate))
 
+      if(!startDate){
+        Toast('演练开始时间不能为空')
+        this.falg = true
+        return
+      }
+
       let endDate = JSON.parse(JSON.stringify(this.form.drillEndTime))
       endDate = Date.parse(new Date(endDate))
+
+      if(!endDate){
+        Toast('演练结束时间不能为空')
+        this.falg = true
+        return
+      }
       if (startDate >= endDate) {
         Toast('演练开始时间不能大于或等于演练结束时间')
         this.falg = true
@@ -467,7 +479,7 @@ export default {
           } else {
             this.beforSubmitV() //校验
             if (!this.falg) {
-              //校验通过触发
+            //校验通过触发
               this.$refs.form.validate().then(() => {
                 this.submitHandlerConfirm(type)
               })

+ 14 - 2
src/views/menu/training/components/addTraining.vue

@@ -368,8 +368,20 @@ export default {
       let startDate = JSON.parse(JSON.stringify(this.form.trainingStartDateTime))
       startDate = Date.parse(new Date(startDate))
 
+      if(!startDate){
+        Toast('演练开始时间不能为空')
+        this.falg = true
+        return
+      }
       let endDate = JSON.parse(JSON.stringify(this.form.trainingEndDateTime))
       endDate = Date.parse(new Date(endDate))
+
+      
+      if(!endDate){
+        Toast('演练结束时间不能为空')
+        this.falg = true
+        return
+      }
       if (startDate >= endDate) {
         Toast('开始时间不能大于或等于结束时间')
         this.falg = true
@@ -431,8 +443,8 @@ export default {
               //校验通过触发
               this.$refs.form.validate().then(() => {
                 this.submitHandlerConfirm(type)
-              })
-            }
+              })    
+            }       
           }
         })
         .catch(() => {