Administrator 2 年之前
父節點
當前提交
7b62ded082
共有 4 個文件被更改,包括 37 次插入8 次删除
  1. 13 0
      src/api/bigdata.js
  2. 6 6
      src/components/supermap.vue
  3. 16 0
      src/views/bigdata/bigdata.vue
  4. 2 2
      vue.config.js

+ 13 - 0
src/api/bigdata.js

@@ -154,7 +154,20 @@ export function getZhxx(param) {
     data: param,
     method: 'post'
   })
+}
 
+//热力图
+export function getRlt(param) {
+  //暂时传当年,以后再说
+  if (param == null) {
+    let myDate = new Date();
+    param = {day: myDate.getFullYear()}
+  }
+  return request({
+    url: '/center-fire/VisuForestCloudBigDataController/getHeatMap',
+    method: 'post',
+    data : param
+  })
 }
 
 

+ 6 - 6
src/components/supermap.vue

@@ -596,16 +596,16 @@ export default {
     },
     /** ----------------------------------火势蔓延  结束------------------------------------- */
     /** ----------------------------------热力图  结束------------------------------------- */
-    loadHeatMap: async function() {
+    loadHeatMap: async function(points) {
       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 heatPoints = points
+      // 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
@@ -1301,7 +1301,7 @@ export default {
 			color: $inBlue;
 			width: 3rem;
 			text-align: right;
-			
+
 		}
 		.form-control{
 			padding: 0 .3rem;

+ 16 - 0
src/views/bigdata/bigdata.vue

@@ -154,6 +154,8 @@ import chartGridStaff from './chart-gridStaff.vue' //13 网格人员、、
 import chartWeatherStation from './chart-weatherStation.vue' //14 气象站、、
 import chartEquipmentDistribution from './chart-equipmentDistribution' //16 设备分布、、
 
+import {getRlt} from '@/api/bigdata'
+
 export default {
   components: {
     bigdataSupermap,
@@ -224,12 +226,26 @@ export default {
 
     }
   },
+
+  methods:{
+    rlt(){
+      getRlt().then(resp => {
+        console.log("rrrr",resp)
+      })
+    }
+  },
   mounted() {
+    this.rlt()
     setTimeout(() => {
+
       this.$refs.bigdataSupermap.loadHeatMap() //事件分布
     }, 5000)
   }
 }
+
+
+
+
 </script>
 
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 2 - 2
vue.config.js

@@ -52,8 +52,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://192.168.1.113:3031`,
-        target: `http://117.78.49.164:3031`,
+        target: `http://192.168.1.113:3031`,
+        // target: `http://117.78.49.164:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''