Kaynağa Gözat

振兴乡村首页

彭宇 2 yıl önce
ebeveyn
işleme
51b1ae6c46
2 değiştirilmiş dosya ile 41 ekleme ve 13 silme
  1. 13 13
      src/components/supermap.vue
  2. 28 0
      src/views/eventdetailsdialog.vue

+ 13 - 13
src/components/supermap.vue

@@ -617,19 +617,19 @@ export default {
         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: true,
+          //增加点位时增加聚合动画(否则会出问题)
+          animateAddingMarkers: true,
+          //最大缩放级别点击聚合图标展开图标
+          spiderfyOnMaxZoom: true
+        })
       } else {
         if (this.myGroup != undefined && this.myGroup != false) {
           this.myGroup.clearLayers()

+ 28 - 0
src/views/eventdetailsdialog.vue

@@ -1862,6 +1862,34 @@ export default {
           }
           that.$refs.supermapDialog.dropLocation(res.data.catalogue.latitude, res.data.catalogue.longitude)
         }, 2000)
+        if (res.data.centermonitorTCamera != null) {
+          let markersMap = {
+            lng: 124.59,
+            lat: 43.02,
+            icon: 'camera',
+            bindPopupHtml: '',
+            click: 'preview',
+            parameter: res.data.centermonitorTCamera.cameraCode,
+            keepBindPopup: false,
+            isAggregation: false,
+            radius: 0
+          }
+          markersMap.bindPopupHtml = '<div class="map-tip">' +
+            '<span>' +
+            '                  <div class="d-l-con">' +
+            '                  <div class="d-l-l-text">' +
+            '                  <h4>摄像头名称:' + res.data.centermonitorTCamera.cameraName + '</h4>' +
+            '                </div>' +
+            '                </div>' +
+            '                </span>' +
+            '<span>' +
+            '</div>'
+          markersMap.lng = res.data.centermonitorTCamera.longitude
+          markersMap.lat = res.data.centermonitorTCamera.latitude
+          setTimeout(() => {
+            that.$refs.supermapDialog.setMarkers([markersMap])
+          }, 2000)
+        }
       })
     },
     refreshEventDialog(eventCode) {