校验地图车辆在线

This commit is contained in:
yyy 2025-06-30 14:52:09 +08:00
parent ae961eaf69
commit e673a2f207
7 changed files with 26 additions and 64 deletions

View File

@ -1,11 +1,9 @@
# 开发环境本地只启动前端项目依赖开发环境后端、APP
# 测试环境
NODE_ENV=production
VITE_DEV=true
# 请求路径
# VITE_BASE_URL='http://192.168.0.66:48080'
# VITE_BASE_URL='http://192.168.0.189:48080'
# 请求路径 测试环境
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
@ -36,4 +34,4 @@ VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
VITE_APP_CAPTCHA_ENABLE=false
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@ -1,12 +1,12 @@
# 本地开发环境本地启动所有项目前端、后端、APP时使用不依赖外部环境
# 本地开发环境
NODE_ENV=development
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.7.132:48080'
# VITE_BASE_URL='http://10.10.100.15:48080'
# VITE_BASE_URL='http://10.10.5.5:48080'
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传,仅支持 S3 服务
VITE_UPLOAD_TYPE=server

View File

@ -3,8 +3,8 @@ NODE_ENV=production
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 请求路径 生产环境
VITE_BASE_URL='http://10.10.5.5:48080'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
@ -31,4 +31,4 @@ VITE_OUT_DIR=dist-prod
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@ -1,34 +0,0 @@
# 预发布环境:只在打包时使用
NODE_ENV=production
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
# 接口地址
VITE_API_URL=/admin-api
# 是否删除debugger
VITE_DROP_DEBUGGER=true
# 是否删除console.log
VITE_DROP_CONSOLE=true
# 是否sourcemap
VITE_SOURCEMAP=false
# 打包路径
VITE_BASE_PATH='http://static-vue3.yudao.iocoder.cn/'
# 输出路径
VITE_OUT_DIR=dist-stage
# 商城H5会员端域名
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@ -12,7 +12,6 @@
"build:local": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build",
"build:dev": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode dev",
"build:test": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode test",
"build:stage": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode stage",
"build:prod": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode prod",
"serve:dev": "vite preview --mode dev",
"serve:prod": "vite preview --mode prod",

View File

@ -869,8 +869,6 @@ const carDbClick = (item, index) => {
carDialogRef.value.open(JSON.parse(JSON.stringify(item)))
}
defineExpose({ getMapData, computedRatio }) // open
onMounted(() => {
document.addEventListener('fullscreenchange', handleFullscreenChange)
document.addEventListener('webkitfullscreenchange', handleFullscreenChange)
@ -881,7 +879,7 @@ onMounted(() => {
robotListTimerRef.value = setInterval(() => {
if (document.hidden) return //
getRobotByFloorAndAreaList()
}, 20000)
}, 10000)
//
document.addEventListener('visibilitychange', () => {
@ -890,28 +888,20 @@ onMounted(() => {
}
})
})
onUnmounted(() => {
document.removeEventListener('fullscreenchange', handleFullscreenChange)
document.removeEventListener('webkitfullscreenchange', handleFullscreenChange)
document.removeEventListener('mozfullscreenchange', handleFullscreenChange)
document.removeEventListener('MSFullscreenChange', handleFullscreenChange)
//
if (robotListTimerRef.value) {
clearInterval(robotListTimerRef.value)
robotListTimerRef.value = null
}
if (wsConnection.value) {
wsConnection.value.disconnect()
wsConnection.value = null
}
//
testCarList.value = []
robotByFloorAndAreaList.value = []
clearTheTimer()
})
onBeforeUnmount(() => {
clearTheTimer()
})
const clearTheTimer = () => {
//
if (robotListTimerRef.value) {
clearInterval(robotListTimerRef.value)
@ -932,7 +922,9 @@ onBeforeUnmount(() => {
//
testCarList.value = []
robotByFloorAndAreaList.value = []
})
}
defineExpose({ getMapData, computedRatio, clearTheTimer }) // open
</script>
<style lang="scss" scoped>

View File

@ -171,6 +171,13 @@ const { query } = useRoute() // 查询参数
onMounted(() => {
getList()
})
onUnmounted(() => {
indexPageRef.value && indexPageRef.value.clearTheTimer()
})
onBeforeUnmount(() => {
indexPageRef.value && indexPageRef.value.clearTheTimer()
})
</script>
<style lang="scss" scoped>