提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface Demo03StudentVO { |
|
4 |
id: number |
|
5 |
name: string |
|
6 |
sex: number |
|
7 |
birthday: Date |
|
8 |
description: string |
|
9 |
} |
|
10 |
|
|
11 |
// 查询学生分页 |
|
12 |
export const getDemo03StudentPage = async (params) => { |
|
13 |
return await request.get({ url: `/infra/demo03-student/page`, params }) |
|
14 |
} |
|
15 |
|
|
16 |
// 查询学生详情 |
|
17 |
export const getDemo03Student = async (id: number) => { |
|
18 |
return await request.get({ url: `/infra/demo03-student/get?id=` + id }) |
|
19 |
} |
|
20 |
|
|
21 |
// 新增学生 |
|
22 |
export const createDemo03Student = async (data: Demo03StudentVO) => { |
|
23 |
return await request.post({ url: `/infra/demo03-student/create`, data }) |
|
24 |
} |
|
25 |
|
|
26 |
// 修改学生 |
|
27 |
export const updateDemo03Student = async (data: Demo03StudentVO) => { |
|
28 |
return await request.put({ url: `/infra/demo03-student/update`, data }) |
|
29 |
} |
|
30 |
|
|
31 |
// 删除学生 |
|
32 |
export const deleteDemo03Student = async (id: number) => { |
|
33 |
return await request.delete({ url: `/infra/demo03-student/delete?id=` + id }) |
|
34 |
} |
|
35 |
|
|
36 |
// 导出学生 Excel |
|
37 |
export const exportDemo03Student = async (params) => { |
|
38 |
return await request.download({ url: `/infra/demo03-student/export-excel`, params }) |
|
39 |
} |
|
40 |
|
|
41 |
// ==================== 子表(学生课程) ==================== |
|
42 |
|
|
43 |
// 获得学生课程列表 |
|
44 |
export const getDemo03CourseListByStudentId = async (studentId) => { |
|
45 |
return await request.get({ |
|
46 |
url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId |
|
47 |
}) |
|
48 |
} |
|
49 |
|
|
50 |
// ==================== 子表(学生班级) ==================== |
|
51 |
|
|
52 |
// 获得学生班级 |
|
53 |
export const getDemo03GradeByStudentId = async (studentId) => { |
|
54 |
return await request.get({ |
|
55 |
url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId |
|
56 |
}) |
|
57 |
} |