浏览代码

Merge branch 'visu_firecontrol' of http://121.37.83.100:3000/sooka_onest/sooka_onest_forestfire_vue2_visualization into visu_firecontrol

whao 2 年之前
父节点
当前提交
51a96432b7
共有 4 个文件被更改,包括 29 次插入9 次删除
  1. 1 1
      public/index.html
  2. 1 1
      src/components/TVWall.vue
  3. 15 0
      src/components/supermap.vue
  4. 12 7
      src/views/bigdata/bigdata.vue

+ 1 - 1
public/index.html

@@ -197,7 +197,7 @@
   </head>
   <body>
 <!--  <link rel="stylesheet" href="./supermap/libs/plotting/leaflet/10.2.1/iclient-plot-leaflet.css">-->
-  <script type="text/javascript" include="leaflet,leaflet.sidebyside,iclient-leaflet,iclient-plot-leaflet,leaflet.draw,leaflet.markercluster" src="./supermap/dist/leaflet/include-leaflet.js"></script>
+  <script type="text/javascript" include="leaflet,leaflet.sidebyside,iclient-leaflet,iclient-plot-leaflet,leaflet.draw,leaflet.markercluster,leaflet.heat" src="./supermap/dist/leaflet/include-leaflet.js"></script>
   <script type="text/javascript" include="bootstrap,plottingPanel,fileupLoad,widgets.alert" src="./supermap/examples/js/include-web.js"></script>
 <!--  <script type="text/javascript" include="iclient-classic" src="./supermap/dist/classic/include-classic.js"></script>-->
 <!--  <script type="text/javascript" src="./supermap/libs/plotting/leaflet/10.2.1/iclient-plot-leaflet-es6.min.js"></script>-->

+ 1 - 1
src/components/TVWall.vue

@@ -526,7 +526,7 @@ export default {
         if (oData.responseMsg.data) {
           that.pubKey = oData.responseMsg.data
           callback()
-        }
+        }125
       })
     },
 //RSA加密

+ 15 - 0
src/components/supermap.vue

@@ -247,6 +247,21 @@ export default {
     showLineLatLng: null
   },
   methods: {
+    loadHeatMap: async function() {
+      var heatNumbers = 150, heatRadius = 30;
+      var num = parseInt(heatNumbers);
+      num = (num > 0) ? num : 0;
+      var radius = parseInt(heatRadius);
+      radius = (radius > 0) ? radius : 0;
+      var heatPoints = [];
+      for (var i = 0; i < num; i++) {
+        heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80];
+      }
+      var resultLayer = window.L.heatLayer(heatPoints, {
+        radius: radius,
+        minOpacity: 0.5
+      }).addTo(this.map);
+    },
     clearM: async function(isAggregation) { //清理地图标点
       if (isAggregation) {
         if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {

+ 12 - 7
src/views/bigdata/bigdata.vue

@@ -48,7 +48,9 @@
 			<!-- 第二纵向-->
 			<div class="bigdata-list wid-li-2 m-l-15">
 				<div class="bigdata-map mg-b-20">
-
+          <!-- 地图 -->
+          <bigdataSupermap ref="bigdataSupermap" style="width: 100%;height: 59vh;" class="indexSupermapClass" :mapDiv="'bigdataMap'" dynamicPlotting="false"
+                    :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" :isSideBySide="false"/>
 				</div>
 				<tabbar></tabbar>
 			</div>
@@ -167,6 +169,7 @@
 
 <script>
 	import tabbar from './tabbar.vue' //区域切换
+  import bigdataSupermap from '@/components/supermap' //超图
 
 	//echarts
 	import chartEvent from './chart-event.vue' //1  事件
@@ -191,6 +194,7 @@
 
 	export default {
 		components: {
+      bigdataSupermap,
 			tabbar,
 			chartEvent,
 			chartPopulation,
@@ -212,7 +216,6 @@
 			chartFireControl
 		},
 		data() {
-
 			return {
 				visited: '',
 				navbar: [
@@ -241,13 +244,15 @@
 				total: 0, //事件总数
 				untreated: 0, //事件-未处理
 				processing: 0 // 事件-处理中
-
-
-
-
-
 			}
 		},
+    created() {
+    },
+    mounted() {
+      setTimeout(() => {
+        this.$refs.bigdataSupermap.loadHeatMap()//事件分布
+      }, 5000)
+    },
 	}
 </script>