修改生产界面

master
夜笙歌 7 months ago
parent d3ade946b2
commit d9b46d7a98

@ -8,7 +8,7 @@ const user = {
name: '',
avatar: '',
roles: [],
permissions: []
permissions: [],
},
mutations: {
@ -32,7 +32,7 @@ const user = {
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
}
},
},
actions: {
@ -100,6 +100,7 @@ const user = {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
sessionStorage.removeItem('FLOORDATA')
removeToken()
resolve()
}).catch(error => {
@ -115,7 +116,8 @@ const user = {
removeToken()
resolve()
})
}
},
}
}

@ -201,6 +201,9 @@ export default {
this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {}
let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) || {}
if(routeData.route){
sessionStorage.setItem("FLOORDATA", JSON.stringify(routeData))
}
// this.$router.push({path: this.redirect || "/"}).catch(() => {
// });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {

Loading…
Cancel
Save