This commit is contained in:
parent
4f48891923
commit
f79df88712
|
|
@ -26,12 +26,25 @@ const mapContainer = ref(null) // 地图容器
|
||||||
const mapDialog = ref(false) // 地图弹框
|
const mapDialog = ref(false) // 地图弹框
|
||||||
const mapWorkCard = ref(false) // 工牌信息弹框
|
const mapWorkCard = ref(false) // 工牌信息弹框
|
||||||
const mapWorkCardData: any = ref({}) // 工牌信息数据
|
const mapWorkCardData: any = ref({}) // 工牌信息数据
|
||||||
|
// 定时器
|
||||||
|
let timer: any = ref()
|
||||||
// 标记点
|
// 标记点
|
||||||
const points: any = ref([])
|
const points: any = ref([])
|
||||||
const mapData = ref()
|
const mapData = ref()
|
||||||
const tagData: any = ref()
|
const tagData: any = ref()
|
||||||
const tagIndex: any = ref()
|
const tagIndex: any = ref()
|
||||||
|
|
||||||
|
// 监听 mapDialog
|
||||||
|
watch(
|
||||||
|
() => mapDialog.value,
|
||||||
|
(newValue) => {
|
||||||
|
if (!newValue && timer.value) {
|
||||||
|
// 清除定时器
|
||||||
|
clearInterval(timer.value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
// 登录
|
// 登录
|
||||||
const loginApi = async () => {
|
const loginApi = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -274,6 +287,9 @@ const initMap = () => {
|
||||||
mapDialog.value = true
|
mapDialog.value = true
|
||||||
tagData.value = mapData.value.aphase
|
tagData.value = mapData.value.aphase
|
||||||
tagIndex.value = 1
|
tagIndex.value = 1
|
||||||
|
timer.value = setInterval(() => {
|
||||||
|
loginApi()
|
||||||
|
}, 3000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue