传参给实时地图
This commit is contained in:
parent
30ce5ae75b
commit
a3630f3c5a
@ -2306,8 +2306,6 @@ onBeforeRouteLeave((to, from) => {
|
|||||||
router.replace({
|
router.replace({
|
||||||
name: 'MapPageRealTimeMap',
|
name: 'MapPageRealTimeMap',
|
||||||
query: {
|
query: {
|
||||||
floor: imgBgObj.floor,
|
|
||||||
area: imgBgObj.area,
|
|
||||||
mapId: imgBgObj.positionMapId
|
mapId: imgBgObj.positionMapId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -168,18 +168,18 @@ const editMap = () => {
|
|||||||
|
|
||||||
//传输地图信息
|
//传输地图信息
|
||||||
const mapInfo = ref({
|
const mapInfo = ref({
|
||||||
mapId: '',
|
mapId: ''
|
||||||
floor: '',
|
|
||||||
area: ''
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
const { query } = useRoute() // 查询参数
|
||||||
if (route.query.mapId) {
|
onMounted(async () => {
|
||||||
mapInfo.value.mapId = route.query.mapId
|
if (query.mapId) {
|
||||||
mapInfo.value.floor = route.query.floor
|
let res = await MapApi.getPositionMap(query.mapId)
|
||||||
mapInfo.value.area = route.query.area
|
mapInfo.value = res
|
||||||
}
|
indexPageRef.value.getMapData(mapInfo.value)
|
||||||
|
} else {
|
||||||
getList()
|
getList()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user