|
|
@ -6,6 +6,7 @@ import { useDesign } from '@/hooks/web/useDesign' |
|
|
|
import avatarImg from '@/assets/imgs/avatar.gif' |
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
import { useTagsViewStore } from '@/store/modules/tagsView' |
|
|
|
import { getTenantId } from '@/utils/auth' |
|
|
|
|
|
|
|
defineOptions({ name: 'UserInfo' }) |
|
|
|
|
|
|
@ -28,6 +29,8 @@ const user = wsCache.get(CACHE_KEY.USER) |
|
|
|
const avatar = user.user.avatar ? user.user.avatar : avatarImg |
|
|
|
|
|
|
|
const userName = user.user.nickname ? user.user.nickname : 'Admin' |
|
|
|
const names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}] |
|
|
|
const tenant = names.find(item=>item.value == getTenantId()) |
|
|
|
|
|
|
|
const loginOut = () => { |
|
|
|
ElMessageBox.confirm(t('common.loginOutMessage'), t('common.reminder'), { |
|
|
@ -54,9 +57,10 @@ const toDocument = () => { |
|
|
|
<ElDropdown class="custom-hover custom-hover1" :class="prefixCls" trigger="click"> |
|
|
|
<div class="flex items-center"> |
|
|
|
<ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" /> |
|
|
|
<span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="color:#ffffff"> |
|
|
|
{{ userName }} |
|
|
|
</span> |
|
|
|
<div class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="display: flex; flex-direction: column;color:#ffffff"> |
|
|
|
<span> {{ userName }} </span> |
|
|
|
<span style="margin-top: 5px;text-align:center">{{ tenant.text }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<template #dropdown> |
|
|
|
<ElDropdownMenu> |
|
|
|