You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.3 KiB
58 lines
1.3 KiB
import { defHttp } from '@/utils/http/axios' |
|
|
|
export interface PostVO { |
|
id?: number |
|
name: string |
|
code: string |
|
sort: number |
|
status: number |
|
remark: string |
|
createTime?: Date |
|
} |
|
|
|
export interface PostPageReqVO extends PageParam { |
|
code?: string |
|
name?: string |
|
status?: number |
|
} |
|
|
|
export interface PostExportReqVO { |
|
code?: string |
|
name?: string |
|
status?: number |
|
} |
|
|
|
// 查询岗位列表 |
|
export const getPostPage = (params: PostPageReqVO) => { |
|
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params }) |
|
} |
|
|
|
// 获取岗位精简信息列表 |
|
export const listSimplePosts = () => { |
|
return defHttp.get({ url: '/system/post/list-all-simple' }) |
|
} |
|
|
|
// 查询岗位详情 |
|
export const getPost = (id: number) => { |
|
return defHttp.get({ url: '/system/post/get?id=' + id }) |
|
} |
|
|
|
// 新增岗位 |
|
export const createPost = (data: PostVO) => { |
|
return defHttp.post({ url: '/system/post/create', data }) |
|
} |
|
|
|
// 修改岗位 |
|
export const updatePost = (data: PostVO) => { |
|
return defHttp.put({ url: '/system/post/update', data }) |
|
} |
|
|
|
// 删除岗位 |
|
export const deletePost = (id: number) => { |
|
return defHttp.delete({ url: '/system/post/delete?id=' + id }) |
|
} |
|
|
|
// 导出岗位 |
|
export const exportPost = (params: PostExportReqVO) => { |
|
return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls') |
|
}
|
|
|