From 00b0ec55e1b0eef82b3a31166e8273ecea776568 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期六, 19 十月 2024 14:34:51 +0800 Subject: [PATCH] # --- zy-acs-flow/src/map/http.js | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js index c6d34e1..22fe804 100644 --- a/zy-acs-flow/src/map/http.js +++ b/zy-acs-flow/src/map/http.js @@ -14,15 +14,16 @@ mapContainer = param; } -export const fetchMapData = (zoneId) => { +export const fetchMapData = (zoneId, setRcsStatus) => { Tool.clearMapData(); return request.post('/map/data/fetch', { zoneId: zoneId }, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then((res) => { - const { code, msg, data: { common, point } } = res.data; + const { code, msg, data: { rcsStatus, common, point } } = res.data; if (code === 200) { + setRcsStatus(rcsStatus); const mapItemList = [...eval(common), ...eval(point)]; mapItemList.forEach(item => { if (item.type !== DEVICE_TYPE.AGV) { @@ -108,6 +109,23 @@ }) } +export const startupOrShutdown = async (callback) => { + try { + const res = await request.post('/map/startupOrShutdown'); + const { code, msg, data } = res.data; + if (code === 200) { + if (callback) { + callback(); + } + } else { + notify.error(msg); + } + } catch (error) { + notify.error(error.message); + console.error(error.message); + } +} + export const getLocGroup = async (row, bay, callback) => { await request.post('/map/shelf/group', { row: row, -- Gitblit v1.9.1