style:首页修改完成
Showing
2 changed files
with
6 additions
and
4 deletions
... | @@ -38,6 +38,7 @@ | ... | @@ -38,6 +38,7 @@ |
38 | cdata: { | 38 | cdata: { |
39 | handler (newData) { | 39 | handler (newData) { |
40 | let _this = this; | 40 | let _this = this; |
41 | if (newData.length == 0) return | ||
41 | // 设置点的位置(经纬度) | 42 | // 设置点的位置(经纬度) |
42 | this.options = { | 43 | this.options = { |
43 | showLegendSymbol: false, | 44 | showLegendSymbol: false, | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-07-03 17:00:51 | 4 | * @LastEditTime: 2023-07-03 17:08:05 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <Chart :cdata="cdata" /> | 7 | <Chart :cdata="cdata" /> |
... | @@ -20,8 +20,10 @@ | ... | @@ -20,8 +20,10 @@ |
20 | components: { | 20 | components: { |
21 | Chart | 21 | Chart |
22 | }, | 22 | }, |
23 | created () { | 23 | mounted () { |
24 | this.mapViews(); | 24 | this.$nextTick(() => { |
25 | this.mapViews() | ||
26 | }) | ||
25 | this.timer = setInterval(() => { | 27 | this.timer = setInterval(() => { |
26 | this.mapViews(); | 28 | this.mapViews(); |
27 | }, 10000) // 10s | 29 | }, 10000) // 10s |
... | @@ -31,7 +33,6 @@ | ... | @@ -31,7 +33,6 @@ |
31 | try { | 33 | try { |
32 | let { result: res } = await work.mapViews("A20"); | 34 | let { result: res } = await work.mapViews("A20"); |
33 | res.map((item) => { | 35 | res.map((item) => { |
34 | |||
35 | return ( | 36 | return ( |
36 | this.cdata.push({ "name": item.areaName, "value": item.ywtotal, "successcount": item.successcount }) | 37 | this.cdata.push({ "name": item.areaName, "value": item.ywtotal, "successcount": item.successcount }) |
37 | ) | 38 | ) | ... | ... |
-
Please register or sign in to post a comment