| | |
| | | ProFormTextArea, |
| | | ProFormRadio |
| | | } from '@ant-design/pro-components'; |
| | | import { FormattedMessage, useIntl } from '@umijs/max'; |
| | | import { Form, Modal } from 'antd'; |
| | | import moment from 'moment'; |
| | | import Http from '@/utils/http'; |
| | | |
| | | const Edit = (props) => { |
| | | const intl = useIntl(); |
| | | const [form] = Form.useForm(); |
| | | const { } = props; |
| | | |
| | | useEffect(() => { |
| | | form.resetFields(); |
| | | form.setFieldsValue({ |
| | | ...props.values |
| | | ...props.values, |
| | | roleIds: props.values.userRoleIds |
| | | }) |
| | | }, [form, props]) |
| | | |
| | |
| | | /> |
| | | </ProForm.Group> |
| | | <ProForm.Group> |
| | | {/* <ProFormSelect |
| | | name="status" |
| | | label="状态" |
| | | colProps={{ md: 12, xl: 12 }} |
| | | placeholder="请选择" |
| | | options={[ |
| | | { label: '正常', value: 1 }, |
| | | { label: '禁用', value: 0 }, |
| | | ]} |
| | | /> */} |
| | | <ProFormRadio.Group |
| | | name="status" |
| | | label="状态" |
| | |
| | | label="角色" |
| | | colProps={{ md: 12, xl: 12 }} |
| | | placeholder="请选择" |
| | | rules={[{ required: true, message: '角色不能为空!' }]} |
| | | rules={[{ required: true, type: 'array', message: '角色不能为空!' }]} |
| | | request={async ({ keyWords }) => { |
| | | const resp = await Http.doPostForm('api/role/query', { condition: keyWords }); |
| | | return resp.data; |
| | | }} |
| | | /> |
| | | </ProForm.Group> |
| | | <ProFormTextArea |