西安三号线延续保护显示调整

This commit is contained in:
fan 2021-08-03 10:37:18 +08:00
parent b8d2df5cd8
commit 3a7c571c6f
2 changed files with 6 additions and 4 deletions

View File

@ -261,9 +261,10 @@ export default {
if (row && row.overlapCode && this.overlapData[row.overlapCode] && if (row && row.overlapCode && this.overlapData[row.overlapCode] &&
this.overlapData[row.overlapCode].pathList.length && this.overlapData[row.overlapCode].pathList.length &&
this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) { this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) {
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].switchCode); const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length;
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode);
if (switchDevice) { if (switchDevice) {
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].normal ? '定位保护' : '反位保护'); name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护');
} }
} }
return name; return name;

View File

@ -105,9 +105,10 @@ export default {
if (row && row.overlapCode && this.overlapData[row.overlapCode] && if (row && row.overlapCode && this.overlapData[row.overlapCode] &&
this.overlapData[row.overlapCode].pathList.length && this.overlapData[row.overlapCode].pathList.length &&
this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) { this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) {
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].switchCode); const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length;
const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode);
if (switchDevice) { if (switchDevice) {
name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[0].normal ? '定位保护' : '反位保护'); name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护');
} }
} }
return name; return name;