From 198784651040d171315e5a771d633c2af07a67ea Mon Sep 17 00:00:00 2001 From: xhf <1424913779@qq.com> Date: Wed, 26 Mar 2025 17:35:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=81=A2=E5=A4=8D=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=20=E5=92=8C=20=E6=B8=85=E9=99=A4=E4=BA=A4=E7=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/car/index.ts | 9 +++++++ src/views/board/carBoard/index.vue | 40 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/api/car/index.ts b/src/api/car/index.ts index 0261bef2..a1100d59 100644 --- a/src/api/car/index.ts +++ b/src/api/car/index.ts @@ -61,3 +61,12 @@ export const robotPositionGetMapAllNew = async (params) => { export const getRobotInformationList = async (params) => { return await request.get({ url: `/system/robot/information/list`, params }) } + +// 清除交管 +export const cleanTrafficManagement = async (data) => { + return await request.post({ url: `/system/robot/information/cleanTrafficManagement?robotNo=${data.robotNo}`, data }) +} +// 恢复任务 +export const doTaskContinue = async (data) => { + return await request.post({ url: `/system/robot/information/doTaskContinue?robotNo=${data.robotNo}`, data }) +} diff --git a/src/views/board/carBoard/index.vue b/src/views/board/carBoard/index.vue index 2845f639..c290ae78 100644 --- a/src/views/board/carBoard/index.vue +++ b/src/views/board/carBoard/index.vue @@ -136,6 +136,8 @@ item.robotTaskModel == 0 ? '解锁' : '锁定' }} 删除 + 清除交管 + 恢复任务 @@ -399,6 +401,44 @@ const goMoreError = (item) => { }) } +//清除交管 +const clearCar = (robotNo) => { + ElMessageBox.confirm('您确定要清除交管吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(() => { + CarApi.cleanTrafficManagement({robotNo}).then((res) => { + getCarList() + getRobotInformationStatistics() + message.success('清除成功') + }) + }) + .catch(() => { + + }) +} + +// 恢复任务 +const recoveryTask = (robotNo) => { + ElMessageBox.confirm('您确定要恢复任务吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }) + .then(() => { + CarApi.doTaskContinue({robotNo}).then((res) => { + getCarList() + getRobotInformationStatistics() + message.success('恢复成功') + }) + }) + .catch(() => { + + }) + } + const changeRobotStatisticsType = (type) => { queryParams.robotStatisticsType = type getCarList()