【项目权限】切换角色后进入了没有权限的项目
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
97411b7eaf
commit
2fca310327
|
|
@ -56,7 +56,8 @@ export default {
|
|||
TrialConfig: {},
|
||||
TrialStatusStr: null,
|
||||
trialId: null,
|
||||
IsAdditionalAssessment: false
|
||||
IsAdditionalAssessment: false,
|
||||
isReload: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -71,7 +72,11 @@ export default {
|
|||
if (~url.indexOf('?')) {
|
||||
query = url.split('?')[1]
|
||||
}
|
||||
zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
|
||||
if (!this.isReload) {
|
||||
zzSessionStorage.setItem('lastWorkbench', `${v.path}${query ? '?' : ''}${query}`)
|
||||
} else {
|
||||
this.isReload = false
|
||||
}
|
||||
var firstGoIn = this.trialsRouter.children.find(v => { return v.name === 'TrialsPanel' }).children[0]
|
||||
if (this.trialsTab === '/trials/trials-panel') {
|
||||
var targetPath = firstGoIn.path
|
||||
|
|
@ -96,6 +101,9 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$EventBus.$on("reload", () => {
|
||||
this.isReload = true
|
||||
})
|
||||
var query = ``
|
||||
var url = window.location.href
|
||||
if (~url.indexOf('?')) {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@
|
|||
<div class="navbar navbar-flex-wrapper">
|
||||
<div class="leftMenu">
|
||||
<div class="navbar-flex-wrapper">
|
||||
<hamburger
|
||||
:is-active="sidebar.opened"
|
||||
class="hamburger-container"
|
||||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
<hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
|
||||
<breadcrumb class="breadcrumb-container" />
|
||||
</div>
|
||||
|
|
@ -51,12 +47,8 @@
|
|||
<TopLang></TopLang>
|
||||
</div>
|
||||
</div>
|
||||
<toggleRole
|
||||
v-if="toggleRoleVisible"
|
||||
:visible.sync="toggleRoleVisible"
|
||||
:loading="toggleRoleLoading"
|
||||
@save="loginByRole"
|
||||
/>
|
||||
<toggleRole v-if="toggleRoleVisible" :visible.sync="toggleRoleVisible" :loading="toggleRoleLoading"
|
||||
@save="loginByRole" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -192,12 +184,14 @@ export default {
|
|||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
// position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
|
|
@ -219,6 +213,7 @@ export default {
|
|||
// float: right;
|
||||
height: 100%;
|
||||
line-height: 65px;
|
||||
|
||||
// position: relative;
|
||||
&:focus {
|
||||
outline: none;
|
||||
|
|
@ -245,6 +240,7 @@ export default {
|
|||
.avatar-container {
|
||||
display: inline-block;
|
||||
margin-right: 200px;
|
||||
|
||||
.user-avatar {
|
||||
margin-top: 5px;
|
||||
width: 40px;
|
||||
|
|
@ -252,16 +248,19 @@ export default {
|
|||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-container {
|
||||
// margin-left: 30px;
|
||||
// position: absolute;
|
||||
// right: 20px;
|
||||
// top: 0px;
|
||||
cursor: pointer;
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
color: #999c9e;
|
||||
cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
<template>
|
||||
<div class="trials-navbar" style="position: relative">
|
||||
<div class="leftMenu">
|
||||
<img
|
||||
v-if="NODE_ENV === 'usa'"
|
||||
src="@/assets/title-logo.png"
|
||||
alt=""
|
||||
class="title-logo"
|
||||
/>
|
||||
<img v-else src="@/assets/system.png" alt="" style="width: 150px;height: 50px;margin-bottom: -7px;"/>
|
||||
<img v-if="NODE_ENV === 'usa'" src="@/assets/title-logo.png" alt="" class="title-logo" />
|
||||
<img v-else src="@/assets/system.png" alt="" style="width: 150px;height: 50px;margin-bottom: -7px;" />
|
||||
<span style="white-space: nowrap" v-if="NODE_ENV !== 'usa'">
|
||||
<!-- 中心影像系统(EICS) -->
|
||||
{{ $t('trials:trials:title:eics') }}
|
||||
|
|
@ -17,53 +12,38 @@
|
|||
<NoticeMarquee />
|
||||
</div>
|
||||
<div class="right-menu">
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
class="el-menu-demo"
|
||||
mode="horizontal"
|
||||
size="mini"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item
|
||||
v-if="
|
||||
!hasPermi([
|
||||
'role:air',
|
||||
'role:rpm',
|
||||
'role:radmin',
|
||||
'role:rcrc',
|
||||
'role:rir',
|
||||
])
|
||||
"
|
||||
index="1"
|
||||
>
|
||||
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" size="mini" @select="handleSelect">
|
||||
<el-menu-item v-if="
|
||||
!hasPermi([
|
||||
'role:air',
|
||||
'role:rpm',
|
||||
'role:radmin',
|
||||
'role:rcrc',
|
||||
'role:rir',
|
||||
])
|
||||
" index="1">
|
||||
<i class="el-icon-odometer" />
|
||||
<!-- 工作台 -->
|
||||
<span slot="title">{{ $t('trials:menuTitle:workbench') }}</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
v-if="!hasPermi(['role:zys', 'role:zyss', 'role:zybs'])"
|
||||
index="2"
|
||||
:disabled="TotalNeedSignSystemDocCount !== 0"
|
||||
>
|
||||
<el-menu-item v-if="!hasPermi(['role:zys', 'role:zyss', 'role:zybs'])" index="2"
|
||||
:disabled="TotalNeedSignSystemDocCount !== 0">
|
||||
<i class="el-icon-box" />
|
||||
<!-- 我的项目 -->
|
||||
<span slot="title">
|
||||
{{ $t('trials:tab:trials') }}
|
||||
</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item
|
||||
v-if="
|
||||
!hasPermi([
|
||||
'role:air',
|
||||
'role:rpm',
|
||||
'role:radmin',
|
||||
'role:rcrc',
|
||||
'role:rir',
|
||||
'role:zys',
|
||||
])
|
||||
"
|
||||
index="3"
|
||||
>
|
||||
<el-menu-item v-if="
|
||||
!hasPermi([
|
||||
'role:air',
|
||||
'role:rpm',
|
||||
'role:radmin',
|
||||
'role:rcrc',
|
||||
'role:rir',
|
||||
'role:zys',
|
||||
])
|
||||
" index="3">
|
||||
<i class="el-icon-chat-dot-square" />
|
||||
<!-- 通知消息 -->
|
||||
<span slot="title">{{ $t('trials:tab:notice') }}</span>
|
||||
|
|
@ -81,11 +61,8 @@
|
|||
$t('trials:trials-myinfo:title:accountInfo')
|
||||
}}</el-menu-item>
|
||||
<!-- 管理后台 -->
|
||||
<el-menu-item
|
||||
v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])"
|
||||
index="4-4"
|
||||
>{{ $t('trials:trials-myinfo:title:system') }}</el-menu-item
|
||||
>
|
||||
<el-menu-item v-if="hasPermi(['role:dev', 'role:oa', 'role:admin'])" index="4-4">{{
|
||||
$t('trials:trials-myinfo:title:system') }}</el-menu-item>
|
||||
<!-- 切换角色 -->
|
||||
<el-menu-item index="4-5" v-if="hasRole">{{
|
||||
$t('trials:trials-myinfo:title:toggleRole')
|
||||
|
|
@ -96,18 +73,12 @@
|
|||
}}</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
<TopLang
|
||||
v-if="
|
||||
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' && NODE_ENV !== 'usa'
|
||||
"
|
||||
/>
|
||||
<TopLang v-if="
|
||||
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' && NODE_ENV !== 'usa'
|
||||
" />
|
||||
</div>
|
||||
<toggleRole
|
||||
v-if="toggleRoleVisible"
|
||||
:visible.sync="toggleRoleVisible"
|
||||
:loading="toggleRoleLoading"
|
||||
@save="loginByRole"
|
||||
/>
|
||||
<toggleRole v-if="toggleRoleVisible" :visible.sync="toggleRoleVisible" :loading="toggleRoleLoading"
|
||||
@save="loginByRole" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -313,37 +284,45 @@ export default {
|
|||
overflow: hidden;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.el-breadcrumb__item {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.leftMenu {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding-left: 20px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
img {
|
||||
height: 28px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.title-logo {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 20px;
|
||||
position: relative;
|
||||
bottom: -3px;
|
||||
}
|
||||
}
|
||||
|
||||
.right-menu,
|
||||
.center-menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
|
||||
// line-height: 70px;
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
|
|
@ -361,9 +340,11 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
display: inline-block;
|
||||
margin-right: 200px;
|
||||
|
||||
.user-avatar {
|
||||
margin-top: 5px;
|
||||
width: 40px;
|
||||
|
|
@ -371,29 +352,34 @@ export default {
|
|||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-container {
|
||||
cursor: pointer;
|
||||
|
||||
.el-icon-caret-bottom {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
color: #999c9e;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
.el-menu-item.is-active {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
.center-menu {
|
||||
width: calc(100% - 1200px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-menu--horizontal > .my_info.el-submenu .el-submenu__icon-arrow {
|
||||
.el-menu--horizontal>.my_info.el-submenu .el-submenu__icon-arrow {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -667,6 +667,7 @@ export default {
|
|||
}
|
||||
this.hoursTip = hoursTip
|
||||
this.$EventBus.$on("reload", (data) => {
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
window.location.reload()
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue