From 8b093ec56bd4e5e721bf48ca497efc819691b2bc Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 15 十二月 2025 16:21:05 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/http.js | 38 ++++++++++++++++++++++++++++++++++++--
1 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js
index be18f40..11346d4 100644
--- a/zy-acs-flow/src/map/http.js
+++ b/zy-acs-flow/src/map/http.js
@@ -396,18 +396,52 @@
}
}
+export const getAreaInfo = async (param, callback) => {
+ await request.get('/map/area/get', param).then((res) => {
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ if (callback) {
+ callback(data)
+ }
+ } else {
+ notify.error(msg);
+ }
+ }).catch((error) => {
+ notify.error(error.message);
+ console.error(error.message);
+ })
+}
+
export const saveAreaData = async (zoneId, areaData) => {
try {
const res = await request.post('/map/area/save', {
zoneId: zoneId,
...areaData,
});
- const { code, msg } = res.data;
+ const { code, msg, data } = res.data;
if (code !== 200) {
notify.error(msg);
+ return null;
}
+ return data;
} catch (error) {
notify.error(error.message);
console.error(error.message);
}
-}
\ No newline at end of file
+ return null;
+}
+
+export const fetchAgvListAll = async () => {
+ try {
+ const res = await request.get('/agv/list');
+ const { code, msg, data } = res.data;
+ if (code === 200) {
+ return data || [];
+ }
+ notify.error(msg);
+ } catch (error) {
+ notify.error(error.message);
+ console.error(error.message);
+ }
+ return [];
+}
--
Gitblit v1.9.1