浏览代码

修改热力图

JX.LI 2 年之前
父节点
当前提交
73a0fdb41e
共有 2 个文件被更改,包括 26 次插入4 次删除
  1. 14 0
      src/api/bigdata/bigdata.js
  2. 12 4
      src/views/bigdata/bigdata.vue

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

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

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

@@ -121,7 +121,7 @@
 	import chartPit_sg from './chart-pit-sg.vue' //饼图
   import bigdataSupermap from '@/components/supermap' //超图
 
-  import {initPieChartData,eventcatalogueBigData,deptBigData} from '@/api/bigdata/bigdata';
+  import {initPieChartData,eventcatalogueBigData,deptBigData,getRlt} from '@/api/bigdata/bigdata';
   import {
     fontConfig
   } from '@/api/login'
@@ -144,11 +144,10 @@
     created() {
       this.fontConfig()
       this.eventcatalogueBigData();
+			this.rlt()
     },
     mounted() {
-      setTimeout(() => {
-        this.$refs.bigdataSupermap.loadHeatMap()//事件分布
-      }, 1000)
+
     },
 		data() {
 			return {
@@ -189,6 +188,15 @@
 			}
 		},
     methods: {
+			rlt() {
+				let that = this
+				getRlt().then(resp => {
+					setTimeout(() => {
+						//事件分布
+						that.$refs.bigdataSupermap.loadHeatMap(resp.data)
+					}, 5000)
+				})
+			},
       fontConfig(){
         fontConfig().then(res => {
           this.systemTitle.title = res.data.fontTitle;