Files
ipms-sjy/yudao-ui-admin-vue3/src/api/system/post/index.ts

59 lines
1.4 KiB
TypeScript
Raw Normal View History

2022-11-03 16:55:01 +08:00
import request from '@/config/axios'
2022-11-13 13:16:11 +08:00
export interface PostVO {
id?: number
name: string
code: string
sort: number
status: number
remark: string
2022-11-29 22:26:50 +08:00
createTime?: Date
2022-11-13 13:16:11 +08:00
}
export interface PostPageReqVO extends PageParam {
2022-11-13 13:16:11 +08:00
code?: string
name?: string
status?: number
}
export interface PostExportReqVO {
code?: string
name?: string
status?: number
}
2022-07-18 19:06:37 +08:00
// 查询岗位列表
2022-07-25 22:54:12 +08:00
export const getPostPageApi = async (params: PostPageReqVO) => {
2022-07-19 22:33:54 +08:00
return await request.get({ url: '/system/post/page', params })
2022-07-18 19:06:37 +08:00
}
// 获取岗位精简信息列表
2022-07-19 22:33:54 +08:00
export const listSimplePostsApi = async () => {
return await request.get({ url: '/system/post/list-all-simple' })
2022-07-18 19:06:37 +08:00
}
2022-07-18 19:06:37 +08:00
// 查询岗位详情
2022-07-19 22:33:54 +08:00
export const getPostApi = async (id: number) => {
return await request.get({ url: '/system/post/get?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 新增岗位
2022-07-19 22:33:54 +08:00
export const createPostApi = async (data: PostVO) => {
return await request.post({ url: '/system/post/create', data })
2022-07-18 19:06:37 +08:00
}
// 修改岗位
2022-07-19 22:33:54 +08:00
export const updatePostApi = async (data: PostVO) => {
return await request.put({ url: '/system/post/update', data })
2022-07-18 19:06:37 +08:00
}
// 删除岗位
2022-07-19 22:33:54 +08:00
export const deletePostApi = async (id: number) => {
return await request.delete({ url: '/system/post/delete?id=' + id })
2022-07-18 19:06:37 +08:00
}
// 导出岗位
2022-07-25 22:54:12 +08:00
export const exportPostApi = async (params: PostExportReqVO) => {
2022-07-25 21:03:14 +08:00
return await request.download({ url: '/system/post/export', params })
2022-07-18 19:06:37 +08:00
}