彭宇 3 rokov pred
rodič
commit
40a5bb73db
1 zmenil súbory, kde vykonal 59 pridanie a 0 odobranie
  1. 59 0
      src/views/event.vue

+ 59 - 0
src/views/event.vue

@@ -981,6 +981,65 @@
 
           }
           this.eventChart()
+
+          that.markersList = [];
+          that.eventList = [];
+          if(res.data.eventListAll!=null&&res.data.eventListAll.length>0){
+            for (let i = 0; i < res.data.eventListAll.length; i++) {
+              let markersMap = {
+                lng: 124.59,
+                lat: 43.02,
+                icon: 'marker',
+                bindPopupHtml: '',
+                click: '',
+                parameter: '',
+                keepBindPopup: false,
+                isAggregation: false
+              }
+              if(res.data.eventListAll.length>500){
+                markersMap.isAggregation = true
+              }
+              if(res.data.eventListAll[i].eventStatus=="event_event_status_1"||res.data.eventListAll[i].eventStatus=="event_event_status_2"||res.data.eventListAll[i].eventStatus=="event_event_status_6"){
+                markersMap.click = "showEventInfo_Processed"
+              }else if(res.data.eventListAll[i].eventStatus=="event_event_status_4"){
+                markersMap.click = "showEventInfo_notProcessed"
+              }
+              markersMap.parameter = res.data.eventListAll[i].id
+              markersMap.lng = res.data.eventListAll[i].longitude
+              markersMap.lat =res.data.eventListAll[i].latitude
+              markersMap.bindPopupHtml = '<div class="map-tip">' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>经纬度:' +res.data.eventListAll[i].longitude + ',' +res.data.eventListAll[i]
+                  .latitude + '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>事件名称:' +res.data.eventListAll[i].eventTitle + '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '<span>' +
+                '                  <div class="d-l-con">' +
+                '                  <div class="d-l-l-text">' +
+                '                  <h4>事件时间:' +res.data.eventListAll[i].reportTime + '</h4>' +
+                '                </div>' +
+                '                </div>' +
+                '                </span>' +
+                '</div>';
+              that.markersList.push(markersMap)
+            }
+            that.eventList=res.data.eventListAll;
+            setTimeout(() => {
+              that.$refs.supermap.clearM(false)
+              that.$refs.supermap.clearM(true)
+              that.$refs.supermap.setMarkers(that.markersList)
+            },1000)
+          }
         })
       },
       todayEventCountSetMarkers(eventStatus) {