Данные строки ломают редирект и возвращают обратно на страницу с которой шёл редирект
beforeRouteEnter(to,from,next) {
let settingsLocalStorage = localStorage.getItem('settings')
if(settingsLocalStorage) {
$store.commit('budget/SET_SETTINGS', JSON.parse(settingsLocalStorage))
} else {
let {viewType, month, dealerShipId, year, quarter} = to.query
let settings = $store.state.budget.settings
$store.commit('budget/SET_SETTINGS', {
dealerShipId: dealerShipId || settings.dealerShipId,
viewType: viewType || settings.viewType,
month: month || settings.month,
quarter: quarter || settings.quarter,
year: year || settings.year,
})
}
next()
},