瀏覽代碼

修改BUG

彭宇 2 年之前
父節點
當前提交
31f30eb625
共有 1 個文件被更改,包括 28 次插入32 次删除
  1. 28 32
      src/views/eventdetailsdialog.vue

+ 28 - 32
src/views/eventdetailsdialog.vue

@@ -1713,13 +1713,12 @@ export default {
         this.eventDialog = true
         this.eventLogList = res.data.eventlog//日志列表
         this.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
-        if (res.data.catalogue != null && res.data.catalogue.length > 0) {
-          this.address = res.data.catalogue[0].address
-          this.eventStatusValue = res.data.catalogue[0].eventStatusValue
-          this.eventType = res.data.catalogue[0].eventType
-          this.eventId = res.data.catalogue[0].id
-          this.longitude = res.data.catalogue[0].longitude
-          this.latitude = res.data.catalogue[0].latitude
+          this.address = res.data.catalogue.address
+          this.eventStatusValue = res.data.catalogue.eventStatusValue
+          this.eventType = res.data.catalogue.eventType
+          this.eventId = res.data.catalogue.id
+          this.longitude = res.data.catalogue.longitude
+          this.latitude = res.data.catalogue.latitude
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
@@ -1731,20 +1730,20 @@ export default {
             isAggregation: false,
             radius: 0
           }
-          if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_1' && res.data.catalogue[0].urgeCount == 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[0].eventStatusValue == 'forest_event_status_1' && res.data.catalogue[0].urgeCount > 0) {
+          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[0].eventStatusValue == 'forest_event_status_2') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
             markersMap.icon = 'sj-icon-map-qianshou'
-          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_5') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
             markersMap.icon = 'sj-icon-map-banjie'
-          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_6') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
             markersMap.icon = 'sj-icon-map-guidang'
           }
-          markersMap.lng = res.data.catalogue[0].longitude
-          markersMap.lat = res.data.catalogue[0].latitude
+          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
           }
@@ -1752,9 +1751,8 @@ export default {
             that.$refs.supermapDialog.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
             that.$refs.supermapDialog.clearM(false)
             that.$refs.supermapDialog.setMarkersRadius([markersMap])
-            that.$refs.supermapDialog.dropLocation(res.data.catalogue[0].latitude, res.data.catalogue[0].longitude)
+            that.$refs.supermapDialog.dropLocation(res.data.catalogue.latitude, res.data.catalogue.longitude)
           }, 2000)
-        }
         if (res.data.centermonitorTCamera != null) {
           let markersMap = {
             lng: 124.59,
@@ -1793,13 +1791,12 @@ export default {
         this.eventDialog = true
         this.eventLogList = res.data.eventlog
         this.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
-        if (res.data.catalogue != null && res.data.catalogue.length > 0) {
-          this.address = res.data.catalogue[0].address
-          this.eventStatusValue = res.data.catalogue[0].eventStatusValue
-          this.eventType = res.data.catalogue[0].eventType
-          this.eventId = res.data.catalogue[0].id
-          this.latitude = res.data.catalogue[0].latitude
-          this.longitude = res.data.catalogue[0].longitude
+          this.address = res.data.catalogue.address
+          this.eventStatusValue = res.data.catalogue.eventStatusValue
+          this.eventType = res.data.catalogue.eventType
+          this.eventId = res.data.catalogue.id
+          this.latitude = res.data.catalogue.latitude
+          this.longitude = res.data.catalogue.longitude
           let markersMap = {
             lng: 124.59,
             lat: 43.02,
@@ -1811,20 +1808,20 @@ export default {
             isAggregation: false,
             radius: 0
           }
-          if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_1' && res.data.catalogue[0].urgeCount == 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[0].eventStatusValue == 'forest_event_status_1' && res.data.catalogue[0].urgeCount > 0) {
+          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[0].eventStatusValue == 'forest_event_status_2') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_2') {
             markersMap.icon = 'sj-icon-map-qianshou'
-          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_5') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_5') {
             markersMap.icon = 'sj-icon-map-banjie'
-          } else if (res.data.catalogue[0].eventStatusValue == 'forest_event_status_6') {
+          } else if (res.data.catalogue.eventStatusValue == 'forest_event_status_6') {
             markersMap.icon = 'sj-icon-map-guidang'
           }
-          markersMap.lng = res.data.catalogue[0].longitude
-          markersMap.lat = res.data.catalogue[0].latitude
+          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
           }
@@ -1835,9 +1832,8 @@ export default {
             } else {
               that.$refs.supermapDialog.setMarkers([markersMap])
             }
-            that.$refs.supermapDialog.dropLocation(res.data.catalogue[0].latitude, res.data.catalogue[0].longitude)
+            that.$refs.supermapDialog.dropLocation(res.data.catalogue.latitude, res.data.catalogue.longitude)
           }, 2000)
-        }
         if (res.data.centermonitorTCamera != null) {
           let markersMap = {
             lng: 124.59,