From f8a43042db3e0b1484bf22272edec35b7a9c3bbe Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Wed, 24 Jul 2024 15:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=97=B6=E5=B9=B6=E6=9C=AA=E6=AD=A3=E7=A1=AE=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d6abf927..1c9fc7d3 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -354,6 +354,10 @@ function fnModalVisibleByVive(userId: string | number) { modalState.from = Object.assign(modalState.from, user); modalState.from.roleIds = roleIds; modalState.from.postIds = postIds; + //筛选是否拥有tenant角色 + modalState.showTenant = user.roles.some( + (role: any) => role.roleKey === 'tenant' + ); // 头像解析 modalState.from.avatar = userStore.fnAvatar(modalState.from.avatar); modalState.title = t('views.system.user.userInfo'); @@ -427,6 +431,11 @@ function fnModalVisibleByEdit(userId?: string | number) { modalState.from = Object.assign(modalState.from, user); modalState.from.roleIds = roleIds; modalState.from.postIds = postIds; + //筛选是否拥有tenant角色 + modalState.showTenant = user.roles.some( + (role: any) => role.roleKey === 'tenant' + ); + modalState.title = t('common.editText') + t('views.system.user.userInfo'); modalState.visibleByEdit = true; @@ -1258,6 +1267,7 @@ onMounted(() => { name="tenantId" :label-col="{ span: 3 }" :label-wrap="true" + v-show="modalState.showTenant" >