diff --git a/src/store/modules/map.js b/src/store/modules/map.js index de2908330..793d90b86 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -891,15 +891,16 @@ const map = { updateStationStand: (state, status) => { const holdIndex = state.holdStandList.indexOf(status.code); const jumpIndex = state.jumpStandList.indexOf(status.code); - if ((status.stationHoldTrain || status.centerHoldTrain) && holdIndex < 0) { - state.holdStandList.push(status.code); - } else if (!(status.stationHoldTrain && status.centerHoldTrain) && holdIndex > -1) { + const device = state.mapDevice[status.code]; + if ((device.stationHoldTrain || device.centerHoldTrain) && holdIndex < 0) { + state.holdStandList.push(device.code); + } else if (!(device.stationHoldTrain && device.centerHoldTrain) && holdIndex > -1) { state.holdStandList.splice(holdIndex, 1); } state.holdStatus = state.holdStandList.length > 0; - if ((status.assignSkip || status.allSkip) && jumpIndex < 0) { - state.jumpStandList.push(status.code); - } else if (!(status.assignSkip && status.allSkip) && jumpIndex > -1) { + if ((device.assignSkip || device.allSkip) && jumpIndex < 0) { + state.jumpStandList.push(device.code); + } else if (!(device.assignSkip && device.allSkip) && jumpIndex > -1) { state.jumpStandList.splice(jumpIndex, 1); } state.jumpStatus = state.jumpStandList.length > 0;