This commit is contained in:
fan 2022-05-06 14:22:52 +08:00
commit 9cd2b9b2d2
6 changed files with 115 additions and 18 deletions

View File

@ -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: {

View File

@ -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;

View File

@ -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') { // 闭塞
// // blockStatusfalse * 指示灯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') { // 闭塞
// blockStatusfalse * 指示灯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 {

View File

@ -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 = {

View File

@ -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: '复原'}
}
};

View File

@ -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}'
}
}
}