From 4b81cc671814355c769e9c4c67ccb6e2ebf6321d Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 21 四月 2025 10:02:13 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/map/http.js |   44 +++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 43 insertions(+), 1 deletions(-)

diff --git a/zy-acs-flow/src/map/http.js b/zy-acs-flow/src/map/http.js
index 640a9a5..b126eed 100644
--- a/zy-acs-flow/src/map/http.js
+++ b/zy-acs-flow/src/map/http.js
@@ -311,7 +311,7 @@
     return false;
 }
 
-export const handleLocateAllAgv = async (param) => {
+export const locateAllAgv = async (param) => {
     try {
         const res = await request.post('/handler/locateAllAgv', param, {
             headers: {
@@ -330,4 +330,46 @@
         console.error(error.message);
     }
     return false;
+}
+
+export const startPatrolBatch = async (param) => {
+    try {
+        const res = await request.post('/handler/patrol/batch/startup', 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;
+}
+
+export const cancelPatrolBatch = async (param) => {
+    try {
+        const res = await request.post('/handler/patrol/batch/shutdown', 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