fix: 用户管理 更新时岗位选择option无法正常显示
This commit is contained in:
parent
d6ecf10700
commit
cf9cbfd6d2
@ -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
2226
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user