调整状态

This commit is contained in:
zyy 2020-09-08 13:15:09 +08:00
parent 49d791428d
commit 2d461041ca

View File

@ -469,32 +469,32 @@ export default class Switch extends Group {
// 处理岔芯颜色
setSectionState(section, state) {
const sectionC = store.getters['map/getDeviceByCode'](state.sectionCCode);
if (sectionC) {
const sectionA = store.getters['map/getDeviceByCode'](state.sectionACode);
if (sectionA) {
// 空闲
section.setStyle({'fill': this.style.Section.line.spareColor});
section.show();
// 道岔保护区段锁闭
if (sectionC.overlapLock) {
if (sectionA.overlapLock) {
section.show();
section.setStyle({'fill': this.style.Section.line.protectiveLockColor});
}
// 空闲锁闭或者叫进路锁闭
if (sectionC.routeLock) {
if (sectionA.routeLock) {
section.setStyle({'fill': this.style.Section.line.routeLockColor, 'stroke': this.style.Section.line.routeLockColor, 'lineWidth': this.style.Section.line.beyondWidth});
section.show();
}
// 非CBTC车占用
if (sectionC.nctOccupied) {
if (sectionA.nctOccupied) {
section.show();
section.setStyle({'fill': this.style.Section.line.unCommunicationOccupiedColor, 'stroke': this.style.Section.line.unCommunicationOccupiedColor, 'lineWidth': this.style.Section.line.beyondWidth});
}
// CBTC车占用
if (sectionC.ctOccupied) {
if (sectionA.ctOccupied) {
section.show();
section.setStyle({'fill': this.style.Section.line.communicationOccupiedColor, 'stroke': this.style.Section.line.communicationOccupiedColor, 'lineWidth': this.style.Section.line.beyondWidth});
}
if (sectionC.cutOff) {
if (sectionA.cutOff) {
section.hide();
}
}