12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import http from '@/api'
- /**
- * @name 查询岗位信息列表
- * @param query 参数
- * @returns 返回列表
- */
- export const listPostApi = (query: any) => {
- return http.get<any>('/system/post/list', query, { loading: true })
- }
- /**
- * @name 查询岗位信息详细
- * @param postId postId
- * @returns returns
- */
- export const getPostApi = (postId: any) => {
- return http.get<any>(`/system/post/${postId}`)
- }
- /**
- * @name 新增岗位信息
- * @param data data
- * @returns returns
- */
- export const addPostApi = (data: any) => {
- return http.post<any>('/system/post', data, { loading: false })
- }
- /**
- * @name 修改岗位信息
- * @param data data
- * @returns returns
- */
- export const updatePostApi = (data: any) => {
- return http.put<any>('/system/post', data, { loading: false })
- }
- /**
- * @name 删除岗位信息
- * @param postId postId
- * @returns returns
- */
- export const delPostApi = ({ postId }: { postId: any }) => {
- return http.delete<any>(`/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)
- }
|