This commit is contained in:
fan 2022-05-11 14:56:20 +08:00
commit 54d73107cc

View File

@ -602,13 +602,13 @@ export default {
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
param: {signalCode: model.signalCode}
};
// 15s
if (signal.guideTime) {
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
this.sendCommand(operate);
} else {
this.$refs.password.doShow(operate);
}
// 15s
if (signal.guideTime) {
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
this.sendCommand(operate);
} else {
this.$refs.password.doShow(operate);
}
}
},
handelFaultSection(model) {
@ -725,6 +725,18 @@ export default {
stationCode:model.stationCode
}
},
//
'ACCIDENT':{
operation:this.CTCCommand.assistPressAccident.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
}
};
const noPasswordModelTypeMap = {
//
'OCCLUSION':{
operation:this.CTCCommand.assistPressBlock.menu.operation,
@ -742,34 +754,44 @@ export default {
labelEnum:model.labelEnum,
stationCode:model.stationCode
}
},
//
'ACCIDENT':{
operation:this.CTCCommand.assistPressAccident.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param:{
labelEnum:model.labelEnum,
stationCode:model.stationCode,
pressDown:model.pressDown ? 0 : 1 // 10
}
};
if (noPasswordModelTypeMap[model.type]) {
const operate = {
over:true,
operation: noPasswordModelTypeMap[model.type].operation,
code: model.code,
param: noPasswordModelTypeMap[model.type].param,
cmdType : noPasswordModelTypeMap[model.type].nextCmdType
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.clearOperate();
} else {
this.$refs.noticeInfo.doShow();
}
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
};
const operate = {
operation: modelTypeMap[model.type].operation,
code: model.code,
param: modelTypeMap[model.type].param
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
} else {
const operate = {
operation: modelTypeMap[model.type].operation,
code: model.code,
param: modelTypeMap[model.type].param
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
// const operate = {
// over: true,
// code: model.code,