Merge branch 'master' of http://git.znkjfw.com/ak/zn-admin-vue3-wcs
This commit is contained in:
commit
8efb54dd52
@ -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 })
|
||||
}
|
||||
|
@ -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) => {
|
||||
getCarList()
|
||||
fetchData()
|
||||
message.success('暂停成功')
|
||||
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(() => {})
|
||||
|
Loading…
Reference in New Issue
Block a user