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