提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface PostVO { |
|
4 |
id?: number |
|
5 |
name: string |
|
6 |
code: string |
|
7 |
sort: number |
|
8 |
status: number |
|
9 |
remark: string |
|
10 |
createTime?: Date |
|
11 |
} |
|
12 |
|
|
13 |
// 查询岗位列表 |
|
14 |
export const getPostPage = async (params: PageParam) => { |
|
15 |
return await request.get({ url: '/system/post/page', params }) |
|
16 |
} |
|
17 |
|
|
18 |
// 获取岗位精简信息列表 |
|
19 |
export const getSimplePostList = async (): Promise<PostVO[]> => { |
|
20 |
return await request.get({ url: '/system/post/simple-list' }) |
|
21 |
} |
|
22 |
|
|
23 |
// 查询岗位详情 |
|
24 |
export const getPost = async (id: number) => { |
|
25 |
return await request.get({ url: '/system/post/get?id=' + id }) |
|
26 |
} |
|
27 |
|
|
28 |
// 新增岗位 |
|
29 |
export const createPost = async (data: PostVO) => { |
|
30 |
return await request.post({ url: '/system/post/create', data }) |
|
31 |
} |
|
32 |
|
|
33 |
// 修改岗位 |
|
34 |
export const updatePost = async (data: PostVO) => { |
|
35 |
return await request.put({ url: '/system/post/update', data }) |
|
36 |
} |
|
37 |
|
|
38 |
// 删除岗位 |
|
39 |
export const deletePost = async (id: number) => { |
|
40 |
return await request.delete({ url: '/system/post/delete?id=' + id }) |
|
41 |
} |
|
42 |
|
|
43 |
// 导出岗位 |
|
44 |
export const exportPost = async (params) => { |
|
45 |
return await request.download({ url: '/system/post/export', params }) |
|
46 |
} |