Files
pengcheng-exam-teacher/src/api/exam/specialty/index.ts
2025-08-13 09:02:52 +08:00

44 lines
1.1 KiB
TypeScript

import request from '@/config/axios'
export interface SpecialtyVO {
id?: number
name: string
parentId: number
status: number
sort: number
leaderUserId: number
phone: string
email: string
createTime: Date
}
// 查询部门(精简)列表
export const getSimpleSpecialtyist = async (): Promise<SpecialtyVO[]> => {
return await request.get({ url: '/exam/specialty/simple-list' })
}
// 查询部门列表
export const getSpecialtyPage = async (params: PageParam) => {
return await request.get({ url: '/exam/specialty/list', params })
}
// 查询部门详情
export const getSpecialty = async (id: number) => {
return await request.get({ url: '/exam/specialty/' + id })
}
// 新增部门
export const createSpecialty = async (data: any) => {
return await request.post({ url: '/exam/specialty', data: data })
}
// 修改部门
export const updateSpecialty = async (params: any) => {
return await request.put({ url: '/exam/specialty', data: params })
}
// 删除部门
export const deleteSpecialty = async (id: number) => {
return await request.delete({ url: '/exam/specialty/' + id })
}