diff --git a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue index cdef5daca..1dc216c6f 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue @@ -261,9 +261,10 @@ export default { if (row && row.overlapCode && this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList.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) { - 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; diff --git a/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue index ad3a7e03d..9cee32dfb 100644 --- a/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue @@ -105,9 +105,10 @@ export default { if (row && row.overlapCode && this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList.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) { - 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;