From 34391a6a5dd7227b67ef3d3611e69ffbb359a2c9 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Thu, 22 May 2025 16:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BC=96=E8=BE=91=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E5=85=88=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E6=9C=89=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E4=BB=BB=E5=8A=A1=EF=BC=8C=E5=86=8D=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E7=BC=96=E8=BE=91=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.local | 2 +- src/api/map/map.ts | 7 +++++++ src/views/mapPage/realTimeMap/index.vue | 17 ++++++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.env.local b/.env.local index 6656a80d..2d03ac1f 100644 --- a/.env.local +++ b/.env.local @@ -5,7 +5,7 @@ VITE_DEV=true # 请求路径 # VITE_BASE_URL='http://192.168.77.50:48080' -VITE_BASE_URL='http://10.10.100.17:48080' +VITE_BASE_URL='http://10.10.100.24:48080' # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务 VITE_UPLOAD_TYPE=server diff --git a/src/api/map/map.ts b/src/api/map/map.ts index 761bacc3..cd003216 100644 --- a/src/api/map/map.ts +++ b/src/api/map/map.ts @@ -241,3 +241,10 @@ export const deletePositionChangePoint = async (data) => { data }) } + +export const checkHaveTask = async (data) => { + return await request.post({ + url: `/system/robot/task/checkHaveTask`, + data + }) +} diff --git a/src/views/mapPage/realTimeMap/index.vue b/src/views/mapPage/realTimeMap/index.vue index a63dd7c8..34907c4b 100644 --- a/src/views/mapPage/realTimeMap/index.vue +++ b/src/views/mapPage/realTimeMap/index.vue @@ -193,13 +193,16 @@ const getStopOrRestore = async () => { //地图编辑 const router = useRouter() // 路由 -const editMap = () => { - router.push({ - name: 'editMapPageRealTimeMap', - query: { - mapId: mapValue.value[1] - } - }) +const editMap = async () => { + let res = await MapApi.checkHaveTask() + if (res) { + router.push({ + name: 'editMapPageRealTimeMap', + query: { + mapId: mapValue.value[1] + } + }) + } } const findDataById = (obj, id) => {