mirror of
https://github.com/PlayEdu/backend
synced 2025-07-20 23:39:34 +08:00
管理员新建、编辑优化
This commit is contained in:
parent
c21c55fce8
commit
d3422f877f
@ -96,16 +96,6 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
|||||||
onFinishFailed={onFinishFailed}
|
onFinishFailed={onFinishFailed}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
>
|
>
|
||||||
<Form.Item label="角色" name="roleIds">
|
|
||||||
<Select
|
|
||||||
style={{ width: 200 }}
|
|
||||||
mode="multiple"
|
|
||||||
allowClear
|
|
||||||
placeholder="请选择角色"
|
|
||||||
onChange={handleChange}
|
|
||||||
options={roles}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="姓名"
|
label="姓名"
|
||||||
name="name"
|
name="name"
|
||||||
@ -130,11 +120,20 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
|
|||||||
placeholder="请输入登录密码"
|
placeholder="请输入登录密码"
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label="角色" name="roleIds">
|
||||||
|
<Select
|
||||||
|
style={{ width: 200 }}
|
||||||
|
mode="multiple"
|
||||||
|
allowClear
|
||||||
|
placeholder="请选择角色"
|
||||||
|
onChange={handleChange}
|
||||||
|
options={roles}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="禁止登录"
|
label="禁止登录"
|
||||||
name="is_ban_login"
|
name="is_ban_login"
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
rules={[{ required: true, message: "请选择禁止登录!" }]}
|
|
||||||
>
|
>
|
||||||
<Switch onChange={onChange} />
|
<Switch onChange={onChange} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
@ -67,7 +67,7 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
|||||||
id,
|
id,
|
||||||
values.name,
|
values.name,
|
||||||
values.email,
|
values.email,
|
||||||
values.password,
|
values.password || "",
|
||||||
values.is_ban_login,
|
values.is_ban_login,
|
||||||
values.roleIds
|
values.roleIds
|
||||||
)
|
)
|
||||||
@ -114,16 +114,6 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
|||||||
onFinishFailed={onFinishFailed}
|
onFinishFailed={onFinishFailed}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
>
|
>
|
||||||
<Form.Item label="角色" name="roleIds">
|
|
||||||
<Select
|
|
||||||
style={{ width: 200 }}
|
|
||||||
mode="multiple"
|
|
||||||
allowClear
|
|
||||||
placeholder="请选择角色"
|
|
||||||
onChange={handleChange}
|
|
||||||
options={roles}
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="姓名"
|
label="姓名"
|
||||||
name="name"
|
name="name"
|
||||||
@ -138,16 +128,22 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
|
|||||||
>
|
>
|
||||||
<Input style={{ width: 200 }} placeholder="请输入学员邮箱" />
|
<Input style={{ width: 200 }} placeholder="请输入学员邮箱" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item label="密码" name="password">
|
||||||
label="密码"
|
|
||||||
name="password"
|
|
||||||
rules={[{ required: true, message: "请输入登录密码!" }]}
|
|
||||||
>
|
|
||||||
<Input.Password
|
<Input.Password
|
||||||
style={{ width: 200 }}
|
style={{ width: 200 }}
|
||||||
placeholder="请输入登录密码"
|
placeholder="请输入登录密码"
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label="角色" name="roleIds">
|
||||||
|
<Select
|
||||||
|
style={{ width: 200 }}
|
||||||
|
mode="multiple"
|
||||||
|
allowClear
|
||||||
|
placeholder="请选择角色"
|
||||||
|
onChange={handleChange}
|
||||||
|
options={roles}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label="禁止登录"
|
label="禁止登录"
|
||||||
name="is_ban_login"
|
name="is_ban_login"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user