用户角色切换刷新问题
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-12-26 14:37:27 +08:00
parent 9c22809bae
commit 43f99b02c4
5 changed files with 15 additions and 4 deletions

View File

@ -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)) {

View File

@ -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)
}

View File

@ -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

View File

@ -788,6 +788,11 @@ export default {
created() {
this.initPage()
},
mounted(){
this.$EventBus.$on("reload", (data) => {
window.location.reload()
});
},
methods: {
initPage() {
this.getList()

View File

@ -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() {