From 6e3cdc6bd1b8fd273556016537403d6c4dcddce5 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 6 Jan 2021 11:27:55 +0800 Subject: [PATCH] =?UTF-8?q?bug56=20=E8=AE=BE=E7=BD=AE=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E5=90=8E=EF=BC=8C=E6=9F=A5=E8=AF=A2=E7=AB=99?= =?UTF-8?q?=E5=8F=B0=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=20=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/menus/dialog/standDetail.vue | 23 +++++++++++-------- .../components/menus/dialog/standRunLevel.vue | 19 ++++++++------- .../fuzhou_01/menus/dialog/standDetail.vue | 17 ++++++++------ 3 files changed, 34 insertions(+), 25 deletions(-) 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 {