فهرست منبع

预案修改逻辑

王通 2 سال پیش
والد
کامیت
cd22d40c1d
2فایلهای تغییر یافته به همراه20 افزوده شده و 7 حذف شده
  1. 9 1
      src/views/firespread.vue
  2. 11 6
      src/views/monitor.vue

+ 9 - 1
src/views/firespread.vue

@@ -2351,12 +2351,20 @@ export default {
         }
       })
     },
+
     updateYjYuAn() {
-      if(this.eventStatusValue=='forest_event_status_1'){
+      if(this.eventStatusValue=='forest_event_status_1'||this.eventStatusValue=='forest_event_status_7') {
         this.$message.error(`修改预案信息在签收后方可修改!`)
         return
+      }else if(this.eventStatusValue=='forest_event_status_3'){
+        this.$message.error(`误报事件无法修改预案信息!`)
+        return
       }else{
         let param = { eventCode: this.eventCode, reserve: this.sendGuanLianYuAn }
+        if(this.sendGuanLianYuAn==''||this.sendGuanLianYuAn==null){
+          this.$message.error(`请选择预案信息!`)
+          return
+        }
         updateYjYuAn(param).then(res => {
           //事件调整关联预案
           if (res.code == 200) {

+ 11 - 6
src/views/monitor.vue

@@ -267,7 +267,7 @@ export default {
     // this.getSensorListByDeptIds()
     this.getMonitorDeviceAndDataLists();
     this.getDlblistBydeptIds();
-    this.chuanSet();
+    // this.chuanSet();
     this.selectDeviceType(-1);
     this.bottomMenuList(); //获取底部公共组件消息和任务
   },
@@ -275,6 +275,7 @@ export default {
     return {
       // 部门名称
       cgqData: [],
+      cgqTimer:null,
       deptName: undefined,
       deptId: "",
       // 部门树选项
@@ -360,10 +361,7 @@ export default {
     },
     chuanSet() {
       if (this.onChuan) {
-        let that = this;
-        setInterval(function () {
-          that.getMonitorDeviceAndDataList();
-        }, 20000);
+
       }
     },
     getMonitorDeviceAndDataList() {
@@ -818,6 +816,7 @@ export default {
       this.onShe = true;
       this.onChuan = false;
       this.localMark = "she";
+      clearInterval(this.cgqTimer);
       this.placeholderMsg = "请输入摄像头名称";
       this.selectDeviceType();
     },
@@ -827,6 +826,7 @@ export default {
       this.onChuan = false;
       this.localMark = "la";
       this.placeholderMsg = "请输入云广播名称";
+      clearInterval(this.cgqTimer);
       this.deptId = Cookies.get("deptId");
       this.getDlblistBydeptId();
     },
@@ -837,7 +837,12 @@ export default {
       this.localMark = "chuan";
       this.placeholderMsg = "请输入传感器名称";
       this.deptId = Cookies.get("deptId");
-      //this.getSensorListByDeptId()
+      let that = this;
+      this.getMonitorDeviceAndDataList();
+      clearInterval(this.cgqTimer);
+      this.cgqTimer = setInterval(() => {
+        that.getMonitorDeviceAndDataList();
+      }, 20 * 1000);
       this.getMonitorDeviceAndDataList();
     },
     //传感器2