This commit is contained in:
fan 2022-05-06 17:42:59 +08:00
commit 52a304ef95

View File

@ -209,78 +209,60 @@ 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.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.runModel == 'S') { // 闭塞
console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888');
// 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.runModel == 'S') { // 闭塞
// console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888');
// if (model.runStatus == 'NO') {
// this.control && this.control.setControlColor(this.deviceStyle.fill);
// } else {
// // 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);
// }
// }
// }
// }
// } else {
console.log(model.runModel, model.runStatus, model.aspect, model.blockStatus, model._type, '88888888');
if (model.runStatus == 'A' || (model.runStatus == 'R' && model._type == deviceType.PickArrow ) || (model.runStatus == 'D' && model._type == deviceType.DepartArrow)) {
if (model.runModel == '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);
}
}
}
}
} else {
console.log(model.runStatus, model.aspect, model._type, '666666666');
if (model.runStatus == 'A' || (model.runStatus == 'R' && model._type == deviceType.PickArrow ) || (model.runStatus == 'D' && model._type == deviceType.DepartArrow)) {
// 发车状态:接车灯灭,发车灯默认是绿色,占用时红色
// 接车状态:发车灯灭,接车灯默认是黄色,占用时红色
} else {
// 发车状态:接车灯灭,发车灯默认是绿色,占用时红色
// 接车状态:发车灯灭,接车灯默认是黄色,占用时红色
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);
}
}
// 发车状态----接车灯灭 接车状态-----发车灯灭
if (model.runStatus == 'NO' || (model.runStatus == 'R' && model._type == deviceType.DepartArrow) || (model.runStatus == 'D' && model._type == deviceType.PickArrow)) {
this.control && this.control.setControlColor(this.deviceStyle.fill);
}
}
// 发车状态----接车灯灭 接车状态-----发车灯灭
if (model.runStatus == 'NO' || (model.runStatus == 'R' && model._type == deviceType.DepartArrow) || (model.runStatus == 'D' && model._type == deviceType.PickArrow)) {
this.control && this.control.setControlColor(this.deviceStyle.fill);
}
// }
} else {
switch (model.aspect) {