|
|
|
@ -9,7 +9,7 @@ export const useInitMap = async function () { |
|
|
|
const { device, facilityList, shopList } = storeToRefs(store) |
|
|
|
try { |
|
|
|
const { data } = await getMapData() |
|
|
|
const delPrefixOfFacilityList = facilityList.value.slice().map(item => ({ |
|
|
|
const delPrefixOfFacilityList = facilityList.value.map(item => ({ |
|
|
|
...item, |
|
|
|
filePath: item.filePath.replace(PREFIX.STATIC_URL, '') |
|
|
|
})) |
|
|
|
@ -42,7 +42,8 @@ function onClickShop(event: any) { |
|
|
|
|
|
|
|
if (event.data) { |
|
|
|
showMapDialog() |
|
|
|
window.Map_QM.addElementLabel(document.getElementById('shopInfo'), event.data.xaxis, event.data.yaxis) |
|
|
|
!window.shopInfo && document.getElementById('shopInfo') |
|
|
|
window.Map_QM.addElementLabel(window.shopInfo, event.data.xaxis, event.data.yaxis) |
|
|
|
store.SET_SHOP(event.data.shopData) |
|
|
|
} else { |
|
|
|
hideMapDialog() |
|
|
|
@ -50,12 +51,12 @@ function onClickShop(event: any) { |
|
|
|
} |
|
|
|
//地图弹框消失
|
|
|
|
export function hideMapDialog() { |
|
|
|
;(document.getElementById('shopInfo') as HTMLElement).style.visibility = 'hidden' |
|
|
|
window.shopInfo.style.visibility = 'hidden' |
|
|
|
} |
|
|
|
|
|
|
|
//显示地图弹框
|
|
|
|
function showMapDialog() { |
|
|
|
;(document.getElementById('shopInfo') as HTMLElement).style.visibility = 'visible' |
|
|
|
window.shopInfo.style.visibility = 'visible' |
|
|
|
} |
|
|
|
|
|
|
|
//监听地图上下文丢失 刷新页面
|
|
|
|
|