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