提交 a0844c90 作者: 温凯

Merge branch 'v4' of ssh://git.mmcuav.cn:8222/root/mmc-stl-vue2 into v4

......@@ -331,6 +331,29 @@ export default {
* 接管无人机
*/
async onTakeOver(hangar, departmentName) {
console.log('onTakeOver:',hangar);
//upkeepStatus保养状态, upkeepErrorCode异常信息代码,upkeepTime保养时间
const {upkeepStatus,upkeepErrorCode,upkeepTime,countdown} = hangar;
//设备超过保养时间,不能起飞
if(!upkeepStatus){
await this.$confirm(`设备超三个月未进行保养,存在安全隐患,无法进行正常飞行!`, "温馨提示", {
cancelButtonText: "取消",
confirmButtonText: "确定",
showClose: false,
});
return;
}
//保养周期小于20天时,提示保养
if(countdown==0 || (countdown && countdown<=20)){
this.$message({
type: "warning",
message: `需安排时间进行保养,上次保养时间为${upkeepTime},距离下次保养时间还有${countdown}日!超出时间将无法正常飞行!!!`,
duration: 2000,
});
}
this.departmentName = departmentName;
if (!hangar.currentOperator) {
// 没有接管人的情况下该设备所属部门与用户一致则直接接管
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论