rt-graphic-component/components/packages/Station/XiAnStation.js
2024-01-04 10:44:03 +08:00

43 lines
1.5 KiB
JavaScript

import { JlStation } from './JlStation.js';
import { CategoryType } from '../Platform/PlatformConfig.js';
import { XiAnConsts } from './StationConfig.js';
class XiAnStation extends JlStation {
_ipRtuStusDown = false;
constructor() {
super(CategoryType.XiAn);
}
get states() {
return this.getStates();
}
doRepaint() {
if (this.datas.hasControl && this.controlGraphic) {
this.controlGraphic.constrolConfig =
XiAnConsts.constrolGraphic.constrolConfig;
this.controlGraphic.stateArrowFillColor =
XiAnConsts.constrolGraphic.inArrowConfig.inArrowFillColorGray;
if (this.states.ipRtuStusInLocalCtrl) {
this.controlGraphic.constrolConfig.forEach((item) => {
if (item.codeText === '站控') {
item.circleFillColor = '0xFFFA0C';
}
else if (item.codeText === '中控') {
item.circleFillColor = '0x808080';
}
});
if (!this.states.ipRtuStusDown) {
this.controlGraphic.stateArrowFillColor ==
XiAnConsts.constrolGraphic.inArrowConfig.inArrowFillColorBlue;
}
}
}
super.doRepaint();
if (this.states.ipRtuStusDown !== this._ipRtuStusDown) {
this._ipRtuStusDown = this.states.ipRtuStusDown;
//this.handleBlueShow();
}
}
}
export { XiAnStation };