提交 | 用户 | 时间
|
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 |
}
|