feat: Enhance Outdoor Fair and Public Job Fair features
- Added QR code functionality for companies signing up for outdoor fairs. - Implemented job management for outdoor fairs, including job listing and editing. - Updated Public Job Fair detail view to reflect new data structure. - Refactored EditModal to support dynamic lists for host, co-organizer, and organizing units. - Introduced cross-domain city selection for job fairs. - Enhanced API services for managing cross-domain jobs and cities. - Improved data handling for outdoor fair items, including review status and QR code content. - Updated type definitions to accommodate new fields and structures.
This commit is contained in:
@@ -31,6 +31,20 @@ export interface OutdoorFairItem {
|
||||
onlineApply: boolean;
|
||||
/** 招聘会照片 */
|
||||
photoUrl: string;
|
||||
/** 当前企业ID */
|
||||
companyId?: number;
|
||||
/** 当前企业名称 */
|
||||
companyName?: string;
|
||||
/** 当前企业是否已报名 */
|
||||
signedUp?: boolean;
|
||||
/** 当前企业公共 H5 页面链接 */
|
||||
h5Url?: string;
|
||||
/** 二维码内容,通常与 h5Url 一致 */
|
||||
qrCodeContent?: string;
|
||||
/** 当前企业报名审核状态:0待审核 1通过 2驳回 */
|
||||
reviewStatus?: string;
|
||||
/** 当前企业报名审核备注 */
|
||||
reviewRemark?: string;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
@@ -85,6 +99,20 @@ export interface OutdoorFairCommonResult {
|
||||
originalFilename?: string;
|
||||
}
|
||||
|
||||
/** 企业报名/二维码信息 */
|
||||
export interface OutdoorFairCompanyQrCodeInfo {
|
||||
fairId: number;
|
||||
companyId: number;
|
||||
companyName?: string;
|
||||
signedUp?: boolean;
|
||||
reviewStatus?: string;
|
||||
reviewRemark?: string;
|
||||
deviceId?: number;
|
||||
deviceCode?: string;
|
||||
h5Url: string;
|
||||
qrCodeContent: string;
|
||||
}
|
||||
|
||||
/** 户外招聘会字典新增表单 */
|
||||
export interface OutdoorFairDictForm {
|
||||
dictType: 'outdoor_fair_type' | 'outdoor_fair_region';
|
||||
@@ -219,6 +247,28 @@ export async function addOutdoorFairDictOption(data: OutdoorFairDictForm) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前企业报名户外招聘会
|
||||
* POST /api/cms/outdoor-fair/{fairId}/company/signup
|
||||
*/
|
||||
export async function signupOutdoorFair(fairId: number) {
|
||||
return request<{ code: number; msg?: string; data: OutdoorFairCompanyQrCodeInfo }>(
|
||||
`${CMS_OUTDOOR_FAIR_BASE}/${fairId}/company/signup`,
|
||||
{ method: 'POST' },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前企业户外招聘会二维码
|
||||
* GET /api/cms/outdoor-fair/{fairId}/company/qrcode
|
||||
*/
|
||||
export async function getMyOutdoorFairQrCode(fairId: number) {
|
||||
return request<{ code: number; msg?: string; data: OutdoorFairCompanyQrCodeInfo }>(
|
||||
`${CMS_OUTDOOR_FAIR_BASE}/${fairId}/company/qrcode`,
|
||||
{ method: 'GET' },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传户外招聘会照片
|
||||
* POST /api/common/upload
|
||||
|
||||
@@ -17,6 +17,7 @@ type DeviceItem = API.OutdoorFairDetail.DeviceItem;
|
||||
type GateStatus = API.OutdoorFairDetail.GateStatus;
|
||||
type GateEntryLog = API.OutdoorFairDetail.GateEntryLog;
|
||||
type FairStatistics = API.OutdoorFairDetail.FairStatistics;
|
||||
type CompanyQrCodeInfo = API.OutdoorFairDetail.CompanyQrCodeInfo;
|
||||
|
||||
// ==================== 模块1: 招聘会管理 假数据 ====================
|
||||
|
||||
@@ -1056,6 +1057,14 @@ export async function getParticipatingJobDetail(fairId: number, jobId: number) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 获取参会企业二维码内容 */
|
||||
export async function getParticipatingCompanyQrCode(fairId: number, companyId: number) {
|
||||
return request<{ code: number; msg?: string; data: CompanyQrCodeInfo }>(
|
||||
`/api/cms/outdoor-fair/${fairId}/companies/${companyId}/qrcode`,
|
||||
{ method: 'GET' },
|
||||
);
|
||||
}
|
||||
|
||||
/** 添加参会企业 */
|
||||
export async function addParticipatingCompany(data: {
|
||||
fairId: number;
|
||||
@@ -1088,6 +1097,25 @@ export async function removeParticipatingCompany(id: number, fairId?: number) {
|
||||
);
|
||||
}
|
||||
|
||||
/** 审核参会企业 */
|
||||
export async function reviewParticipatingCompany(data: {
|
||||
fairId: number;
|
||||
id: number;
|
||||
reviewStatus: '0' | '1' | '2';
|
||||
reviewRemark?: string;
|
||||
}) {
|
||||
return request<{ code: number; msg?: string }>(
|
||||
`/api/cms/outdoor-fair/${data.fairId}/companies/${data.id}/review`,
|
||||
{
|
||||
method: 'PUT',
|
||||
data: {
|
||||
reviewStatus: data.reviewStatus,
|
||||
reviewRemark: data.reviewRemark,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 替企业发布岗位 */
|
||||
export async function addJobForCompany(data: {
|
||||
fairId: number;
|
||||
@@ -1104,6 +1132,18 @@ export async function addJobForCompany(data: {
|
||||
);
|
||||
}
|
||||
|
||||
/** 当前企业发布户外招聘会岗位 */
|
||||
export async function addCurrentCompanyJob(data: { fairId: number; [key: string]: any }) {
|
||||
const { fairId, ...job } = data;
|
||||
return request<{ code: number; msg?: string; data?: PostedJob }>(
|
||||
`/api/cms/outdoor-fair/${fairId}/company/jobs`,
|
||||
{
|
||||
method: 'POST',
|
||||
data: job,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/** 编辑岗位 */
|
||||
export async function updateJobForCompany(fairId: number, data: PostedJob) {
|
||||
if (!data.jobId) {
|
||||
@@ -1120,10 +1160,26 @@ export async function updateJobForCompany(fairId: number, data: PostedJob) {
|
||||
|
||||
/** 删除岗位 */
|
||||
export async function removeJobFromCompany(fairId: number, jobId: number) {
|
||||
return request<{ code: number; msg?: string }>(`/api/cms/outdoor-fair/${fairId}/jobs/${jobId}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
/** 审核参会岗位 */
|
||||
export async function reviewParticipatingJob(data: {
|
||||
fairId: number;
|
||||
jobId: number;
|
||||
reviewStatus: '0' | '1' | '2';
|
||||
reviewRemark?: string;
|
||||
}) {
|
||||
return request<{ code: number; msg?: string }>(
|
||||
`/api/cms/outdoor-fair/${fairId}/jobs/${jobId}`,
|
||||
`/api/cms/outdoor-fair/${data.fairId}/jobs/${data.jobId}/review`,
|
||||
{
|
||||
method: 'DELETE',
|
||||
method: 'PUT',
|
||||
data: {
|
||||
reviewStatus: data.reviewStatus,
|
||||
reviewRemark: data.reviewRemark,
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -37,17 +37,13 @@ export interface OutdoorFairDeviceListResult {
|
||||
rows: OutdoorFairDeviceItem[];
|
||||
}
|
||||
|
||||
/** 批量生成参数 */
|
||||
export interface OutdoorFairDeviceBatchParams {
|
||||
/** 新增设备码参数 */
|
||||
export interface OutdoorFairDeviceAddParams {
|
||||
fairId: number;
|
||||
quantity: number;
|
||||
}
|
||||
|
||||
/** 批量生成响应 */
|
||||
export interface OutdoorFairDeviceBatchResult {
|
||||
code: number;
|
||||
msg?: string;
|
||||
data?: OutdoorFairDeviceItem[];
|
||||
/** 设备码(用户手动填写,全局唯一) */
|
||||
deviceCode: string;
|
||||
/** 参会企业ID,选填;为空表示暂不绑定 */
|
||||
companyId?: number;
|
||||
}
|
||||
|
||||
/** 通用响应 */
|
||||
@@ -77,11 +73,11 @@ export async function getOutdoorFairDeviceList(params?: OutdoorFairDeviceListPar
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量生成设备码(UUID)
|
||||
* POST /api/cms/outdoor-fair-device/batch
|
||||
* 新增设备码(手动填写设备码,可选绑定参会企业)
|
||||
* POST /api/cms/outdoor-fair-device/add
|
||||
*/
|
||||
export async function batchGenerateOutdoorFairDevice(data: OutdoorFairDeviceBatchParams) {
|
||||
return request<OutdoorFairDeviceBatchResult>(`${BASE}/batch`, {
|
||||
export async function addOutdoorFairDevice(data: OutdoorFairDeviceAddParams) {
|
||||
return request<OutdoorFairDeviceCommonResult>(`${BASE}/add`, {
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user