提交 | 用户 | 时间
|
e7c126
|
1 |
import request from '@/utils/request' |
H |
2 |
|
|
3 |
// 创建学生 |
|
4 |
export function createStudent(data) { |
|
5 |
return request({ |
|
6 |
url: '/infra/student/create', |
|
7 |
method: 'post', |
|
8 |
data: data |
|
9 |
}) |
|
10 |
} |
|
11 |
|
|
12 |
// 更新学生 |
|
13 |
export function updateStudent(data) { |
|
14 |
return request({ |
|
15 |
url: '/infra/student/update', |
|
16 |
method: 'put', |
|
17 |
data: data |
|
18 |
}) |
|
19 |
} |
|
20 |
|
|
21 |
// 删除学生 |
|
22 |
export function deleteStudent(id) { |
|
23 |
return request({ |
|
24 |
url: '/infra/student/delete?id=' + id, |
|
25 |
method: 'delete' |
|
26 |
}) |
|
27 |
} |
|
28 |
|
|
29 |
// 获得学生 |
|
30 |
export function getStudent(id) { |
|
31 |
return request({ |
|
32 |
url: '/infra/student/get?id=' + id, |
|
33 |
method: 'get' |
|
34 |
}) |
|
35 |
} |
|
36 |
|
|
37 |
// 获得学生分页 |
|
38 |
export function getStudentPage(params) { |
|
39 |
return request({ |
|
40 |
url: '/infra/student/page', |
|
41 |
method: 'get', |
|
42 |
params |
|
43 |
}) |
|
44 |
} |
|
45 |
// 导出学生 Excel |
|
46 |
export function exportStudentExcel(params) { |
|
47 |
return request({ |
|
48 |
url: '/infra/student/export-excel', |
|
49 |
method: 'get', |
|
50 |
params, |
|
51 |
responseType: 'blob' |
|
52 |
}) |
|
53 |
} |
|
54 |
|
|
55 |
// ==================== 子表(学生联系人) ==================== |
|
56 |
|
|
57 |
// 获得学生联系人列表 |
|
58 |
export function getStudentContactListByStudentId(studentId) { |
|
59 |
return request({ |
|
60 |
url: `/infra/student/student-contact/list-by-student-id?studentId=` + studentId, |
|
61 |
method: 'get' |
|
62 |
}) |
|
63 |
} |
|
64 |
|
|
65 |
// ==================== 子表(学生班主任) ==================== |
|
66 |
|
|
67 |
// 获得学生班主任 |
|
68 |
export function getStudentTeacherByStudentId(studentId) { |
|
69 |
return request({ |
|
70 |
url: `/infra/student/student-teacher/get-by-student-id?studentId=` + studentId, |
|
71 |
method: 'get' |
|
72 |
}) |
|
73 |
} |
|
74 |
|