Browse Source

数据中心

彭宇 2 years ago
parent
commit
1b5c4efed0
3 changed files with 1234 additions and 1201 deletions
  1. 13 10
      src/components/supermap.vue
  2. 5 3
      src/views/event.vue
  3. 1216 1188
      src/views/forest.vue

+ 13 - 10
src/components/supermap.vue

@@ -99,16 +99,16 @@
         let isSideBySide = this.isSideBySide;
         let isEditableLayers = this.isEditableLayers;
         // setToken("eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImY5Zjg3ZjVmLWQ4NTctNDQxZC04NmQ5LTg4OWExZWRlODE4ZSIsInVzZXJuYW1lIjoiYWRtaW4ifQ.26mAzmaM9pUza9585aLnRMyRd4GxvrWbCxN0erYsuiBDYQiYnyc-TwXVNDI7Xrpt3Bqmbnul-XMszOxYQi12LA");
-          _that.isAggregationLayers = window.L.markerClusterGroup({
-            //设置为true时显示聚类所占据的范围
-            showCoverageOnHover: true,
-            //设置为true时会向低一级聚类缩放
-            zoomToBoundsOnClick: true,
-            //增加点位时增加聚合动画(否则会出问题)
-            animateAddingMarkers: true,
-            //最大缩放级别点击聚合图标展开图标
-            spiderfyOnMaxZoom:true,
-          });
+        _that.isAggregationLayers = window.L.markerClusterGroup({
+          //设置为true时显示聚类所占据的范围
+          showCoverageOnHover: true,
+          //设置为true时会向低一级聚类缩放
+          zoomToBoundsOnClick: true,
+          //增加点位时增加聚合动画(否则会出问题)
+          animateAddingMarkers: true,
+          //最大缩放级别点击聚合图标展开图标
+          spiderfyOnMaxZoom:true,
+        });
         if (!isSideBySide) {  //只有一个地图
           if (this.codes.length != 1) {
             alert("请输入一个地图code!");
@@ -476,6 +476,9 @@
       },
       dropLocation: function (lat, lng) {//落点定位
         this.map.panTo([lat, lng])
+      },
+      controlLevel: function (level) {//控制地图缩放级别
+        this.map.setZoom(level)
       }
     }
   }

+ 5 - 3
src/views/event.vue

@@ -869,6 +869,8 @@
                   that.markersMapList.push(marke)
                 }
               }
+              that.$refs.supermapNotProcessed.controlLevel(10)
+              that.$refs.supermapNotProcessed.dropLocation(information.lng,information.lat)
               that.$refs.supermapProcessed.clearM(false)
               that.$refs.supermapProcessed.setMarkers(that.markersMapList)
             })
@@ -950,18 +952,18 @@
           //今日事件
           that.todayEventCountList = res.data.eventcountStatus
           that.todayEventSourcetList = res.data.eventcountSource
-		  
+
 		  res.data.eventcountStatus.forEach(function(data, index) {
 		  	that.$set(that.todayEventCountList[0], 'icon', 'sj-icon-wcl');
 		  	that.$set(that.todayEventCountList[1], 'icon', 'sj-icon-clz');
 		  	that.$set(that.todayEventCountList[2], 'icon', 'sj-icon-ywc');
-		  
+
 		  });
 		  res.data.eventcountSource.forEach(function(data, index) {
 		  	that.$set(that.todayEventSourcetList[0], 'icon', 'sj-icon-rg');
 		  	that.$set(that.todayEventSourcetList[1], 'icon', 'sj-icon-hx');
 		  	that.$set(that.todayEventSourcetList[2], 'icon', 'sj-icon-kk');
-		  
+
 		  });
           //  事件分布
           that.todayEventCountDeptList = res.data.eventcountDept

File diff suppressed because it is too large
+ 1216 - 1188
src/views/forest.vue