diff --git a/src/jmapNew/config/skinCode/datie_02.js b/src/jmapNew/config/skinCode/datie_02.js index f6f6971de..663dfa8c9 100644 --- a/src/jmapNew/config/skinCode/datie_02.js +++ b/src/jmapNew/config/skinCode/datie_02.js @@ -963,6 +963,8 @@ class SkinCode extends defaultStyle { defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#00ff00', + blockStatusColor:'#00ff00', + noBlockStatusColor:'#ffff00', }; this[deviceType.PickArrow] = { triangleLength: 15, @@ -976,6 +978,8 @@ class SkinCode extends defaultStyle { defaultColor: '#ccc', occupiedColor:'#f00', noOccupiedColor:'#ffff00', + blockStatusColor:'#00ff00', + noBlockStatusColor:'#ffff00', }; this[deviceType.Occlusion] = { text: { diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 5ea1d72ea..835288e76 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -481,7 +481,17 @@ class Jlmap { const selectButtonList = signalButtonList.filter(elem=>{ return elem.labelEnum === directionData.labelEnum && elem.stationCode == directionData.stationCode; }); - const selectMap = {'ASSIST':'mainAssistStatus', 'PICK_ASSIST':'receiveAssistStatus', 'DEPART_ASSIST':'deliverAssistStatus', 'CHANGE_DIRECTION':'changeDirectionStatus'}; + const selectMap = {'ASSIST':'mainAssistStatus', + 'PICK_ASSIST':'receiveAssistStatus', + 'DEPART_ASSIST':'deliverAssistStatus', + 'CHANGE_DIRECTION':'changeDirectionStatus', + // 闭塞按钮 + 'OCCLUSION':'blockStatus', + // 事故按钮 + 'ACCIDENT':'accidentStatus', + // 复原按钮 + 'RECOVERY':'restoreStatus' + }; // { value: 'ASSIST', label: '总辅助按钮' }, // { value: 'PICK_ASSIST', label: '接辅助按钮' }, // { value: 'DEPART_ASSIST', label: '发辅助按钮' }, @@ -509,6 +519,9 @@ class Jlmap { if (elem.receiveAspect != undefined) { model.aspect = elem.receiveAspect; } + if (elem.blockStatus != undefined ) { + model.blockStatus = elem.blockStatus; + } this.$painter.update(model); } break; @@ -520,6 +533,9 @@ class Jlmap { if (elem.deliverAspect != undefined) { model.aspect = elem.deliverAspect; } + if (elem.blockStatus != undefined ) { + model.blockStatus = elem.blockStatus; + } this.$painter.update(model); } break; diff --git a/src/jmapNew/shape/graph/SaidLamp/index.js b/src/jmapNew/shape/graph/SaidLamp/index.js index 2bdbc6f3b..bde4be211 100644 --- a/src/jmapNew/shape/graph/SaidLamp/index.js +++ b/src/jmapNew/shape/graph/SaidLamp/index.js @@ -209,27 +209,73 @@ export default class SaidLamp extends Group { this.control && this.control.setControlColor(this.deviceStyle.lamp.offColor); } else if (datieType.includes(model._type)) { if (model.aspect) { - // 接车 - if (model._type == deviceType.PickArrow) { // 接车灯 - if (model.runStatus == 'R') { // 接车 + // if (model.runStatus == 'S') { // 闭塞 + // // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 + // // 指示灯(O)为红色 + // if (model.blockStatus != undefined) { + // if (model.aspect == 'O') { + // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + // } else if (model.aspect == 'F') { + // if (model.blockStatus) { + // this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); + // } else { + // this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); + // } + // } + // } + // } + // // 接车 + // if (model._type == deviceType.PickArrow) { // 接车灯 + // if (model.runStatus == 'R' || model.runStatus == 'A') { // 接车 + // // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 + // if (model.aspect == 'O') { + // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + // } else if (model.aspect == 'F') { + // this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); + // } + // } else if (model.runStatus == 'D') { // 发车 + // this.control && this.control.setControlColor(this.deviceStyle.fill); + // } + // } else if (model._type == deviceType.DepartArrow) { // 发车灯 + // if (model.runStatus == 'D' || model.runStatus == 'A') { // 发车 + // // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 + // if (model.aspect == 'O') { + // this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + // } else if (model.aspect == 'F') { + // this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); + // } + // } else if (model.runStatus == 'R') { // 接车 + // this.control && this.control.setControlColor(this.deviceStyle.fill); + // } + // } + const signalButtons = [deviceType.PickArrow, deviceType.DepartArrow]; + if (signalButtons.includes(model._type)) { + if (model.runStatus == 'S') { // 闭塞 + // blockStatus:false * 指示灯(F)的时候为黄色,true为绿色 + // 指示灯(O)为红色 + if (model.blockStatus != undefined) { + if (model.aspect == 'O') { + this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); + } else if (model.aspect == 'F') { + if (model.blockStatus) { + this.control && this.control.setControlColor(this.deviceStyle.blockStatusColor); + } else { + this.control && this.control.setControlColor(this.deviceStyle.noBlockStatusColor); + } + } + } + } + if (model.runStatus == 'A' || (model.runStatus == 'R' && model._type == deviceType.PickArrow ) || (model.runStatus == 'D' && model._type == deviceType.DepartArrow)) { + // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 if (model.aspect == 'O') { this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); } else if (model.aspect == 'F') { this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); } - } else if (model.runStatus == 'D') { // 发车 - this.control && this.control.setControlColor(this.deviceStyle.fill); } - } else if (model._type == deviceType.DepartArrow) { // 发车灯 - if (model.runStatus == 'D') { // 发车 - // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 - if (model.aspect == 'O') { - this.control && this.control.setControlColor(this.deviceStyle.occupiedColor); - } else if (model.aspect == 'F') { - this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); - } - } else if (model.runStatus == 'R') { // 接车 + // 发车状态----接车灯灭 接车状态-----发车灯灭 + if ((model.runStatus == 'R' && model._type == deviceType.DepartArrow) || (model.runStatus == 'D' && model._type == deviceType.PickArrow)) { this.control && this.control.setControlColor(this.deviceStyle.fill); } } else { diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 8cb1bb578..f1591e476 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -643,7 +643,7 @@ export default { this.clearOperate(); } } else if (!buttonOperation) { - const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST']; + const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY']; if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE' ) { this.handleGuideSignal(model); } else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) { @@ -711,6 +711,24 @@ export default { labelEnum:model.labelEnum, stationCode:model.stationCode } + }, + // 闭塞按钮 + 'OCCLUSION':{ + operation:this.CTCCommand.assistPressBlock.menu.operation, + nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_BLOCK, + param:{ + labelEnum:model.labelEnum, + stationCode:model.stationCode + } + }, + // 复原按钮 + 'RECOVERY':{ + operation:this.CTCCommand.assistPressRestore.menu.operation, + nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RESTORE, + param:{ + labelEnum:model.labelEnum, + stationCode:model.stationCode + } } }; const operate = { diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 3a3989257..cd08cf924 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -374,7 +374,8 @@ export default { CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'}, CTC_ASSIST_PRESS_MAIN_ASSIST:{value: 'ASSIST_PRESS_MAIN_ASSIST', label: '总辅助'}, CTC_ASSIST_PRESS_RECEIVE_ASSIST:{value: 'ASSIST_PRESS_RECEIVE_ASSIST', label: '接辅助'}, - CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'} - + CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'}, + CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'}, + CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'} } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 096dd212c..cbbaf2f59 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3579,6 +3579,18 @@ export const OperationEvent = { operation: '1106', domId: '_Tips-CTC-AssistPressDeliverAssist-Menu{TOP}' } + }, + assistPressBlock:{ + menu: { + operation: '1107', + domId: '_Tips-CTC-AssistPressBlock-Menu{TOP}' + } + }, + assistPressRestore:{ + menu: { + operation: '1108', + domId: '_Tips-CTC-AssistPressRestore-Menu{TOP}' + } } }