()
| 77 | * @author: 白雾茫茫丶 |
| 78 | */ |
| 79 | export const ProFormLeader: FC = () => { |
| 80 | const { formatMessage } = useIntl(); |
| 81 | /** |
| 82 | * @description: 获取用户列表 |
| 83 | * @author: 白雾茫茫丶 |
| 84 | */ |
| 85 | const { data: userList } = useRequest(async (params) => get(await getUserList(params), 'data.list', []), { |
| 86 | defaultParams: [{ current: 1, pageSize: 9999 }], |
| 87 | }); |
| 88 | return ( |
| 89 | <ProFormSelect |
| 90 | name="leader" |
| 91 | label={formatMessage({ id: INTERNATION.LEADER })} |
| 92 | colProps={{ span: 24 }} |
| 93 | placeholder={formatMessage({ id: INTERNATION.PLACEHOLDER_SELETED }) + |
| 94 | formatMessage({ id: INTERNATION.LEADER })} |
| 95 | options={userList?.map((u: API.USERMANAGEMENT) => ({ label: u.cn_name, value: u.user_id })) || []} |
| 96 | fieldProps={{ |
| 97 | showSearch: true, |
| 98 | }} |
| 99 | rules={[{ |
| 100 | required: true, message: formatMessage({ id: INTERNATION.PLACEHOLDER_SELETED }) + |
| 101 | formatMessage({ id: INTERNATION.LEADER }), |
| 102 | }]} |
| 103 | /> |
| 104 | ) |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * @description: 排序 |
nothing calls this directly
no test coverage detected