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 @@