地市大屏接口对接3
This commit is contained in:
parent
553892a1f1
commit
ef275b7441
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -11,6 +11,22 @@
|
|||
import * as echarts from 'echarts'
|
||||
import { mapDataApi } from "@/api/screen/cityScreen";
|
||||
import hefeiJson from '@/utils/mapJson/hefei.json'
|
||||
import wuhuJson from '@/utils/mapJson/wuhu.json'
|
||||
import bengbuJson from '@/utils/mapJson/bengbu.json'
|
||||
import maanshanJson from '@/utils/mapJson/maanshan.json'
|
||||
import huaibeiJson from '@/utils/mapJson/huaibei.json'
|
||||
import huainanJson from '@/utils/mapJson/huainan.json'
|
||||
import tonglingJson from '@/utils/mapJson/tongling.json'
|
||||
import anqingJson from '@/utils/mapJson/anqing.json'
|
||||
import huangshanJson from '@/utils/mapJson/huangshan.json'
|
||||
import chuzhouJson from '@/utils/mapJson/chuzhou.json'
|
||||
import fuyangJson from '@/utils/mapJson/fuyang.json'
|
||||
import suzhouJson from '@/utils/mapJson/suzhou.json'
|
||||
import liuanJson from '@/utils/mapJson/liuan.json'
|
||||
import bozhouJson from '@/utils/mapJson/bozhou.json'
|
||||
import chizhouJson from '@/utils/mapJson/chizhou.json'
|
||||
import xuanchenJson from '@/utils/mapJson/xuanchen.json'
|
||||
|
||||
export default {
|
||||
name: 'centerTopPage',
|
||||
props: {
|
||||
|
|
@ -59,11 +75,48 @@ export default {
|
|||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getMapData()
|
||||
this.cityName="合肥"
|
||||
this.getCityJson()
|
||||
},
|
||||
methods: {
|
||||
getMapData(){
|
||||
this.mapJson = hefeiJson;
|
||||
getCityJson(){
|
||||
if(this.cityName.indexOf("合肥")>-1){
|
||||
this.mapJson = hefeiJson;
|
||||
}else if(this.cityName.indexOf("芜湖")>-1){
|
||||
this.mapJson = wuhuJson
|
||||
}else if(this.cityName.indexOf("蚌埠")>-1){
|
||||
this.mapJson = bengbuJson
|
||||
}else if(this.cityName.indexOf("淮南")>-1){
|
||||
this.mapJson = huainanJson
|
||||
}else if(this.cityName.indexOf("马鞍山")>-1){
|
||||
this.mapJson = maanshanJson
|
||||
}else if(this.cityName.indexOf("淮北")>-1){
|
||||
this.mapJson = huaibeiJson
|
||||
}else if(this.cityName.indexOf("铜陵")>-1){
|
||||
this.mapJson = tonglingJson
|
||||
}else if(this.cityName.indexOf("安庆")>-1){
|
||||
this.mapJson = anqingJson
|
||||
}else if(this.cityName.indexOf("黄山")>-1){
|
||||
this.mapJson = huangshanJson
|
||||
}else if(this.cityName.indexOf("滁州")>-1){
|
||||
this.mapJson = chuzhouJson
|
||||
}else if(this.cityName.indexOf("阜阳")>-1){
|
||||
this.mapJson = fuyangJson
|
||||
}else if(this.cityName.indexOf("宿州")>-1){
|
||||
this.mapJson = suzhouJson
|
||||
}else if(this.cityName.indexOf("六安")>-1){
|
||||
this.mapJson = liuanJson
|
||||
}else if(this.cityName.indexOf("亳州")>-1){
|
||||
this.mapJson = bozhouJson
|
||||
}else if(this.cityName.indexOf("池州")>-1){
|
||||
this.mapJson = chizhouJson
|
||||
}else if(this.cityName.indexOf("宣城")>-1){
|
||||
this.mapJson = xuanchenJson
|
||||
}
|
||||
console.log(this.mapJson)
|
||||
this.getMapData()
|
||||
},
|
||||
getMapData(){
|
||||
// 获取地区中心坐标
|
||||
var mapFeatures = this.mapJson.features.map(item=>{
|
||||
let obj = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue