提交 | 用户 | 时间
|
e7c126
|
1 |
import request from '@/config/axios'
|
H |
2 |
|
|
3 |
export interface StudentVO {
|
|
4 |
id: number
|
|
5 |
name: string
|
|
6 |
description: string
|
|
7 |
birthday: Date
|
|
8 |
sex: number
|
|
9 |
enabled: boolean
|
|
10 |
avatar: string
|
|
11 |
video: string
|
|
12 |
memo: string
|
|
13 |
}
|
|
14 |
|
|
15 |
// 查询学生分页
|
|
16 |
export const getStudentPage = async (params) => {
|
|
17 |
return await request.get({ url: `/infra/student/page`, params })
|
|
18 |
}
|
|
19 |
|
|
20 |
// 查询学生详情
|
|
21 |
export const getStudent = async (id: number) => {
|
|
22 |
return await request.get({ url: `/infra/student/get?id=` + id })
|
|
23 |
}
|
|
24 |
|
|
25 |
// 新增学生
|
|
26 |
export const createStudent = async (data: StudentVO) => {
|
|
27 |
return await request.post({ url: `/infra/student/create`, data })
|
|
28 |
}
|
|
29 |
|
|
30 |
// 修改学生
|
|
31 |
export const updateStudent = async (data: StudentVO) => {
|
|
32 |
return await request.put({ url: `/infra/student/update`, data })
|
|
33 |
}
|
|
34 |
|
|
35 |
// 删除学生
|
|
36 |
export const deleteStudent = async (id: number) => {
|
|
37 |
return await request.delete({ url: `/infra/student/delete?id=` + id })
|
|
38 |
}
|
|
39 |
|
|
40 |
// 导出学生 Excel
|
|
41 |
export const exportStudent = async (params) => {
|
|
42 |
return await request.download({ url: `/infra/student/export-excel`, params })
|
|
43 |
}
|
|
44 |
|
|
45 |
// ==================== 子表(学生联系人) ====================
|
|
46 |
|
|
47 |
// 获得学生联系人分页
|
|
48 |
export const getStudentContactPage = async (params) => {
|
|
49 |
return await request.get({ url: `/infra/student/student-contact/page`, params })
|
|
50 |
}
|
|
51 |
// 新增学生联系人
|
|
52 |
export const createStudentContact = async (data) => {
|
|
53 |
return await request.post({ url: `/infra/student/student-contact/create`, data })
|
|
54 |
}
|
|
55 |
|
|
56 |
// 修改学生联系人
|
|
57 |
export const updateStudentContact = async (data) => {
|
|
58 |
return await request.put({ url: `/infra/student/student-contact/update`, data })
|
|
59 |
}
|
|
60 |
|
|
61 |
// 删除学生联系人
|
|
62 |
export const deleteStudentContact = async (id: number) => {
|
|
63 |
return await request.delete({ url: `/infra/student/student-contact/delete?id=` + id })
|
|
64 |
}
|
|
65 |
|
|
66 |
// 获得学生联系人
|
|
67 |
export const getStudentContact = async (id: number) => {
|
|
68 |
return await request.get({ url: `/infra/student/student-contact/get?id=` + id })
|
|
69 |
}
|
|
70 |
|
|
71 |
// ==================== 子表(学生班主任) ====================
|
|
72 |
|
|
73 |
// 获得学生班主任分页
|
|
74 |
export const getStudentTeacherPage = async (params) => {
|
|
75 |
return await request.get({ url: `/infra/student/student-teacher/page`, params })
|
|
76 |
}
|
|
77 |
// 新增学生班主任
|
|
78 |
export const createStudentTeacher = async (data) => {
|
|
79 |
return await request.post({ url: `/infra/student/student-teacher/create`, data })
|
|
80 |
}
|
|
81 |
|
|
82 |
// 修改学生班主任
|
|
83 |
export const updateStudentTeacher = async (data) => {
|
|
84 |
return await request.put({ url: `/infra/student/student-teacher/update`, data })
|
|
85 |
}
|
|
86 |
|
|
87 |
// 删除学生班主任
|
|
88 |
export const deleteStudentTeacher = async (id: number) => {
|
|
89 |
return await request.delete({ url: `/infra/student/student-teacher/delete?id=` + id })
|
|
90 |
}
|
|
91 |
|
|
92 |
// 获得学生班主任
|
|
93 |
export const getStudentTeacher = async (id: number) => {
|
|
94 |
return await request.get({ url: `/infra/student/student-teacher/get?id=` + id })
|
|
95 |
}
|