From 099d9a5da5b562e63e2e56efbe9f799e2bcdd614 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 22 十一月 2024 09:35:24 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/http.js | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js index 2fce322..3a66580 100644 --- a/zy-acs-flow/src/map/http.js +++ b/zy-acs-flow/src/map/http.js @@ -14,7 +14,7 @@ mapContainer = param; } -export const fetchMapData = (zoneId, setRcsStatus) => { +export const fetchMapData = (zoneId, setRcsStatus, setCurSprite) => { Tool.clearMapData(); return request.post('/map/data/fetch', { zoneId: zoneId @@ -57,6 +57,7 @@ // }, 50); mapContainer.addChild(sprite); + Tool.beInsight(sprite, setCurSprite); } } }) @@ -283,3 +284,24 @@ console.error(error.message); }) } + +export const handleAgvPatrol = async (param) => { + try { + const res = await request.post('/handler/agv/patrol', param, { + headers: { + 'appKey': HANDLE_APP_KEY + } + }); + const { code, msg, data } = res.data; + if (code === 200) { + notify.success(msg); + return true; + } else { + notify.error(msg); + } + } catch (error) { + notify.error(error.message); + console.error(error.message); + } + return false; +} \ No newline at end of file -- Gitblit v1.9.1