소스 검색

农业热力图接口增加

wang_xy 2 년 전
부모
커밋
0e1655fcd3
2개의 변경된 파일28개의 추가작업 그리고 4개의 파일을 삭제
  1. 14 0
      src/api/bigdata/bigdata.js
  2. 14 4
      src/views/bigdata/bigdata.vue

+ 14 - 0
src/api/bigdata/bigdata.js

@@ -97,3 +97,17 @@ export function getLItianDept() {
     method: 'get',
   })
 }
+
+//热力图
+export function getRlt(param) {
+  //暂时传当年,以后再说
+  if (param == null) {
+    let myDate = new Date();
+    param = {day: myDate.getFullYear()}
+  }
+  return request({
+    url: '/center-agriculture/data/getHeatMap',
+    method: 'post',
+    data : param
+  })
+}

+ 14 - 4
src/views/bigdata/bigdata.vue

@@ -149,7 +149,7 @@
   import bigdataSupermap from '@/components/supermap' //超图
 
   import {cooperativesBigData,machineryInfoBigData,landInfoBigData
-    ,eventcatalogueBigData,deptBigData
+    ,eventcatalogueBigData,getRlt,deptBigData
     ,leidaBigData,protectInfoBigData,xubaoBigData
     ,zhongZiBigData,huaFeiBigData,YangZhiBigData
     ,getHuanTianDept,getHuanTianType,getLItianDept
@@ -184,6 +184,7 @@
       this.machineryInfoBigData();
       this.landInfoBigData();
       this.eventcatalogueBigData();
+      this.getRlt();
       this.leidaBigData();
       this.protectInfoBigData();
       this.xubaoBigData();
@@ -195,9 +196,9 @@
       this.getLItianDept();
     },
     mounted() {
-      setTimeout(() => {
-        this.$refs.bigdataSupermap.loadHeatMap()//事件分布
-      }, 5000)
+      // setTimeout(() => {
+      //   this.$refs.bigdataSupermap.loadHeatMap()//事件分布
+      // }, 5000)
     },
 		data() {
 			return {
@@ -269,6 +270,15 @@
           this.$refs.chartEvent.myEcharts2(res.data);
         })
       },
+      rlt() {
+        let that = this
+        getRlt().then(resp => {
+          setTimeout(() => {
+            //事件分布
+            that.$refs.bigdataSupermap.loadHeatMap(resp.data)
+          }, 5000)
+        })
+      }
       leidaBigData() {
         leidaBigData().then(res => {
           const seriesData = [0,0,0,0,0];