Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
142 lines
4.2 KiB
TypeScript
142 lines
4.2 KiB
TypeScript
import { request } from '@umijs/max';
|
||
import { downLoadXlsx } from '@/utils/downloadfile';
|
||
|
||
export async function getCmsJobList(params?: API.ManagementList.ListParams) {
|
||
return request<API.ManagementList.ManagePageResult>(`/api/cms/job/list`, {
|
||
method: 'GET',
|
||
params: params,
|
||
});
|
||
}
|
||
|
||
export async function addCmsJobList(params?: API.ManagementList.AddParams) {
|
||
return request<API.ManagementList.ManagePageResult>(`/api/cms/job`, {
|
||
method: 'POST',
|
||
data: params,
|
||
});
|
||
}
|
||
|
||
export async function updateCmsJobList(params?: API.ManagementList.AddParams) {
|
||
return request<API.ManagementList.ManagePageResult>(`/api/cms/job`, {
|
||
method: 'PUT',
|
||
data: params,
|
||
});
|
||
}
|
||
|
||
export async function getCmsJobIds(ids: string) {
|
||
return request<API.ManagementList.ManageIdResult>(`/api/cms/job/${ids}`, {
|
||
method: 'GET',
|
||
});
|
||
}
|
||
|
||
export async function getCmsJobDetail(jobId: string) {
|
||
return request<API.ManagementList.ManageIdResult>(`/api/cms/job/${jobId}`, {
|
||
method: 'GET',
|
||
});
|
||
}
|
||
|
||
export async function delCmsJobIds(ids: string) {
|
||
return request<API.ManagementList.ManagePageResult>(`/api/cms/job/${ids}`, {
|
||
method: 'DELETE',
|
||
});
|
||
}
|
||
|
||
export async function exportCmsJob(params?: API.ManagementList.ListParams) {
|
||
return downLoadXlsx(`/api/cms/job/export`, { params }, `job_data_${new Date().getTime()}.xlsx`);
|
||
}
|
||
|
||
export async function exportJobApply(params?: API.ManagementList.ListParams) {
|
||
return downLoadXlsx(`/api/cms/jobApply/export`, { params }, `job_data_${new Date().getTime()}.xlsx`);
|
||
}
|
||
|
||
export async function exportCmsJobCandidates(ids: string) {
|
||
return request<API.ManagementList.ManageIdResult>(`/api/cms/job/candidates`, {
|
||
method: 'GET',
|
||
params: {
|
||
jobId: ids,
|
||
},
|
||
});
|
||
}
|
||
|
||
export async function importJobRow(file: File) {
|
||
const formData = new FormData();
|
||
formData.append('file', file);
|
||
return request('/api/app/script/importRow/v2', {
|
||
method: 'POST',
|
||
// 不显式设置 Content-Type,交由浏览器按 multipart/form-data 边界自动设置
|
||
data: formData,
|
||
});
|
||
}
|
||
|
||
export async function getJobTrend(params) {
|
||
return request(`/api/cms/jobTrend/list`, {
|
||
method: 'GET',
|
||
params: params
|
||
});
|
||
}
|
||
|
||
export async function addCmsEmployeeConfirmList(params?: API.Management.Hire) {
|
||
return request<API.Management.ManagePageResult>(`/api/cms/employeeConfirm`, {
|
||
method: 'POST',
|
||
data: params,
|
||
});
|
||
}
|
||
|
||
export async function addCmsUserWorkExperiencesList(params?: API.Management.Params) {
|
||
return request<API.Management.ManageResumePageResult>(`/api/cms/userworkexperiences/list`, {
|
||
method: 'GET',
|
||
params: params,
|
||
});
|
||
}
|
||
|
||
// ========== 面试邀约 APIs ==========
|
||
|
||
/** 后台管理端:面试邀约列表 */
|
||
export async function getCmsInterviewList(params?: API.Management.InterviewInvitation) {
|
||
return request<API.Management.InterviewPageResult>(`/api/cms/interview/list`, {
|
||
method: 'GET',
|
||
params: params,
|
||
});
|
||
}
|
||
|
||
/** 求职者端:我的面试邀约列表(无需后台权限) */
|
||
export async function getAppInterviewList(params?: API.Management.InterviewInvitation) {
|
||
return request<API.Management.InterviewPageResult>(`/api/app/interview/list`, {
|
||
method: 'GET',
|
||
params: params,
|
||
});
|
||
}
|
||
|
||
export async function addCmsInterview(params?: API.Management.InterviewInvitation) {
|
||
return request<API.Management.ManagePageResult>(`/api/cms/interview`, {
|
||
method: 'POST',
|
||
data: params,
|
||
});
|
||
}
|
||
|
||
export async function updateCmsInterview(params?: API.Management.InterviewInvitation) {
|
||
return request<API.Management.ManagePageResult>(`/api/cms/interview`, {
|
||
method: 'PUT',
|
||
data: params,
|
||
});
|
||
}
|
||
|
||
export async function delCmsInterview(ids: string) {
|
||
return request<API.Management.ManagePageResult>(`/api/cms/interview/${ids}`, {
|
||
method: 'DELETE',
|
||
});
|
||
}
|
||
|
||
export async function getCmsInterviewDetail(id: string) {
|
||
return request<API.Management.InterviewPageResult>(`/api/cms/interview/${id}`, {
|
||
method: 'GET',
|
||
});
|
||
}
|
||
|
||
/** 求职者端:更新面试邀约状态(接受/拒绝) */
|
||
export async function updateAppInterviewStatus(id: number, status: string) {
|
||
return request<API.Management.InterviewPageResult>(`/api/app/interview/status/${id}`, {
|
||
method: 'PUT',
|
||
data: { status },
|
||
});
|
||
}
|