Merge branch 'dev'

This commit is contained in:
lhy 2025-06-30 14:23:22 +08:00
commit a007ab5550
2 changed files with 33 additions and 3 deletions

View File

@ -74,3 +74,7 @@ export const doTaskContinue = async (data) => {
export const stopCar = async (data) => {
return await request.post({ url: `/system/robot/information/stopRobot?robotNo=${data.robotNo}`, data })
}
// 恢复车辆
export const recoveryCar = async (data) => {
return await request.post({ url: `/system/robot/information/continueRobot?robotNo=${data.robotNo}`, data })
}

View File

@ -162,6 +162,12 @@
v-hasPermi="['carBoard:index:stop']"
>暂停车辆</el-dropdown-item
>
<el-dropdown-item
v-if="item.isStop === 1"
@click="recoveryCar(item.robotNo)"
v-hasPermi="['carBoard:index:recoveryCar']"
>恢复车辆</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
@ -471,9 +477,29 @@ const stopCar = (robotNo) => {
})
.then(() => {
CarApi.stopCar({ robotNo }).then((res) => {
if(res){
getCarList()
fetchData()
message.success('暂停成功')
}
})
})
.catch(() => {})
}
//
const recoveryCar = (robotNo) => {
ElMessageBox.confirm('您确定要恢复车辆吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
CarApi.recoveryCar({ robotNo }).then((res) => {
if(res){
getCarList()
fetchData()
message.success('恢复成功')
}
})
})
.catch(() => {})