This commit is contained in:
joylink_cuiweidong 2021-01-08 09:54:21 +08:00
commit 18ff2dcd22

View File

@ -498,15 +498,15 @@ class Signal extends Group {
} else if (this.style.Signal.lamp.faultType == 'cross') {
this.lamps[0].setFault2Corss(true);
} else if (this.style.Signal.lamp.faultType == 'watch') {
const model = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
if (model && model.instance) {
model.instance.setControlColor('red');
const deivce = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
if (deivce && deivce.instance) {
deivce.instance.setControlColor('red');
// if (model.redOpen) {
// model.instance.setControlColor('red');
// deivce.instance.setControlColor('red');
// } else if (model.greenOpen || model.yellowOpen) {
// model.instance.setControlColor('green');
// deivce.instance.setControlColor('green');
// } else {
// model.instance.setControlColor('#9F9C9C');
// deivce.instance.setControlColor('#9F9C9C');
// }
}
} else if (this.style.Signal.lamp.faultType == 'light') {
@ -648,9 +648,9 @@ class Signal extends Group {
} else if (this.style.Signal.lamp.faultType == 'cross') {
this.lamps[0].setFault2Corss(false);
} else if (this.style.Signal.lamp.faultType == 'watch') {
const model = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
if (model && model.instance) {
model.instance.setControlColor('#9F9C9C');
const device = findDeviceByModelDepType(this.model, deviceType.LampFilament, 'stationCode');
if (device && device.instance) {
device.instance.setControlColor('#9F9C9C');
}
} else if (this.style.Signal.lamp.faultType == 'light') {
this.lamps[0].setAnimationEnd();