|
@@ -37,6 +37,7 @@ export default {
|
|
loading: false
|
|
loading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created () {},
|
|
mounted () {
|
|
mounted () {
|
|
this.getData('china')
|
|
this.getData('china')
|
|
},
|
|
},
|
|
@@ -61,7 +62,7 @@ export default {
|
|
this.timer = setInterval(looper, 30000)
|
|
this.timer = setInterval(looper, 30000)
|
|
},
|
|
},
|
|
getData (code) {
|
|
getData (code) {
|
|
- this.loading = !this.timer ? true : false
|
|
|
|
|
|
+ this.loading = !this.timer
|
|
queryMapSaleData(getDate.getBeDateByYear(this.curYear)).then((res) => {
|
|
queryMapSaleData(getDate.getBeDateByYear(this.curYear)).then((res) => {
|
|
console.log('地图', res)
|
|
console.log('地图', res)
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -93,8 +94,9 @@ export default {
|
|
if (mapjson) {
|
|
if (mapjson) {
|
|
mapjson = mapjson.geoJSON
|
|
mapjson = mapjson.geoJSON
|
|
} else {
|
|
} else {
|
|
- mapjson = await GETNOBASE(`../../map-geojson/${geoname}.json`).then((res) => res)
|
|
|
|
- console.log(mapjson, 'mapjson')
|
|
|
|
|
|
+ mapjson = await GETNOBASE(`../../map-geojson/${geoname}.json`).then((res) => {
|
|
|
|
+ return res
|
|
|
|
+ })
|
|
echarts.registerMap(name, mapjson)
|
|
echarts.registerMap(name, mapjson)
|
|
}
|
|
}
|
|
const cityCenter = {}
|
|
const cityCenter = {}
|
|
@@ -360,4 +362,4 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|