修改地图标点

master
夜笙歌 4 months ago
parent a1341c2de1
commit 6f12728a60

@ -6,3 +6,4 @@ ENV = 'production'
# 若依管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'

@ -117,3 +117,13 @@ export function importAccount(query) {
data:query
})
}
// 导入台账
export function getMapData(query) {
return request({
// baseURL:'/monitoring-api',
url: '/business/tenant/getAliArea',
method: 'get',
params:query
})
}

@ -305,7 +305,7 @@ Router.prototype.replace = function push(location) {
export default new Router({
base:'/hwsaas',
mode: 'history', // 去掉url中的#
mode: 'hash', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})

@ -410,6 +410,10 @@ export default {
this.$nextTick(() => {
this.historyData = data.tableDataInfo.rows
this.historyTh = data.mapName
if(Object.keys(data.mapName).includes('ts')){
this.historyTh.ts = '时间'
}
console.log(this.historyTh)
this.total = data.tableDataInfo.total
})
}

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

Loading…
Cancel
Save