Commit 82d63f44 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化预约人群画像地域分布动态获取经纬度

parent 45a769c2
...@@ -432,7 +432,7 @@ export default { ...@@ -432,7 +432,7 @@ export default {
this.twoPieData = { this.twoPieData = {
title: "本地人与外地人注册分布", title: "本地人与外地人注册分布",
pieName: "分布详情", pieName: "分布详情",
firstName: "若尔盖县本地人注册占比", firstName: "本地人注册占比",
firstVal: res.data.bd_lv, firstVal: res.data.bd_lv,
firstTotal: 1, firstTotal: 1,
secondName: "外地人注册占比", secondName: "外地人注册占比",
...@@ -569,7 +569,7 @@ export default { ...@@ -569,7 +569,7 @@ export default {
this.twoPieData2 = { this.twoPieData2 = {
title: "本地人与外地人办件分布", title: "本地人与外地人办件分布",
pieName: "分布详情", pieName: "分布详情",
firstName: "若尔盖县本地人办件占比", firstName: "本地人办件占比",
firstVal: res.data.bd_lv, firstVal: res.data.bd_lv,
firstTotal: 1, firstTotal: 1,
secondName: "外地人办件占比", secondName: "外地人办件占比",
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import NianlingBar from "./components/bar.vue"; import NianlingBar from "./components/bar.vue";
import XingbiePie from "./components/pie.vue"; import XingbiePie from "./components/pie.vue";
import QiandaoPie from "./components/pie2.vue"; import QiandaoPie from "./components/pie2.vue";
...@@ -99,6 +100,9 @@ export default { ...@@ -99,6 +100,9 @@ export default {
XingbiePie, XingbiePie,
QiandaoPie, QiandaoPie,
}, },
computed: {
...mapGetters("user", ["siteTreeList"]),
},
mounted() { mounted() {
this.init(china); this.init(china);
this.getStatisticArea(); this.getStatisticArea();
...@@ -131,8 +135,10 @@ export default { ...@@ -131,8 +135,10 @@ export default {
if (this.chart == null) { if (this.chart == null) {
this.chart = echarts.init(this.$refs.chart); this.chart = echarts.init(this.$refs.chart);
} }
let firstData = this.siteTreeList[0];
let { latitude, longitude, areaName } = firstData;
echarts.registerMap("china", data); echarts.registerMap("china", data);
var geoGpsMap = [102.95, 33.57]; var geoGpsMap = [longitude, latitude];
var geoCoordMap = { var geoCoordMap = {
江苏: [118.8062, 31.9208], 江苏: [118.8062, 31.9208],
黑龙江: [127.9688, 45.368], 黑龙江: [127.9688, 45.368],
...@@ -292,7 +298,7 @@ export default { ...@@ -292,7 +298,7 @@ export default {
position: "top", position: "top",
// offset: [5, 0], //偏移设置 // offset: [5, 0], //偏移设置
color: "#ff0000", color: "#ff0000",
formatter: "若尔盖县", formatter: areaName,
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: "16px", fontSize: "16px",
...@@ -312,8 +318,8 @@ export default { ...@@ -312,8 +318,8 @@ export default {
}, },
data: [ data: [
{ {
name: "若尔盖县", name: areaName,
value: [102.95, 33.57], value: [longitude, latitude],
}, },
], ],
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment