Bladeren bron

删除refreshEvent接口

王通 1 jaar geleden
bovenliggende
commit
c59f1224cf
3 gewijzigde bestanden met toevoegingen van 49 en 289 verwijderingen
  1. 23 143
      src/views/eventdetailsdialog.vue
  2. 20 140
      src/views/firespread.vue
  3. 6 6
      src/views/forest.vue

+ 23 - 143
src/views/eventdetailsdialog.vue

@@ -2572,7 +2572,7 @@ export default {
       // this.cancelEventShow();
       this.eventDialog = false;
 
-      this.$emit("showEventDialog", this.eventCode);
+      this.$emit("showEventDialog", this.eventCode,true);
     },
     showTVWallDiaLog() {
       this.initByCameras();
@@ -2709,7 +2709,7 @@ export default {
           //事件调整关联预案
           if (res.code == 200) {
             this.$message.success(`预案调整成功!`);
-            this.refreshEventDialog(this.eventCode);
+            this.showEventDialog(that.eventCode,false);
             this.sendGuanLianYuAn = null;
             this.showGuanLianYuAnConfirm = false;
           }
@@ -3322,7 +3322,7 @@ export default {
               sendTask(param).then((res) => {
                 if (res.code == 200) {
                   that.$message.success(`联动发起成功!`);
-                  that.refreshEventDialog(that.eventCode);
+                  this.showEventDialog(that.eventCode,false);
                   that.cancelEventConfirm_send();
                   that.showEventConfirm = false;
                 }
@@ -3387,7 +3387,7 @@ export default {
           updateCentereventTEventcatalogueStatus(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm_gd = false;
               that.$emit("getEventList", that.calendarDay, 10, 1);
@@ -3395,7 +3395,7 @@ export default {
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
           });
@@ -3422,13 +3422,13 @@ export default {
           eventExamine(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
             that.attachExamine = [];
@@ -3458,13 +3458,13 @@ export default {
           eventExamine(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
             that.attachExamine = [];
@@ -3475,7 +3475,7 @@ export default {
           eventHandling(that.eventId, that.eventCode).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             }
@@ -3527,11 +3527,12 @@ export default {
                 this.eventDialog = false;
                 return;
               }
-              that.refreshEvent(that.eventCode);
+              //that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
           });
@@ -3576,12 +3577,15 @@ export default {
       this.eventLogList = [];
       this.mapToolShow = false;
     },
-    showEventDialog(eventCode) {
-      this.mapToolShow=false
-      this.mapToolCheckItem = [];
-      this.mapToolCheckAll=false
-      this.mapToolShowBH=false,
-        this.fireControlViewList();
+    showEventDialog(eventCode,index) {
+      if(index)
+      {
+        this.mapToolShow=false
+        this.mapToolCheckItem = [];
+        this.mapToolCheckAll=false
+        this.mapToolShowBH=false,
+          this.fireControlViewList();
+      }
       this.eventCode = eventCode;
       let that = this;
       //获取事件详情
@@ -3705,130 +3709,6 @@ export default {
         }, 2000);
       });
     },
-    refreshEvent(eventCode) {
-      this.eventCode = eventCode;
-      let that = this;
-      //刷新--事件详情
-      getEventDetail({
-        eventCode: eventCode,
-      }).then((res) => {
-        let markersMapList = [];
-        that.eventDialog = true;
-        that.eventLogList = res.data.eventlog;
-        that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo; //应急预案
-        that.address = res.data.catalogue.address;
-        that.eventStatusValue = res.data.catalogue.eventStatusValue;
-        that.eventType = res.data.catalogue.eventType;
-        that.statusFlag = res.data.catalogue.statusFlag;
-        that.dataStatus = res.data.catalogue.dataStatus;
-        that.deptId = res.data.catalogue.deptId;
-        that.eventId = res.data.catalogue.id;
-        that.latitude = res.data.catalogue.latitude;
-        that.longitude = res.data.catalogue.longitude;
-        that.eventName = res.data.catalogue.eventName;
-        that.version = res.data.catalogue.version;
-        that.eventTypeXl = res.data.catalogue.eventTypeXl;
-        that.isExamine = res.data.catalogue.isExamine;
-        let markersMap = {
-          lng: 124.59,
-          lat: 43.02,
-          icon: "marker",
-          bindPopupHtml: "",
-          click: "",
-          parameter: "",
-          keepBindPopup: false,
-          isAggregation: true,
-          radius: 0,
-        };
-        if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_1" &&
-          res.data.catalogue.urgeCount == 0
-        ) {
-          markersMap.icon = "sj-icon-map-xinshangbao";
-        }
-        if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_1" &&
-          res.data.catalogue.urgeCount > 0
-        ) {
-          markersMap.icon = "sj-icon-map-cuiban";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_2"
-        ) {
-          markersMap.icon = "sj-icon-map-qianshou";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_5"
-        ) {
-          markersMap.icon = "sj-icon-map-banjie";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_6"
-        ) {
-          markersMap.icon = "sj-icon-map-guidang";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_7"
-        ) {
-          markersMap.icon = "sj-icon-map-queren";
-        }
-        markersMap.lng = res.data.catalogue.longitude;
-        markersMap.lat = res.data.catalogue.latitude;
-        if (
-          res.data.eventdetail != null &&
-          res.data.eventdetail.length > 0 &&
-          res.data.eventdetail[0].fireRadius != null &&
-          res.data.eventdetail[0].fireRadius != "" &&
-          res.data.eventdetail[0].fireRadius > 0
-        ) {
-          markersMap.radius = res.data.eventdetail[0].fireRadius;
-        }
-
-        markersMapList.push(markersMap);
-        if (res.data.centermonitorTCamera != null) {
-          that.cameraCode = res.data.centermonitorTCamera.id;
-          if(res.data.centermonitorTCamera.longitude != null && res.data.centermonitorTCamera.latitude != null){
-            that.centermonitorTCamera = res.data.centermonitorTCamera;
-            let markersMap = {
-              lng: 124.59,
-              lat: 43.02,
-              icon: "camera",
-              bindPopupHtml: "",
-              click: "preview",
-              parameter: {
-                code: res.data.centermonitorTCamera.cameraCode,
-                type: res.data.centermonitorTCamera.cameraFactory,
-                name: res.data.centermonitorTCamera.cameraName,
-              },
-              keepBindPopup: false,
-              isAggregation: true,
-              radius: 0,
-            };
-            markersMap.bindPopupHtml =
-              '<div class="map-tip">' +
-              "<span>" +
-              '                  <div class="d-l-con">' +
-              '                  <div class="d-l-l-text">' +
-              "                  <h4>摄像头名称:" +
-              res.data.centermonitorTCamera.cameraName +
-              "</h4>" +
-              "                </div>" +
-              "                </div>" +
-              "                </span>" +
-              "<span>" +
-              "</div>";
-            markersMap.lng = res.data.centermonitorTCamera.longitude;
-            markersMap.lat = res.data.centermonitorTCamera.latitude;
-            markersMapList.push(markersMap);
-          }
-        }
-        setTimeout(() => {
-          that.$refs.supermapDialog.clearM(false);
-          that.$refs.supermapDialog.clearM(true);
-          that.$refs.supermapDialog.setMarkersRadius(markersMapList);
-          that.$refs.supermapDialog.dropLocation10(
-            res.data.catalogue.latitude,
-            res.data.catalogue.longitude
-          );
-        }, 2000);
-      });
-    },
     refreshEventDialog(eventCode) {
       //刷新--事件日志12
       getEventDetail({
@@ -3883,7 +3763,7 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           this.$message.success(`截图上传成功!`);
-          this.refreshEventDialog(this.eventCode);
+          this.showEventDialog(that.eventCode,false);
         }
       });
     },

+ 20 - 140
src/views/firespread.vue

@@ -2350,7 +2350,7 @@ export default {
               sendTask(param).then((res) => {
                 if (res.code == 200) {
                   that.$message.success(`联动发起成功!`);
-                  that.refreshEventDialog(that.eventCode);
+                  this.showEventDialog(that.eventCode,false);
                   that.cancelEventConfirm_send();
                   that.showEventConfirm = false;
                 }
@@ -2415,7 +2415,7 @@ export default {
           updateCentereventTEventcatalogueStatus(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm_gd = false;
               that.$emit("getEventList", that.calendarDay, 10, 1);
@@ -2423,7 +2423,7 @@ export default {
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
           });
@@ -2450,13 +2450,13 @@ export default {
           eventExamine(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
             that.attachExamine = [];
@@ -2486,13 +2486,13 @@ export default {
           eventExamine(param).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
             that.attachExamine = [];
@@ -2503,7 +2503,7 @@ export default {
           eventHandling(that.eventId, that.eventCode).then((res) => {
             if (res.code == 200) {
               that.$message.success(`处理成功!`);
-              that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
               that.cancelEventConfirm_send();
               that.showEventConfirm = false;
             }
@@ -2555,11 +2555,12 @@ export default {
                 this.eventDialog = false;
                 return;
               }
-              that.refreshEvent(that.eventCode);
+              //that.refreshEvent(that.eventCode);
+              this.showEventDialog(that.eventCode,false);
             } else if (res.code == 304) {
               console.log(that.eventCode);
               this.$message.warning(res.msg);
-              this.showEventDialog(that.eventCode);
+              this.showEventDialog(that.eventCode,true);
               //获取事件详情
             }
           });
@@ -2605,12 +2606,15 @@ export default {
       console.log('关闭事件弹窗')
       this.eventLogList = []
     },
-    showEventDialog(eventCode) {
-      this.mapToolShow=false
-      this.mapToolCheckItem = [];
-      this.mapToolCheckAll=false
-      this.mapToolShowBH=false,
-        this.fireControlViewList();
+    showEventDialog(eventCode,index) {
+      if(index)
+      {
+        this.mapToolShow=false
+        this.mapToolCheckItem = [];
+        this.mapToolCheckAll=false
+        this.mapToolShowBH=false,
+          this.fireControlViewList();
+      }
       this.eventCode = eventCode;
       let that = this;
       //获取事件详情
@@ -2734,130 +2738,6 @@ export default {
         }, 2000);
       });
     },
-    refreshEvent(eventCode) {
-      this.eventCode = eventCode;
-      let that = this;
-      //刷新--事件详情
-      getEventDetail({
-        eventCode: eventCode,
-      }).then((res) => {
-        let markersMapList = [];
-        that.eventDialog = true;
-        that.eventLogList = res.data.eventlog;
-        that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo; //应急预案
-        that.address = res.data.catalogue.address;
-        that.eventStatusValue = res.data.catalogue.eventStatusValue;
-        that.eventType = res.data.catalogue.eventType;
-        that.statusFlag = res.data.catalogue.statusFlag;
-        that.dataStatus = res.data.catalogue.dataStatus;
-        that.deptId = res.data.catalogue.deptId;
-        that.eventId = res.data.catalogue.id;
-        that.latitude = res.data.catalogue.latitude;
-        that.longitude = res.data.catalogue.longitude;
-        that.eventName = res.data.catalogue.eventName;
-        that.version = res.data.catalogue.version;
-        that.eventTypeXl = res.data.catalogue.eventTypeXl;
-        that.isExamine = res.data.catalogue.isExamine;
-        let markersMap = {
-          lng: 124.59,
-          lat: 43.02,
-          icon: "marker",
-          bindPopupHtml: "",
-          click: "",
-          parameter: "",
-          keepBindPopup: false,
-          isAggregation: true,
-          radius: 0,
-        };
-        if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_1" &&
-          res.data.catalogue.urgeCount == 0
-        ) {
-          markersMap.icon = "sj-icon-map-xinshangbao";
-        }
-        if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_1" &&
-          res.data.catalogue.urgeCount > 0
-        ) {
-          markersMap.icon = "sj-icon-map-cuiban";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_2"
-        ) {
-          markersMap.icon = "sj-icon-map-qianshou";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_5"
-        ) {
-          markersMap.icon = "sj-icon-map-banjie";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_6"
-        ) {
-          markersMap.icon = "sj-icon-map-guidang";
-        } else if (
-          res.data.catalogue.eventStatusValue == "forest_event_status_7"
-        ) {
-          markersMap.icon = "sj-icon-map-queren";
-        }
-        markersMap.lng = res.data.catalogue.longitude;
-        markersMap.lat = res.data.catalogue.latitude;
-        if (
-          res.data.eventdetail != null &&
-          res.data.eventdetail.length > 0 &&
-          res.data.eventdetail[0].fireRadius != null &&
-          res.data.eventdetail[0].fireRadius != "" &&
-          res.data.eventdetail[0].fireRadius > 0
-        ) {
-          markersMap.radius = res.data.eventdetail[0].fireRadius;
-        }
-
-        markersMapList.push(markersMap);
-        if (res.data.centermonitorTCamera != null) {
-          that.cameraCode = res.data.centermonitorTCamera.id;
-          if(res.data.centermonitorTCamera.longitude != null && res.data.centermonitorTCamera.latitude != null){
-            that.centermonitorTCamera = res.data.centermonitorTCamera;
-            let markersMap = {
-              lng: 124.59,
-              lat: 43.02,
-              icon: "camera",
-              bindPopupHtml: "",
-              click: "preview",
-              parameter: {
-                code: res.data.centermonitorTCamera.cameraCode,
-                type: res.data.centermonitorTCamera.cameraFactory,
-                name: res.data.centermonitorTCamera.cameraName,
-              },
-              keepBindPopup: false,
-              isAggregation: true,
-              radius: 0,
-            };
-            markersMap.bindPopupHtml =
-              '<div class="map-tip">' +
-              "<span>" +
-              '                  <div class="d-l-con">' +
-              '                  <div class="d-l-l-text">' +
-              "                  <h4>摄像头名称:" +
-              res.data.centermonitorTCamera.cameraName +
-              "</h4>" +
-              "                </div>" +
-              "                </div>" +
-              "                </span>" +
-              "<span>" +
-              "</div>";
-            markersMap.lng = res.data.centermonitorTCamera.longitude;
-            markersMap.lat = res.data.centermonitorTCamera.latitude;
-            markersMapList.push(markersMap);
-          }
-        }
-        setTimeout(() => {
-          that.$refs.supermapDialog1.clearM(false);
-          that.$refs.supermapDialog1.clearM(true);
-          that.$refs.supermapDialog1.setMarkersRadius(markersMapList);
-          that.$refs.supermapDialog1.dropLocation10(
-            res.data.catalogue.latitude,
-            res.data.catalogue.longitude
-          );
-        }, 2000);
-      });
-    },
     refreshEventDialog(eventCode) {
       //刷新--事件日志12
       getEventDetail({

+ 6 - 6
src/views/forest.vue

@@ -650,16 +650,16 @@ export default {
     // },
     dropLocation(lat, lng,eventCode) {
       this.$refs.supermap.dropLocation(lat, lng,18)
-      this.showEventDialog(eventCode)
+      this.showEventDialog(eventCode,true)
     },
-    showEventDialog(eventCode) {
+    showEventDialog(eventCode,index) {
       //事件信息弹出
-      this.$refs.firespread.showEventDialog(eventCode)
+      this.$refs.firespread.showEventDialog(eventCode,index)
 
     },
-    getFirespread(eventCode) {
-      this.$refs.eventdetailsdialog.showEventDialog(eventCode);
-      this.$refs.eventdetailsdialog.fireControlViewList()
+    getFirespread(eventCode,index) {
+      this.$refs.eventdetailsdialog.showEventDialog(eventCode,true);
+      //this.$refs.eventdetailsdialog.fireControlViewList()
     },
     getCurrentDataStr() {
       let date = new Date()