From 84420e510c2ec60670c3687e67646d8ba3830819 Mon Sep 17 00:00:00 2001
From: zhanghao <774378400@qq.com>
Date: Fri, 17 Jul 2026 10:43:44 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20agv=E7=A7=BB=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 4 +-
src/api/inspection/robot.js | 52 ++++++++++++++++++-
.../ManualTakeover/DirectionControl.vue | 31 ++++++-----
.../components/ManualTakeover/index.vue | 6 ++-
4 files changed, 76 insertions(+), 17 deletions(-)
diff --git a/.env.development b/.env.development
index 3d8771f..78d43a5 100644
--- a/.env.development
+++ b/.env.development
@@ -7,8 +7,8 @@ VITE_APP_ENV = 'development'
# 招商车研物联网平台/开发环境
VITE_APP_BASE_API = '/dev-api'
-VITE_API_URL = http://192.168.1.222:13080
-VITE_WS_URL = ws://192.168.1.222:13080/ws
+VITE_API_URL = http://192.168.0.222:13080
+VITE_WS_URL = ws://192.168.0.222:13080/ws
# explanation
VITE_INSPECTION_TYPE = "inspection"
diff --git a/src/api/inspection/robot.js b/src/api/inspection/robot.js
index c4963f2..505163e 100644
--- a/src/api/inspection/robot.js
+++ b/src/api/inspection/robot.js
@@ -54,4 +54,54 @@ export function getMapJson(params) {
method: 'get',
params
})
-}
\ No newline at end of file
+}
+
+/**
+ * 获取机器人位置
+ * @param {*} robotId
+ * @returns
+ */
+export function getRobotLocation(robotId) {
+ return request({
+ url: `/inspection/robot/${robotId}/location`,
+ method: 'get'
+ })
+}
+
+/**
+ * 获取机器人状态
+ * @param {*} robotId
+ * @returns
+ */
+export function getRobotStatus(robotId) {
+ return request({
+ url: `/inspection/robot/{robotId}/sync-status`,
+ method: 'get'
+ })
+}
+
+/**
+ * 机器人运动控制
+ * @param {*} data
+ * @returns
+ */
+export function moveRobot(data) {
+ return request({
+ url: '/api/agv/setVelocity',
+ method: 'post',
+ data: data
+ })
+}
+
+/**
+ * 机器人停止运动
+ * @param {*} data
+ * @returns
+ */
+export function stopRobot(data) {
+ return request({
+ url: '/api/agv/stopVelocityControl',
+ method: 'get',
+ data: data
+ })
+}
diff --git a/src/views/inspection/cockpit/components/ManualTakeover/DirectionControl.vue b/src/views/inspection/cockpit/components/ManualTakeover/DirectionControl.vue
index be69b45..4896cf2 100644
--- a/src/views/inspection/cockpit/components/ManualTakeover/DirectionControl.vue
+++ b/src/views/inspection/cockpit/components/ManualTakeover/DirectionControl.vue
@@ -62,6 +62,14 @@