2019-10-08 09:14:38 +08:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
|
|
|
// 查询岗位列表
|
|
|
|
export function listPost(query) {
|
|
|
|
return request({
|
2021-01-12 00:11:19 +08:00
|
|
|
url: '/system/post/page',
|
2019-10-08 09:14:38 +08:00
|
|
|
method: 'get',
|
|
|
|
params: query
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-01-10 22:51:13 +08:00
|
|
|
// 获取岗位精简信息列表
|
|
|
|
export function listSimplePosts() {
|
|
|
|
return request({
|
|
|
|
url: '/system/post/list-all-simple',
|
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-10-08 09:14:38 +08:00
|
|
|
// 查询岗位详细
|
|
|
|
export function getPost(postId) {
|
|
|
|
return request({
|
2021-01-12 00:11:19 +08:00
|
|
|
url: '/system/post/get?id=' + postId,
|
2019-10-08 09:14:38 +08:00
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增岗位
|
|
|
|
export function addPost(data) {
|
|
|
|
return request({
|
2021-01-12 00:11:19 +08:00
|
|
|
url: '/system/post/create',
|
2019-10-08 09:14:38 +08:00
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改岗位
|
|
|
|
export function updatePost(data) {
|
|
|
|
return request({
|
2021-01-12 00:11:19 +08:00
|
|
|
url: '/system/post/update',
|
|
|
|
method: 'post',
|
2019-10-08 09:14:38 +08:00
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除岗位
|
|
|
|
export function delPost(postId) {
|
|
|
|
return request({
|
2021-01-12 00:11:19 +08:00
|
|
|
url: '/system/post/delete?id=' + postId,
|
|
|
|
method: 'post'
|
2019-10-08 09:14:38 +08:00
|
|
|
})
|
2019-11-11 08:59:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 导出岗位
|
|
|
|
export function exportPost(query) {
|
|
|
|
return request({
|
|
|
|
url: '/system/post/export',
|
|
|
|
method: 'get',
|
2021-01-14 21:20:32 +08:00
|
|
|
params: query,
|
|
|
|
responseType: 'blob'
|
2019-11-11 08:59:15 +08:00
|
|
|
})
|
2021-01-10 22:51:13 +08:00
|
|
|
}
|