提交 | 用户 | 时间
|
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 getStudentContactPage(params) {
|
|
59 |
return request({
|
|
60 |
url: '/infra/student/student-contact/page',
|
|
61 |
method: 'get',
|
|
62 |
params
|
|
63 |
})
|
|
64 |
}
|
|
65 |
// 新增学生联系人
|
|
66 |
export function createStudentContact(data) {
|
|
67 |
return request({
|
|
68 |
url: `/infra/student/student-contact/create`,
|
|
69 |
method: 'post',
|
|
70 |
data
|
|
71 |
})
|
|
72 |
}
|
|
73 |
|
|
74 |
// 修改学生联系人
|
|
75 |
export function updateStudentContact(data) {
|
|
76 |
return request({
|
|
77 |
url: `/infra/student/student-contact/update`,
|
|
78 |
method: 'post',
|
|
79 |
data
|
|
80 |
})
|
|
81 |
}
|
|
82 |
|
|
83 |
// 删除学生联系人
|
|
84 |
export function deleteStudentContact(id) {
|
|
85 |
return request({
|
|
86 |
url: `/infra/student/student-contact/delete?id=` + id,
|
|
87 |
method: 'delete'
|
|
88 |
})
|
|
89 |
}
|
|
90 |
|
|
91 |
// 获得学生联系人
|
|
92 |
export function getStudentContact(id) {
|
|
93 |
return request({
|
|
94 |
url: `/infra/student/student-contact/get?id=` + id,
|
|
95 |
method: 'get'
|
|
96 |
})
|
|
97 |
}
|
|
98 |
|
|
99 |
// ==================== 子表(学生班主任) ====================
|
|
100 |
|
|
101 |
// 获得学生班主任分页
|
|
102 |
export function getStudentTeacherPage(params) {
|
|
103 |
return request({
|
|
104 |
url: '/infra/student/student-teacher/page',
|
|
105 |
method: 'get',
|
|
106 |
params
|
|
107 |
})
|
|
108 |
}
|
|
109 |
// 新增学生班主任
|
|
110 |
export function createStudentTeacher(data) {
|
|
111 |
return request({
|
|
112 |
url: `/infra/student/student-teacher/create`,
|
|
113 |
method: 'post',
|
|
114 |
data
|
|
115 |
})
|
|
116 |
}
|
|
117 |
|
|
118 |
// 修改学生班主任
|
|
119 |
export function updateStudentTeacher(data) {
|
|
120 |
return request({
|
|
121 |
url: `/infra/student/student-teacher/update`,
|
|
122 |
method: 'post',
|
|
123 |
data
|
|
124 |
})
|
|
125 |
}
|
|
126 |
|
|
127 |
// 删除学生班主任
|
|
128 |
export function deleteStudentTeacher(id) {
|
|
129 |
return request({
|
|
130 |
url: `/infra/student/student-teacher/delete?id=` + id,
|
|
131 |
method: 'delete'
|
|
132 |
})
|
|
133 |
}
|
|
134 |
|
|
135 |
// 获得学生班主任
|
|
136 |
export function getStudentTeacher(id) {
|
|
137 |
return request({
|
|
138 |
url: `/infra/student/student-teacher/get?id=` + id,
|
|
139 |
method: 'get'
|
|
140 |
})
|
|
141 |
}
|