用户角色切换刷新问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
9c22809bae
commit
43f99b02c4
|
@ -293,6 +293,7 @@ async function VueInit() {
|
||||||
}()
|
}()
|
||||||
_vm.$forceUpdate()
|
_vm.$forceUpdate()
|
||||||
}
|
}
|
||||||
|
Vue.prototype.$EventBus = new Vue()
|
||||||
Vue.prototype.$path = []
|
Vue.prototype.$path = []
|
||||||
var t = function (key) {
|
var t = function (key) {
|
||||||
if (!~Vue.prototype.$path.indexOf(key)) {
|
if (!~Vue.prototype.$path.indexOf(key)) {
|
||||||
|
|
|
@ -189,6 +189,7 @@ const actions = {
|
||||||
commit('SET_PERMISSIONS', permissions.Result)
|
commit('SET_PERMISSIONS', permissions.Result)
|
||||||
zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
|
zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
|
||||||
zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
|
zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
|
||||||
|
zzSessionStorage.removeItem('lastWorkbench')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,15 +270,16 @@ export default {
|
||||||
history.go(0)
|
history.go(0)
|
||||||
// this.$router.replace({ path: '/trials/trials-list' })
|
// this.$router.replace({ path: '/trials/trials-list' })
|
||||||
} else {
|
} else {
|
||||||
history.replaceState(null, null, '/trials')
|
history.replaceState(null, null, '/trials/trials-workbench')
|
||||||
history.go(0)
|
history.go(0)
|
||||||
// this.$router.replace({ path: '/trials/trials-workbench' })
|
// this.$router.replace({ path: '/trials/trials-workbench' })
|
||||||
}
|
}
|
||||||
this.toggleRoleVisible = false
|
this.toggleRoleVisible = false
|
||||||
this.toggleRoleLoading = false
|
this.toggleRoleLoading = false
|
||||||
this.$nextTick(() => {
|
this.$EventBus.$emit('reload')
|
||||||
window.location.reload()
|
// this.$nextTick(() => {
|
||||||
})
|
// window.location.reload()
|
||||||
|
// })
|
||||||
} else {
|
} else {
|
||||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||||
this.toggleRoleLoading = false
|
this.toggleRoleLoading = false
|
||||||
|
|
|
@ -788,6 +788,11 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.initPage()
|
this.initPage()
|
||||||
},
|
},
|
||||||
|
mounted(){
|
||||||
|
this.$EventBus.$on("reload", (data) => {
|
||||||
|
window.location.reload()
|
||||||
|
});
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initPage() {
|
initPage() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|
|
@ -487,6 +487,9 @@ export default {
|
||||||
hoursTip=this.$t('common:date:good evening')
|
hoursTip=this.$t('common:date:good evening')
|
||||||
}
|
}
|
||||||
this.hoursTip = hoursTip
|
this.hoursTip = hoursTip
|
||||||
|
this.$EventBus.$on("reload", (data) => {
|
||||||
|
window.location.reload()
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
|
|
Loading…
Reference in New Issue