fix: 用户管理 更新时岗位选择option无法正常显示

This commit is contained in:
dap
2024-09-30 07:49:26 +08:00
parent d6ecf10700
commit cf9cbfd6d2
2 changed files with 348 additions and 1896 deletions

View File

@@ -136,7 +136,17 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
}, },
]); ]);
// 更新 && 赋值 // 更新 && 赋值
const { postIds = [], roleIds = [], roles, user } = await findUserInfo(id); const {
postIds = [],
posts,
roleIds = [],
roles,
user,
} = await findUserInfo(id);
const postOptions = posts.map((item) => ({
label: item.postName,
value: item.postId,
}));
formApi.updateSchema([ formApi.updateSchema([
{ {
componentProps: { componentProps: {
@@ -151,6 +161,12 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
}, },
fieldName: 'roleIds', fieldName: 'roleIds',
}, },
{
componentProps: {
options: postOptions,
},
fieldName: 'postIds',
},
]); ]);
// 部门选择 // 部门选择
await setupDeptSelect(); await setupDeptSelect();

2226
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff