代码调整

This commit is contained in:
joylink_cuiweidong 2022-04-29 14:02:43 +08:00
parent 06b954eca0
commit 204d14e57c

View File

@ -33,8 +33,12 @@ export default class SaidLamp extends Group {
create() { create() {
const model = this.model; const model = this.model;
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain',
'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'Recovery', 'Accident', 'Occlusion'];
'PickAssist', 'Recovery', 'Accident', 'Occlusion']; // 'TotalAssist', 'DepartAssist',
// 'PickAssist',
// { name: '总辅助', value: 'TotalAssist' },
// { name: '发车辅助', value: 'DepartAssist' },
// { name: '接车辅助', value: 'PickAssist' },
if (lampDevice.includes(this._type)) { if (lampDevice.includes(this._type)) {
this.control = new EControl({ this.control = new EControl({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -210,7 +214,7 @@ export default class SaidLamp extends Group {
} else if (datieType.includes(model._type)) { } else if (datieType.includes(model._type)) {
if (model.aspect) { if (model.aspect) {
// 接车 // 接车
if (model._type == deviceType.PickArrow) { if (model._type == deviceType.PickArrow) { // 接车灯
if (model.runStatus == 'R') { // 接车 if (model.runStatus == 'R') { // 接车
// 接车状态:发车灯灭,接车灯默认是黄色,占用时红色 // 接车状态:发车灯灭,接车灯默认是黄色,占用时红色
if (model.aspect == 'O') { if (model.aspect == 'O') {
@ -219,9 +223,9 @@ export default class SaidLamp extends Group {
this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor); this.control && this.control.setControlColor(this.deviceStyle.noOccupiedColor);
} }
} else if (model.runStatus == 'D') { // 发车 } else if (model.runStatus == 'D') { // 发车
this.control && this.control.setControlColor(this.deviceStyle.lamp.controlColor); this.control && this.control.setControlColor(this.deviceStyle.fill);
} }
} else if (model._type == deviceType.DepartArrow) { // 发车 } else if (model._type == deviceType.DepartArrow) { // 发车
if (model.runStatus == 'D') { // 发车 if (model.runStatus == 'D') { // 发车
// 发车状态:接车灯灭,发车灯默认是绿色,占用时红色 // 发车状态:接车灯灭,发车灯默认是绿色,占用时红色
if (model.aspect == 'O') { if (model.aspect == 'O') {
@ -231,7 +235,7 @@ export default class SaidLamp extends Group {
} }
} else if (model.runStatus == 'R') { // 接车 } else if (model.runStatus == 'R') { // 接车
this.control && this.control.setControlColor(this.deviceStyle.lamp.controlColor); this.control && this.control.setControlColor(this.deviceStyle.fill);
} }
} else { } else {
switch (model.aspect) { switch (model.aspect) {