Browse Source

修改事件资源落点聚合

彭宇 2 years ago
parent
commit
1a955fa06f
3 changed files with 49 additions and 67 deletions
  1. 2 2
      src/components/supermap.vue
  2. 21 27
      src/views/eventdetailsdialog.vue
  3. 26 38
      src/views/firespread.vue

+ 2 - 2
src/components/supermap.vue

@@ -636,7 +636,7 @@ export default {
             //设置为true时显示聚类所占据的范围
             showCoverageOnHover: true,
             //设置为true时会向低一级聚类缩放
-            zoomToBoundsOnClick: false,
+            zoomToBoundsOnClick: true,
             //增加点位时增加聚合动画(否则会出问题)
             animateAddingMarkers: true,
             //最大缩放级别点击聚合图标展开图标
@@ -702,7 +702,7 @@ export default {
         //设置为true时显示聚类所占据的范围
         showCoverageOnHover: true,
         //设置为true时会向低一级聚类缩放
-        zoomToBoundsOnClick: false,
+        zoomToBoundsOnClick: true,
         //增加点位时增加聚合动画(否则会出问题)
         animateAddingMarkers: true,
         //最大缩放级别点击聚合图标展开图标

+ 21 - 27
src/views/eventdetailsdialog.vue

@@ -2227,6 +2227,7 @@ console.log(this.dutysystemTableData)
       let that = this
       //获取事件详情
       getEventDetail({ eventCode: eventCode }).then(res => {
+        let markersMapList=[];
         that.eventDialog = true
         that.eventLogList = res.data.eventlog//日志列表
         that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
@@ -2271,13 +2272,7 @@ console.log(this.dutysystemTableData)
         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
         }
-        setTimeout(() => {
-           that.$refs.supermapDialog.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
-           that.$refs.supermapDialog.clearM(false)
-          that.$refs.supermapDialog.clearM(true)
-          that.$refs.supermapDialog.setMarkersRadius([markersMap])
-          that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
-        }, 2000)
+        markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
           that.cameraCode = res.data.centermonitorTCamera.id;
           let markersMap = {
@@ -2303,12 +2298,15 @@ console.log(this.dutysystemTableData)
             '</div>'
           markersMap.lng = res.data.centermonitorTCamera.longitude
           markersMap.lat = res.data.centermonitorTCamera.latitude
-          setTimeout(() => {
-            that.$refs.supermapDialog.clearM(false)
-            that.$refs.supermapDialog.clearM(true)
-            that.$refs.supermapDialog.setMarkers([markersMap])
-          }, 2000)
+          markersMapList.push(markersMap)
         }
+        setTimeout(() => {
+          that.$refs.supermapDialog.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
+          that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
+          that.$refs.supermapDialog.clearM(false)
+          that.$refs.supermapDialog.clearM(true)
+          that.$refs.supermapDialog.setMarkersRadius(markersMapList)
+        }, 2000)
       })
     },
     refreshEvent(eventCode) {
@@ -2316,6 +2314,7 @@ console.log(this.dutysystemTableData)
       let that = this
       //刷新--事件详情
       getEventDetail({ eventCode: eventCode }).then(res => {
+        let markersMapList=[];
         that.eventDialog = true
         that.eventLogList = res.data.eventlog
         that.visuForestCloudYuAnBo = res.data.visuForestCloudYuAnBo//应急预案
@@ -2360,16 +2359,8 @@ console.log(this.dutysystemTableData)
         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
         }
-        setTimeout(() => {
-          that.$refs.supermapDialog.clearM(false)
-          that.$refs.supermapDialog.clearM(true)
-          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) {
-            that.$refs.supermapDialog.setMarkersRadius([markersMap])
-          } else {
-            that.$refs.supermapDialog.setMarkers([markersMap])
-          }
-          that.$refs.supermapDialog.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
-        }, 2000)
+
+        markersMapList.push(markersMap)
         if (res.data.centermonitorTCamera != null) {
           let markersMap = {
             lng: 124.59,
@@ -2394,12 +2385,15 @@ console.log(this.dutysystemTableData)
             '</div>'
           markersMap.lng = res.data.centermonitorTCamera.longitude
           markersMap.lat = res.data.centermonitorTCamera.latitude
-          setTimeout(() => {
-            that.$refs.supermapDialog.clearM(false)
-            that.$refs.supermapDialog.clearM(true)
-            that.$refs.supermapDialog.setMarkers([markersMap])
-          }, 2000)
+
+          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) {

+ 26 - 38
src/views/firespread.vue

@@ -2868,23 +2868,26 @@ export default {
       this.eventLogList = []
     },
     showEventDialog(eventCode) {
-      this.getNewDataByDate(this.calendarDay)
+      this.fireControlViewList()
       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.longitude = res.data.catalogue.longitude
         that.latitude = res.data.catalogue.latitude
         that.eventName = res.data.catalogue.eventName
+        that.eventTypeXl = res.data.catalogue.eventTypeXl
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -2915,13 +2918,7 @@ export default {
         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
         }
-        setTimeout(() => {
-          that.$refs.supermapDialog1.dynamicPlotting()//弹出动态绘制窗口,防止截图位置改变
-          that.$refs.supermapDialog1.clearM(false)
-          that.$refs.supermapDialog1.clearM(true)
-          that.$refs.supermapDialog1.setMarkersRadius([markersMap])
-          that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
-        }, 2000)
+        markersMapList.push(markersMap);
         if (res.data.centermonitorTCamera != null) {
           that.cameraCode = res.data.centermonitorTCamera.id;
           let markersMap = {
@@ -2930,7 +2927,7 @@ export default {
             icon: 'camera',
             bindPopupHtml: '',
             click: 'preview',
-            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory,name:res.data.centermonitorTCamera.name},
+            parameter: {code:res.data.centermonitorTCamera.cameraCode,type:res.data.centermonitorTCamera.cameraFactory,name:res.data.centermonitorTCamera.cameraName},
             keepBindPopup: false,
             isAggregation: true,
             radius: 0
@@ -2947,40 +2944,36 @@ export default {
             '</div>'
           markersMap.lng = res.data.centermonitorTCamera.longitude
           markersMap.lat = res.data.centermonitorTCamera.latitude
-          setTimeout(() => {
-            that.$refs.supermapDialog1.clearM(false)
-            that.$refs.supermapDialog1.clearM(true)
-            that.$refs.supermapDialog1.setMarkers([markersMap])
-
-          }, 2000)
-          setTimeout(() => {
-            that.showheatPlotting()
-          }, 2000)
-          //  that.$refs.supermapDialog1.showheatPlotting(that.latitude, that.longitude,that.windSpeed,that.windDirection)
-
-          that.$refs.supermapDialog1.createHeatPoints()
-
+          markersMapList.push(markersMap)
         }
+        setTimeout(() => {
+          that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
+          that.$refs.supermapDialog1.clearM(false)
+          that.$refs.supermapDialog1.clearM(true)
+          that.$refs.supermapDialog1.setMarkersRadius(markersMapList)
+        }, 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.eventTypeXl = res.data.catalogue.eventTypeXl
         let markersMap = {
           lng: 124.59,
           lat: 43.02,
@@ -3011,16 +3004,8 @@ export default {
         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
         }
-        setTimeout(() => {
-          that.$refs.supermapDialog1.clearM(false)
-          that.$refs.supermapDialog1.clearM(true)
-          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) {
-            that.$refs.supermapDialog1.setMarkersRadius([markersMap])
-          } else {
-            that.$refs.supermapDialog1.setMarkers([markersMap])
-          }
-          that.$refs.supermapDialog1.dropLocation10(res.data.catalogue.latitude, res.data.catalogue.longitude)
-        }, 2000)
+
+        markersMapList.push(markersMap)
         if (res.data.centermonitorTCamera != null) {
           let markersMap = {
             lng: 124.59,
@@ -3045,12 +3030,15 @@ export default {
             '</div>'
           markersMap.lng = res.data.centermonitorTCamera.longitude
           markersMap.lat = res.data.centermonitorTCamera.latitude
-          setTimeout(() => {
-            that.$refs.supermapDialog1.clearM(false)
-            that.$refs.supermapDialog1.clearM(true)
-            that.$refs.supermapDialog1.setMarkers([markersMap])
-          }, 2000)
+
+          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) {