Browse Source

聚合卡顿问题

彭宇 2 năm trước cách đây
mục cha
commit
221513c97d
1 tập tin đã thay đổi với 3 bổ sung6 xóa
  1. 3 6
      src/views/forest.vue

+ 3 - 6
src/views/forest.vue

@@ -560,24 +560,24 @@ export default {
             keepBindPopup: false,
             isAggregation: false
           }
-          if (this.eventList.length > 50) {
+          if (this.eventList.length > 200) {
             markersMap.isAggregation = true
           }
           if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-xinshangbao'
-            markersMap.isAggregation = false
           }
           if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-cuiban'
-            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-qianshou'
+            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_5') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-banjie'
+            markersMap.isAggregation = false
           } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
             markersMap.click = 'showEventDialog'
             markersMap.icon = 'sj-icon-map-guidang'
@@ -925,12 +925,10 @@ export default {
             if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-xinshangbao'
-              markersMap.isAggregation = true
             }
             if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-cuiban'
-              markersMap.isAggregation = true
             } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-qianshou'
@@ -942,7 +940,6 @@ export default {
             } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
               markersMap.click = 'showEventDialog'
               markersMap.icon = 'sj-icon-map-guidang'
-              markersMap.isAggregation = false
             }
             markersMap.parameter = this.eventList[i].eventCode
             markersMap.lng = this.eventList[i].longitude