From 5a32098cb881d47e71e9faa717f7983bb21812da Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Fri, 12 Jul 2024 11:38:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E9=9D=A2=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=A7=9F=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/UserInfo/src/UserInfo.vue | 10 +++++++--- src/store/modules/permission.ts | 14 +++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/layout/components/UserInfo/src/UserInfo.vue b/src/layout/components/UserInfo/src/UserInfo.vue index 9e7f89c23..2603b979c 100644 --- a/src/layout/components/UserInfo/src/UserInfo.vue +++ b/src/layout/components/UserInfo/src/UserInfo.vue @@ -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 = () => {
- - {{ userName }} - +
+ {{ userName }} + {{ tenant.text }} +