岔芯边缘道岔区段关联道岔导致报错调整

This commit is contained in:
fan 2023-10-30 16:26:58 +08:00
parent c98c50f401
commit 313f716613

View File

@ -483,6 +483,9 @@ export default class Section extends Group {
// 哈尔滨线路 南京二 道岔相关区段设置 默认颜色
if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) {
const switchModel = this.mapDevice[model.relSwitchCode];
if (!switchModel) {
return;
}
const sectionB = switchModel.sectionBCode === model.code ? this.mapDevice[switchModel.sectionBCode] : null;
const sectionC = switchModel.sectionCCode === model.code ? this.mapDevice[switchModel.sectionCCode] : null;
const sectionA = this.mapDevice[switchModel.sectionACode];