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