【新增】班级管理页面新增

This commit is contained in:
任维炳
2025-04-23 17:17:36 +08:00
committed by 陆光LG
parent ea87d3d167
commit 5ea0ea4c41
4 changed files with 507 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
import request from '@/config/axios'
// 学生班级 VO
export interface ClassVO {
id: number // 班级编号
name: string // 名字
status: number // 状态
remark: string // 备注
}
export interface ClassIdVO {
id: number // 班级编号
name: string // 名字
}
export interface ClassStudentSaveReqVO {
studentClassDOS: any
}
// 学生班级 API
export const ClassApi = {
// 查询学生班级分页
getClassPage: async (params: any) => {
return await request.get({ url: `/exam/class/page`, params })
},
// 查询学生班级详情
getClass: async (id: number) => {
return await request.get({ url: `/exam/class/get?id=` + id })
},
// 查询班级名称
getClassName: async () => {
return await request.get({ url: `/exam/class/getClassName` })
},
// 查询班级ID
getClassIdName: async () => {
return await request.get({ url: `/exam/class/getClassIdName` })
},
// 绑定学生班级
bindingClass: async (data: ClassStudentSaveReqVO) => {
console.log(data)
return await request.post({ url: `/exam/class/binding`, data })
},
// 新增学生班级
createClass: async (data: ClassVO) => {
return await request.post({ url: `/exam/class/create`, data })
},
// 修改学生班级
updateClass: async (data: ClassVO) => {
return await request.put({ url: `/exam/class/update`, data })
},
// 删除学生班级
deleteClass: async (id: number) => {
return await request.delete({ url: `/exam/class/delete?id=` + id })
},
// 导出学生班级 Excel
exportClass: async (params) => {
return await request.download({ url: `/exam/class/export-excel`, params })
}
}