Merge branch 'dev'
This commit is contained in:
commit
a007ab5550
@ -74,3 +74,7 @@ export const doTaskContinue = async (data) => {
|
|||||||
export const stopCar = async (data) => {
|
export const stopCar = async (data) => {
|
||||||
return await request.post({ url: `/system/robot/information/stopRobot?robotNo=${data.robotNo}`, 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 })
|
||||||
|
}
|
||||||
|
@ -162,6 +162,12 @@
|
|||||||
v-hasPermi="['carBoard:index:stop']"
|
v-hasPermi="['carBoard:index:stop']"
|
||||||
>暂停车辆</el-dropdown-item
|
>暂停车辆</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>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
@ -471,9 +477,29 @@ const stopCar = (robotNo) => {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
CarApi.stopCar({ robotNo }).then((res) => {
|
CarApi.stopCar({ robotNo }).then((res) => {
|
||||||
|
if(res){
|
||||||
getCarList()
|
getCarList()
|
||||||
fetchData()
|
fetchData()
|
||||||
message.success('暂停成功')
|
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(() => {})
|
.catch(() => {})
|
||||||
|
Loading…
Reference in New Issue
Block a user