diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 49c8173c1..973a08786 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -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 // 1按下、0弹起 + } + }; + 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,