mirror of
https://github.com/PlayEdu/backend
synced 2025-06-21 19:04:18 +08:00
新建学员携带部门id
This commit is contained in:
parent
6bbe2cbeec
commit
e133c724f3
@ -8,6 +8,7 @@ import { ValidataCredentials } from "../../../utils/index";
|
|||||||
|
|
||||||
interface PropInterface {
|
interface PropInterface {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
depIds: any;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,7 +18,11 @@ interface Option {
|
|||||||
children?: Option[];
|
children?: Option[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
export const MemberCreate: React.FC<PropInterface> = ({
|
||||||
|
open,
|
||||||
|
depIds,
|
||||||
|
onCancel,
|
||||||
|
}) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [departments, setDepartments] = useState<any>([]);
|
const [departments, setDepartments] = useState<any>([]);
|
||||||
@ -39,10 +44,10 @@ export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
|
|||||||
password: "",
|
password: "",
|
||||||
avatar: memberDefaultAvatar,
|
avatar: memberDefaultAvatar,
|
||||||
idCard: "",
|
idCard: "",
|
||||||
dep_ids: [],
|
dep_ids: depIds,
|
||||||
});
|
});
|
||||||
setAvatar(memberDefaultAvatar);
|
setAvatar(memberDefaultAvatar);
|
||||||
}, [form, open]);
|
}, [form, open, depIds]);
|
||||||
|
|
||||||
const getParams = () => {
|
const getParams = () => {
|
||||||
department.departmentList().then((res: any) => {
|
department.departmentList().then((res: any) => {
|
||||||
|
@ -361,6 +361,7 @@ const MemberPage = () => {
|
|||||||
/>
|
/>
|
||||||
<MemberCreate
|
<MemberCreate
|
||||||
open={createVisible}
|
open={createVisible}
|
||||||
|
depIds={dep_ids}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setCreateVisible(false);
|
setCreateVisible(false);
|
||||||
setRefresh(!refresh);
|
setRefresh(!refresh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user