94 lines
2.0 KiB
TypeScript
94 lines
2.0 KiB
TypeScript
import request from '@/utils/request';
|
|
import { RecruitmentPosterVO, RecruitmentPosterForm, RecruitmentPosterQuery, TableDataInfo } from './types';
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
/**
|
|
* 查询招聘海报列表
|
|
* @param query 查询参数
|
|
* @returns 招聘海报列表
|
|
*/
|
|
export function listRecruitmentPoster(query?: RecruitmentPosterQuery): AxiosPromise<TableDataInfo<RecruitmentPosterVO>> {
|
|
return request({
|
|
url: '/zsjy/poster/list',
|
|
method: 'get',
|
|
params: query
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 查询招聘海报详细
|
|
* @param id 招聘海报ID
|
|
* @returns 招聘海报详情
|
|
*/
|
|
export function getRecruitmentPoster(id: string | number): AxiosPromise<RecruitmentPosterVO> {
|
|
return request({
|
|
url: '/zsjy/poster/' + id,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 新增招聘海报
|
|
* @param data 招聘海报表单
|
|
* @returns 操作结果
|
|
*/
|
|
export function addRecruitmentPoster(data: RecruitmentPosterForm) {
|
|
return request({
|
|
url: '/zsjy/poster',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 修改招聘海报
|
|
* @param data 招聘海报表单
|
|
* @returns 操作结果
|
|
*/
|
|
export function updateRecruitmentPoster(data: RecruitmentPosterForm) {
|
|
return request({
|
|
url: '/zsjy/poster',
|
|
method: 'put',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 删除招聘海报
|
|
* @param id 招聘海报ID
|
|
* @returns 操作结果
|
|
*/
|
|
export function delRecruitmentPoster(id: string | number | Array<string | number>) {
|
|
return request({
|
|
url: '/zsjy/poster/' + id,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 导出招聘海报
|
|
* @param query 查询参数
|
|
* @returns 导出结果
|
|
*/
|
|
export function exportRecruitmentPoster(query: RecruitmentPosterQuery) {
|
|
return request({
|
|
url: '/zsjy/poster/export',
|
|
method: 'post',
|
|
data: query,
|
|
responseType: 'blob'
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 查询岗位下拉选项
|
|
* @param enterpriseId 企业ID
|
|
* @returns 岗位列表
|
|
*/
|
|
export function listPositionOptions(enterpriseId?: number | string) {
|
|
return request({
|
|
url: '/zsjy/position/options',
|
|
method: 'get',
|
|
params: { enterpriseId }
|
|
});
|
|
}
|