修改生产界面

master
夜笙歌 7 months ago
parent d3ade946b2
commit d9b46d7a98

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

@ -201,6 +201,9 @@ export default {
this.$store.dispatch("Login", this.loginForm).then(() => { this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {} 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) || {} 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: this.redirect || "/"}).catch(() => {
// }); // });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => { this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {

Loading…
Cancel
Save