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