Selaa lähdekoodia

修改事件资源落点聚合

彭宇 2 vuotta sitten
vanhempi
commit
db0a853ea5
3 muutettua tiedostoa jossa 61 lisäystä ja 78 poistoa
  1. 15 14
      src/components/supermap.vue
  2. 21 27
      src/views/eventdetailsdialog.vue
  3. 25 37
      src/views/firespread.vue

+ 15 - 14
src/components/supermap.vue

@@ -626,22 +626,23 @@ export default {
     /** ----------------------------------热力图  开始------------------------------------- */
     clearM: async function(isAggregation) { //清理地图标点
       if (isAggregation) {
+        debugger
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
           this.isAggregationMyGroup.clearLayers()
+          this.map.removeLayer(this.isAggregationLayers)
+          this.isAggregationLayers = []
+          this.radiusLayers = []
+          this.isAggregationLayers = window.L.markerClusterGroup({
+            //设置为true时显示聚类所占据的范围
+            showCoverageOnHover: true,
+            //设置为true时会向低一级聚类缩放
+            zoomToBoundsOnClick: true,
+            //增加点位时增加聚合动画(否则会出问题)
+            animateAddingMarkers: true,
+            //最大缩放级别点击聚合图标展开图标
+            spiderfyOnMaxZoom: true
+          })
         }
-        this.map.removeLayer(this.isAggregationLayers)
-        this.isAggregationLayers = []
-        this.radiusLayers = []
-        this.isAggregationLayers = window.L.markerClusterGroup({
-          //设置为true时显示聚类所占据的范围
-          showCoverageOnHover: true,
-          //设置为true时会向低一级聚类缩放
-          zoomToBoundsOnClick: false,
-          //增加点位时增加聚合动画(否则会出问题)
-          animateAddingMarkers: true,
-          //最大缩放级别点击聚合图标展开图标
-          spiderfyOnMaxZoom: true
-        })
       } else {
         if (this.myGroup != undefined && this.myGroup != false) {
           this.myGroup.clearLayers()
@@ -702,7 +703,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,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.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 +2299,16 @@ 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 +2316,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 +2361,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.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 +2386,14 @@ 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.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)
       })
     },
     refreshEventDialog(eventCode) {

+ 25 - 37
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,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.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 +2928,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 +2945,37 @@ 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 +3006,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.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 +3031,14 @@ 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.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)
       })
     },
     refreshEventDialog(eventCode) {