|
|
@ -375,7 +375,8 @@ import {
|
|
|
|
getTenantData,
|
|
|
|
getTenantData,
|
|
|
|
selectMonitorElectronic,
|
|
|
|
selectMonitorElectronic,
|
|
|
|
selectDeviceByName,
|
|
|
|
selectDeviceByName,
|
|
|
|
exTableData
|
|
|
|
exTableData,
|
|
|
|
|
|
|
|
getMapData
|
|
|
|
} from '@/api/board/index'
|
|
|
|
} from '@/api/board/index'
|
|
|
|
import ChinaMapData from '@/utils/ChinaMapData.json'
|
|
|
|
import ChinaMapData from '@/utils/ChinaMapData.json'
|
|
|
|
import gsByMap from '@/utils/map/gs_by.json'
|
|
|
|
import gsByMap from '@/utils/map/gs_by.json'
|
|
|
@ -387,6 +388,15 @@ let markerIds = []
|
|
|
|
let polygons = []
|
|
|
|
let polygons = []
|
|
|
|
let circles = []
|
|
|
|
let circles = []
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isJSON = (str) => {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
JSON.parse(str);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
vueSeamlessScroll,
|
|
|
|
vueSeamlessScroll,
|
|
|
@ -561,8 +571,16 @@ export default {
|
|
|
|
this.setTable3()
|
|
|
|
this.setTable3()
|
|
|
|
this.setDeviceOperations()
|
|
|
|
this.setDeviceOperations()
|
|
|
|
|
|
|
|
|
|
|
|
let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
// let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
let mapData = this.code === 100000 ? ChinaMapData : data.data
|
|
|
|
// let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`)
|
|
|
|
|
|
|
|
let {msg} = await getMapData({areaCode: this.code})
|
|
|
|
|
|
|
|
let data
|
|
|
|
|
|
|
|
if(isJSON(msg)){
|
|
|
|
|
|
|
|
data = JSON.parse(msg)
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
data = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let mapData = this.code === 100000 ? ChinaMapData : data
|
|
|
|
await this.getMap(mapData)
|
|
|
|
await this.getMap(mapData)
|
|
|
|
this.chartClick()
|
|
|
|
this.chartClick()
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -930,8 +948,16 @@ export default {
|
|
|
|
mapData = {features: mapData.features.filter(v => v.properties.name === params.name)}
|
|
|
|
mapData = {features: mapData.features.filter(v => v.properties.name === params.name)}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
// let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
mapData = this.cityJson[params.dataIndex].properties.adcode === 100000 ? ChinaMapData : data.data
|
|
|
|
// let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`)
|
|
|
|
|
|
|
|
let {msg} = await getMapData({areaCode: this.code})
|
|
|
|
|
|
|
|
let data
|
|
|
|
|
|
|
|
if(isJSON(msg)){
|
|
|
|
|
|
|
|
data = JSON.parse(msg)
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
data = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mapData = this.cityJson[params.dataIndex].properties.adcode === 100000 ? ChinaMapData : data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await this.getMap(mapData)
|
|
|
|
await this.getMap(mapData)
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -966,8 +992,17 @@ export default {
|
|
|
|
if (this.code !== 620400 && this.code.toString().startsWith('6204')) {
|
|
|
|
if (this.code !== 620400 && this.code.toString().startsWith('6204')) {
|
|
|
|
mapData = gsByMap
|
|
|
|
mapData = gsByMap
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
// let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
|
|
|
|
mapData = this.code === 100000 ? ChinaMapData : data.data
|
|
|
|
// let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let {msg} = await getMapData({areaCode: this.code})
|
|
|
|
|
|
|
|
let data
|
|
|
|
|
|
|
|
if(isJSON(msg)){
|
|
|
|
|
|
|
|
data = JSON.parse(msg)
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
data = ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
mapData = this.code === 100000 ? ChinaMapData : data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.getMap(mapData)
|
|
|
|
this.getMap(mapData)
|
|
|
|
},
|
|
|
|
},
|
|
|
|