|
@@ -10,7 +10,7 @@
|
|
|
<a-icon type="down" />
|
|
|
</span>
|
|
|
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
|
|
|
- <a-menu-item v-for="(item, index) in authOrgs" :key="index" @click="changeRoles(item.orgSn)">
|
|
|
+ <a-menu-item v-for="(item, index) in authOrgsList" :key="index" @click="changeRoles(item.orgSn)">
|
|
|
<a-icon type="link" style="vertical-align: super;"/>
|
|
|
<span style="display: inline-block;white-space: nowrap;width: 100%;overflow: hidden;text-overflow:ellipsis;">{{ item.orgName }}</span>
|
|
|
</a-menu-item>
|
|
@@ -43,7 +43,19 @@ export default {
|
|
|
NoticeIcon
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo'])
|
|
|
+ ...mapGetters(['nickname', 'avatar', 'authOrgs', 'userInfo']),
|
|
|
+ authOrgsList () { // 过滤掉当前登录账户(不可由自己切换为自己)
|
|
|
+ const _this = this
|
|
|
+ const arr = []
|
|
|
+ if (this.authOrgs && this.authOrgs.length > 0) {
|
|
|
+ this.authOrgs.map(item => {
|
|
|
+ if (item.orgSn != _this.userInfo.orgSn) {
|
|
|
+ arr.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
},
|
|
|
data () {
|
|
|
return {
|