行调状态下点击车站报错调整
This commit is contained in:
parent
0612de521f
commit
1e241b3460
@ -58,7 +58,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
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'
|
isShow: (station, work) => work === 'localWork'
|
||||||
@ -72,7 +72,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
const myStation = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
|
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'
|
isShow: (station, work) => work === 'localWork'
|
||||||
@ -142,8 +142,8 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.menuNormal.forEach(menuItem => {
|
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.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);
|
this.menu.push(menuItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user