heat.vue
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!-- 广场时段客流热力 -->
<!-- 楼层时段客流热力 -->
<template>
<div>
<!-- 顶部区域 S-->
<div class="ipage_top">
<div class="tit"><img :src="bindIcon('renyuan')" />{{title||chartData.title}}</div>
<div class="acts"></div>
</div>
<div class="ichart">
<heat-chart ref="chart" :cdata="chartData" tval="heat"></heat-chart>
</div>
</div>
</template>
<script>
import mixin from "./mixin";
import mallData from "@/components/Echarts/data";
/**********************************************************/
const chartsConfig = {
format_association_diagram: {
//业态关联图
otherConf: {
hideVisualMap: true,
visualColor: ["#6DD9F9", "#ecf9ff"],
},
},
zone_passenger_distribution:{
otherConf: {
dateSort: true,
},
},
period_passenger_distribution:{
otherConf: {
dateSort: true,
}
},
mall_period_passenger_flow_heat:{
otherConf: {
dateSort: true,
},
},
format_association:{
otherConf: {
hideVisualMap: true,
visualColor: ["#6DD9F9", "#ecf9ff"],
},
},
default: {
//默认
otherConf: {
hideVisualMap: false,
},
},
};
/*******************************************************/
export default {
mixins: [mixin],
data() {
return {
configObj: {},
};
},
created() {
},
methods: {
getChartsConfig() {
return chartsConfig;
},
loadChartData(params) {
this.chartId = this.getChartId(this.ckey);
if (this.chartId) {
this.ajaxModuleData().then((data) => {
this.setChartData(data);
});
} else {
this.setChartData();
}
},
setChartData(data) {
if (["format_association",'format_association_diagram'].includes(this.ckey)&&data) {
data = {
...data,
series: data.series.reverse(),
};
}
this.chartData = Object.assign(
{},
data /*mallData.body.TimeThermodynamic*/,
{
otherConf: this.configObj.otherConf || {},
}
);
},
},
};
</script>
<style lang="less">
</style>