Browse Source

fix: 🧩 当前设备为景观层时地图位置优化

pull/18/head
liyongle 3 years ago
parent
commit
d3c4ce530c
  1. 18
      src/components/PublicComponent/PublicComponent.vue
  2. 17
      src/composables/useGuideFilterShop.ts
  3. 14
      src/composables/useInitMap.ts

18
src/components/PublicComponent/PublicComponent.vue

@ -78,11 +78,19 @@ watch(route, to => {
if (to.fullPath === '/') { if (to.fullPath === '/') {
window?.Map_QM?.showFloor(device.value.floorOrder) window?.Map_QM?.showFloor(device.value.floorOrder)
const art: any = document.getElementById('mapContainer') const art: any = document.getElementById('mapContainer')
art.style.width = '2864px'
art.style.height = '1896px'
art.style.right = '0'
art.style.top = '0'
window.Map_QM.changeWindowResize(2864, 1896)
if (device.value.floorOrder !== 6) {
art.style.width = '2864px'
art.style.height = '1896px'
art.style.right = '0'
art.style.top = '0'
window.Map_QM.changeWindowResize(2864, 1896)
} else {
art.style.width = '2244px'
art.style.height = '1352px'
art.style.right = '690px'
art.style.top = '304px'
window.Map_QM.changeWindowResize(2244, 1352)
}
if (store.currentArtName) { if (store.currentArtName) {
store.SET_CURRENT_ART_NAME('') store.SET_CURRENT_ART_NAME('')
} }

17
src/composables/useGuideFilterShop.ts

@ -27,22 +27,19 @@ export const useGuideFilterShop = () => {
floorIdx.value = floorOrder floorIdx.value = floorOrder
selectedShopList.value = shopList.value.filter(item => item.floorOrder === floorOrder) selectedShopList.value = shopList.value.filter(item => item.floorOrder === floorOrder)
hideMapDialog() hideMapDialog()
const art: any = document.getElementById('mapContainer')
if (floorOrder === 6) { if (floorOrder === 6) {
const art: any = document.getElementById('mapContainer')
art.style.width = '2244px' art.style.width = '2244px'
art.style.height = '1352px' art.style.height = '1352px'
art.style.right = '690px' art.style.right = '690px'
art.style.top = '304px' art.style.top = '304px'
window.Map_QM.changeWindowResize(2244, 1352) window.Map_QM.changeWindowResize(2244, 1352)
} else {
const art: any = document.getElementById('mapContainer')
if (art.style.width !== '2864px') {
art.style.width = '2864px'
art.style.height = '1896px'
art.style.right = '0'
art.style.top = '0'
window.Map_QM.changeWindowResize(2864, 1896)
}
} else if (art.style.width !== '2864px') {
art.style.width = '2864px'
art.style.height = '1896px'
art.style.right = '0'
art.style.top = '0'
window.Map_QM.changeWindowResize(2864, 1896)
} }
window.Map_QM.showFloor(floorOrder) window.Map_QM.showFloor(floorOrder)
} }

14
src/composables/useInitMap.ts

@ -28,6 +28,20 @@ export const useInitMap = async function () {
}) })
}) })
store.SET_MAP_PARK_LIST(arr) store.SET_MAP_PARK_LIST(arr)
const art: any = document.getElementById('mapContainer')
if (device.value.floorOrder === 6) {
art.style.width = '2244px'
art.style.height = '1352px'
art.style.right = '690px'
art.style.top = '304px'
window.Map_QM.changeWindowResize(2244, 1352)
} else if (art.style.width !== '2864px') {
art.style.width = '2864px'
art.style.height = '1896px'
art.style.right = '0'
art.style.top = '0'
window.Map_QM.changeWindowResize(2864, 1896)
}
}, },
{ {
build: device.value?.buildingOrder ?? 0, build: device.value?.buildingOrder ?? 0,

Loading…
Cancel
Save