2024-01-02 14:36:10 +08:00
|
|
|
import { XiAnConsts } from './PlatformConfig.js';
|
|
|
|
import { JlPlatform } from './JlPlatform.js';
|
|
|
|
|
|
|
|
class XiAnPlatform extends JlPlatform {
|
|
|
|
constructor(categoryType) {
|
|
|
|
super(categoryType);
|
|
|
|
}
|
|
|
|
get states() {
|
|
|
|
return this.getStates();
|
|
|
|
}
|
|
|
|
doRepaint() {
|
|
|
|
this.rectGraphic.stateFillColor = XiAnConsts.noTrainStop;
|
|
|
|
if (this.states.trainberth) {
|
|
|
|
this.rectGraphic.stateFillColor = XiAnConsts.trainStop;
|
|
|
|
}
|
|
|
|
if (this.states.upSkipstop || this.states.downSkipstop) {
|
|
|
|
this.rectGraphic.stateFillColor = XiAnConsts.trainJump;
|
|
|
|
}
|
|
|
|
/* const station = this.getGraphicApp().queryStore.queryByCodeAndType<Station>(
|
|
|
|
this.states.rtuId > 9 ? '' + this.states.rtuId : '0' + this.states.rtuId,
|
|
|
|
Station.Type
|
|
|
|
); */
|
2024-01-02 17:03:15 +08:00
|
|
|
if (this.datas.hasdoor && this.doorGraphic) {
|
2024-01-02 14:36:10 +08:00
|
|
|
this.doorGraphic.stateFillColor = XiAnConsts.doorGraphic.doorGreen;
|
|
|
|
/* if (!!station?.states.ipRtuStusDown) {
|
|
|
|
this.doorGraphic.stateFillColor = XiAnConsts.doorGraphic.doorBlue;
|
|
|
|
} */ if (this.states.psdCut) {
|
|
|
|
this.doorGraphic.stateFillColor = XiAnConsts.doorGraphic.doorRed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
super.doRepaint();
|
2024-01-02 17:03:15 +08:00
|
|
|
if (this.datas.hasdoor && this.doorGraphic) {
|
2024-01-02 14:36:10 +08:00
|
|
|
if (this.states.psdOpen) {
|
|
|
|
this.doorGraphic.doorCloseGraphic.visible = false;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
this.doorGraphic.doorCloseGraphic.visible = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.lozengeGraphic) {
|
|
|
|
if (this.states.emergstop) {
|
|
|
|
this.lozengeGraphic.lozenge.visible = true;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
this.lozengeGraphic.lozenge.visible = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.codeGraphic) {
|
|
|
|
if (this.states.upHold ||
|
|
|
|
this.states.upOccHold ||
|
|
|
|
this.states.downHold ||
|
|
|
|
this.states.downOccHold) {
|
|
|
|
this.codeGraphic.character.text = 'H';
|
|
|
|
this.codeGraphic.character.visible = true;
|
|
|
|
this.codeGraphic.circle.visible = true;
|
|
|
|
//上行扣车
|
|
|
|
if (this.states.upHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharYellow;
|
|
|
|
}
|
|
|
|
if (this.states.upOccHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharWhite;
|
|
|
|
}
|
|
|
|
if (this.states.upHold && this.states.upOccHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharRed;
|
|
|
|
}
|
|
|
|
//下行扣车
|
|
|
|
if (this.states.downHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharYellow;
|
|
|
|
}
|
|
|
|
if (this.states.downOccHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharWhite;
|
|
|
|
}
|
|
|
|
if (this.states.downHold && this.states.downOccHold) {
|
|
|
|
this.codeGraphic.character.style.fill =
|
|
|
|
XiAnConsts.codeGraphic.HCharRed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//运行等级
|
|
|
|
if (this.states.nextSectionRunLevel) {
|
|
|
|
this.codeGraphic.runLevel.visible = false;
|
|
|
|
this.codeGraphic.runLevel.text = this.states.nextSectionRunLevel;
|
|
|
|
}
|
|
|
|
//运行时间
|
|
|
|
if (this.states.nextSectionRunTime) {
|
|
|
|
this.codeGraphic.runTime.visible = true;
|
|
|
|
this.codeGraphic.runTime.text = this.states.nextSectionRunTime;
|
|
|
|
}
|
|
|
|
//停站时间
|
|
|
|
if (this.states.stopTime) {
|
|
|
|
this.codeGraphic.stopTime.visible = true;
|
|
|
|
this.codeGraphic.stopTime.text = this.states.stopTime;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export { XiAnPlatform };
|