lilei 2 년 전
부모
커밋
cec544cb87
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/views/bigScreen/realTimeSalesReport/center-map.vue

+ 6 - 4
src/views/bigScreen/realTimeSalesReport/center-map.vue

@@ -37,6 +37,7 @@ export default {
       loading: false
     }
   },
+  created () {},
   mounted () {
     this.getData('china')
   },
@@ -61,7 +62,7 @@ export default {
       this.timer = setInterval(looper, 30000)
     },
     getData (code) {
-      this.loading = !this.timer ? true : false
+      this.loading = !this.timer
       queryMapSaleData(getDate.getBeDateByYear(this.curYear)).then((res) => {
         console.log('地图', res)
         if (res.status == 200) {
@@ -93,8 +94,9 @@ export default {
       if (mapjson) {
         mapjson = mapjson.geoJSON
       } 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)
       }
       const cityCenter = {}
@@ -360,4 +362,4 @@ export default {
     }
   }
 }
-</style>
+</style>