diff --git a/src/jmapNew/theme/components/menus/dialog/standDetail.vue b/src/jmapNew/theme/components/menus/dialog/standDetail.vue index 949388fba..93311e0b4 100644 --- a/src/jmapNew/theme/components/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/components/menus/dialog/standDetail.vue @@ -127,7 +127,8 @@ export default { }, computed: { ...mapGetters('map', [ - 'stationList' + 'stationList', + 'stationStandList' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -157,20 +158,22 @@ export default { methods: { loadInitData(selected) { this.tempData = []; - + this.stationList.sort((a, b) => { + return parseInt(a.kmRange) - parseInt(b.kmRange); + }); const index = this.stationList.findIndex(n => n.code == selected.stationCode); let stationStand, station; - if (selected.direction == '01') { // 下行 + if (!selected.right) { // 下行 // 下行时,此站不是最后一站 if (index != 0) { - stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code); - station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); + station = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code); + stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && !stand.right); } } else { // 上行时,此站不是最后一站 if (index != this.stationList.length - 1) { - stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code); - station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode); + station = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code); + stationStand = this.stationStandList.find(stand => stand.stationCode === station.code && stand.right); } } @@ -186,7 +189,7 @@ export default { if (!stationStand || !station) { this.treeData[2].children[0].value = `自动`; } else { - this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动`; + this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工(${selected.runLevelTime})` : `至${station.name}${stationStand.name}:自动`; } }, doShow(operate, selected) { @@ -247,7 +250,7 @@ export default {