50 lines
1.3 KiB
TypeScript
50 lines
1.3 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 getSpecialtyPage = async (params: PageParam) => {
|
|
return await request.get({ url: '/exam/specialty/list', params })
|
|
}
|
|
|
|
// 查询部门列表
|
|
export const getSpecialtyPart = async () => {
|
|
return await request.get({ url: '/exam/specialty/part' })
|
|
}
|
|
|
|
// 查询部门详情
|
|
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 })
|
|
}
|
|
|
|
export const getSpecialtyRole = async (id: number) => {
|
|
return await request.get({ url: '/exam/specialty/getRole/' + id })
|
|
}
|
|
export const setSpecialtyRole = async (data) => {
|
|
return await request.post({ url: '/exam/specialty/setRole', data:data })
|
|
} |