@@ -116,6 +116,7 @@
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import TopLang from './topLang'
|
||||
import NoticeMarquee from './noticeMarquee'
|
||||
import { resetRouter } from '@/router'
|
||||
import toggleRole from '@/components/toggleRole'
|
||||
export default {
|
||||
components: { TopLang, NoticeMarquee, toggleRole },
|
||||
@@ -123,7 +124,7 @@ export default {
|
||||
return {
|
||||
activeIndex: '2',
|
||||
isReviewer: false,
|
||||
userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||
// userTypeShortName: zzSessionStorage.getItem('userTypeShortName'),
|
||||
notice: '',
|
||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
@@ -139,6 +140,7 @@ export default {
|
||||
'device',
|
||||
'TotalNeedSignSystemDocCount',
|
||||
'language',
|
||||
'userTypeShortName',
|
||||
]),
|
||||
roles() {
|
||||
return this.$store.state.user.roles
|
||||
@@ -244,6 +246,7 @@ export default {
|
||||
.dispatch('permission/generateRoutes')
|
||||
.then(async (res) => {
|
||||
if (res && res.length > 0) {
|
||||
resetRouter()
|
||||
await this.$store.dispatch('global/getNoticeList')
|
||||
this.$router.addRoutes(res)
|
||||
this.toggleRoleLoading = false
|
||||
@@ -263,11 +266,19 @@ export default {
|
||||
'role:rir',
|
||||
])
|
||||
) {
|
||||
this.$router.replace({ path: '/trials/trials-list' })
|
||||
history.replaceState(null, null, '/trials/trials-list')
|
||||
history.go(0)
|
||||
// this.$router.replace({ path: '/trials/trials-list' })
|
||||
} else {
|
||||
this.$router.replace({ path: '/trials' })
|
||||
history.replaceState(null, null, '/trials')
|
||||
history.go(0)
|
||||
// this.$router.replace({ path: '/trials/trials-workbench' })
|
||||
}
|
||||
window.location.reload()
|
||||
this.toggleRoleVisible = false
|
||||
this.toggleRoleLoading = false
|
||||
this.$nextTick(() => {
|
||||
window.location.reload()
|
||||
})
|
||||
} else {
|
||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||
this.toggleRoleLoading = false
|
||||
|
||||
Reference in New Issue
Block a user