import http from '@/api' /** * @name 查询岗位信息列表 * @param query 参数 * @returns 返回列表 */ export const listPostApi = (query: any) => { return http.get('/system/post/list', query, { loading: true }) } /** * @name 查询岗位信息详细 * @param postId postId * @returns returns */ export const getPostApi = (postId: any) => { return http.get(`/system/post/${postId}`) } /** * @name 新增岗位信息 * @param data data * @returns returns */ export const addPostApi = (data: any) => { return http.post('/system/post', data, { loading: false }) } /** * @name 修改岗位信息 * @param data data * @returns returns */ export const updatePostApi = (data: any) => { return http.put('/system/post', data, { loading: false }) } /** * @name 删除岗位信息 * @param postId postId * @returns returns */ export const delPostApi = ({ postId }: { postId: any }) => { return http.delete(`/system/post/${postId}`) } /** * @name 下载模板 * @returns returns */ export const importTemplateApi = () => { return http.download('/system/post/importTemplate', {}) } /** * @name 导入数据 * @returns returns */ export const importDataApi = (data: any) => { return http.post('/system/post/importData', data) } /** * @name 导出数据 * @returns returns */ export const exportApi = (data: any) => { return http.download('/system/post/export', data) }