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([
{
componentProps: {
@ -151,6 +161,12 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
},
fieldName: 'roleIds',
},
{
componentProps: {
options: postOptions,
},
fieldName: 'postIds',
},
]);
//
await setupDeptSelect();

File diff suppressed because it is too large Load Diff