From 1e241b3460af38602153ed1340f85721118bd814 Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 2 Dec 2022 10:53:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=8C=E8=B0=83=E7=8A=B6=E6=80=81=E4=B8=8B?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=BD=A6=E7=AB=99=E6=8A=A5=E9=94=99=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/fuzhou_01/menus/menuStation.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index cb89b0f32..9863d2d24 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -58,7 +58,7 @@ export default { return false; } else { const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode); - return !(myStation.centralized && myStation.chargeStationCodeList.includes(station.code)); + return !(myStation && myStation.centralized && myStation.chargeStationCodeList.includes(station.code)); } }, isShow: (station, work) => work === 'localWork' @@ -72,7 +72,7 @@ export default { return false; } else { const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode); - return !(myStation.centralized && myStation.chargeStationCodeList.includes(station.code)); + return !(myStation && myStation.centralized && myStation.chargeStationCodeList.includes(station.code)); } }, isShow: (station, work) => work === 'localWork' @@ -142,8 +142,8 @@ export default { initMenu() { this.menu = []; this.menuNormal.forEach(menuItem => { - menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false; menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true; + menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, this.work) : false; this.menu.push(menuItem); });