提交 | 用户 | 时间
|
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 getDemo03CoursePage = async (params) => { |
|
45 |
return await request.get({ url: `/infra/demo03-student/demo03-course/page`, params }) |
|
46 |
} |
|
47 |
// 新增学生课程 |
|
48 |
export const createDemo03Course = async (data) => { |
|
49 |
return await request.post({ url: `/infra/demo03-student/demo03-course/create`, data }) |
|
50 |
} |
|
51 |
|
|
52 |
// 修改学生课程 |
|
53 |
export const updateDemo03Course = async (data) => { |
|
54 |
return await request.put({ url: `/infra/demo03-student/demo03-course/update`, data }) |
|
55 |
} |
|
56 |
|
|
57 |
// 删除学生课程 |
|
58 |
export const deleteDemo03Course = async (id: number) => { |
|
59 |
return await request.delete({ url: `/infra/demo03-student/demo03-course/delete?id=` + id }) |
|
60 |
} |
|
61 |
|
|
62 |
// 获得学生课程 |
|
63 |
export const getDemo03Course = async (id: number) => { |
|
64 |
return await request.get({ url: `/infra/demo03-student/demo03-course/get?id=` + id }) |
|
65 |
} |
|
66 |
|
|
67 |
// ==================== 子表(学生班级) ==================== |
|
68 |
|
|
69 |
// 获得学生班级分页 |
|
70 |
export const getDemo03GradePage = async (params) => { |
|
71 |
return await request.get({ url: `/infra/demo03-student/demo03-grade/page`, params }) |
|
72 |
} |
|
73 |
// 新增学生班级 |
|
74 |
export const createDemo03Grade = async (data) => { |
|
75 |
return await request.post({ url: `/infra/demo03-student/demo03-grade/create`, data }) |
|
76 |
} |
|
77 |
|
|
78 |
// 修改学生班级 |
|
79 |
export const updateDemo03Grade = async (data) => { |
|
80 |
return await request.put({ url: `/infra/demo03-student/demo03-grade/update`, data }) |
|
81 |
} |
|
82 |
|
|
83 |
// 删除学生班级 |
|
84 |
export const deleteDemo03Grade = async (id: number) => { |
|
85 |
return await request.delete({ url: `/infra/demo03-student/demo03-grade/delete?id=` + id }) |
|
86 |
} |
|
87 |
|
|
88 |
// 获得学生班级 |
|
89 |
export const getDemo03Grade = async (id: number) => { |
|
90 |
return await request.get({ url: `/infra/demo03-student/demo03-grade/get?id=` + id }) |
|
91 |
} |