修复 修改时并未正确渲染

This commit is contained in:
lai
2024-07-24 15:01:44 +08:00
parent a9ee7aa925
commit f8a43042db

View File

@@ -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"
>
<a-tree-select
v-model:value="modalState.from.tenantId"