ソースを参照

Merge remote-tracking branch 'origin/visu_environment_01_siping_2.5d' into visu_environment_01_siping_2.5d

limeng 2 年 前
コミット
00ba1b1814
4 ファイル変更44 行追加24 行削除
  1. 3 3
      src/views/datacenter.vue
  2. 21 14
      src/views/eventLogUpload.vue
  3. 9 1
      src/views/firespread.vue
  4. 11 6
      src/views/monitor.vue

+ 3 - 3
src/views/datacenter.vue

@@ -229,7 +229,7 @@ export default {
         },
         dataZoom: [
           {
-            show: true,
+            show: this.source.length > 8 ? true : false,
             type: "slider",
             yAxisIndex: 0,
             left: 0,
@@ -345,9 +345,9 @@ export default {
             "icon",
             icon
           );
-          
+
           that.$set(that.resourcesList[index], "bg", getIconBg(icon));
-          
+
           // if(index < 5){
           //   // that.fireControlViewPoint(data.type, 'undefined');
           //   that.indentleftSetMarkers(data.type, '所有');

+ 21 - 14
src/views/eventLogUpload.vue

@@ -123,22 +123,29 @@ export default {
   methods: {
     submitUpload() {
       let fileUrl=[]
-      if(this.fileList!=null&&this.fileList.length>0){
-        for (let i = 0; i < this.fileList.length; i++) {
-          let file={attachPath:this.fileList[i].url,fileName:this.fileList[i].webName,busIndx:  "bus_indx_forest",busSource: "PC"}
-          fileUrl.push(file)
+      if (this.fileList!=null&&this.fileList.length>0)
+      {
+        if(this.fileList!=null&&this.fileList.length>0){
+          for (let i = 0; i < this.fileList.length; i++) {
+            let file={attachPath:this.fileList[i].url,fileName:this.fileList[i].webName,busIndx:  "bus_indx_forest",busSource: "PC"}
+            fileUrl.push(file)
+          }
         }
+        let param={ eventCode:this.eventCode,operation:"bus_oper_type_2",operationType:"log_oper_type_1",fileList: fileUrl }
+        //日志文件上传
+        eventLogUpload(param).then(res => {
+          if(res.code==200){
+            this.$message.success(`上传成功!`);
+            this.showEventLogUpload = false
+            this.cancelEventLogUploadShow();
+            this.$parent.refreshEventDialog(this.eventCode)
+          }
+        })
+      }else {
+        this.$message.warning(`请先上传文件!`);
       }
-      let param={ eventCode:this.eventCode,operation:"bus_oper_type_2",operationType:"log_oper_type_1",fileList: fileUrl }
-      //日志文件上传
-      eventLogUpload(param).then(res => {
-        if(res.code==200){
-          this.$message.success(`上传成功!`);
-          this.showEventLogUpload = false
-          this.cancelEventLogUploadShow();
-          this.$parent.refreshEventDialog(this.eventCode)
-        }
-      })
+
+
     },
     eventLogUpload(eventCode) {
       this.eventCode=eventCode

+ 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