feat: add attendee and device management tabs, and implement outdoor fair statistics
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
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
This commit is contained in:
@@ -129,6 +129,53 @@ export async function getOutdoorFairInfo(id: number) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 招聘会统计-时间桶序列项(曲线图用) */
|
||||
export interface OutdoorFairStatisticsSeriesItem {
|
||||
time: string;
|
||||
fairCount: number;
|
||||
companyCount: number;
|
||||
jobCount: number;
|
||||
}
|
||||
|
||||
/** 招聘会数同比/环比 */
|
||||
export interface OutdoorFairStatisticsRate {
|
||||
fairCount: number;
|
||||
previousFairCount: number;
|
||||
/** 增长率:(current-previous)/previous;上期为 0 时为 null */
|
||||
rate?: number | null;
|
||||
}
|
||||
|
||||
/** 招聘会统计结果(dashboard) */
|
||||
export interface OutdoorFairStatisticsResult {
|
||||
granularity: 'day' | 'week' | 'month' | 'year';
|
||||
totals: { fairCount: number; companyCount: number; jobCount: number };
|
||||
yoy: OutdoorFairStatisticsRate;
|
||||
mom: OutdoorFairStatisticsRate;
|
||||
series: OutdoorFairStatisticsSeriesItem[];
|
||||
}
|
||||
|
||||
/** 招聘会统计查询参数 */
|
||||
export interface OutdoorFairStatisticsParams {
|
||||
/** 粒度:day/week/month/year */
|
||||
granularity?: 'day' | 'week' | 'month' | 'year';
|
||||
/** 起始时间 yyyy-MM-dd HH:mm:ss */
|
||||
startTime?: string;
|
||||
/** 截止时间 yyyy-MM-dd HH:mm:ss */
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 招聘会数据统计
|
||||
* GET /api/cms/outdoor-fair/statistics
|
||||
* skipErrorHandler: 由调用方自行处理错误,避免全局弹窗把 null msg 显示成 "null"
|
||||
*/
|
||||
export async function getOutdoorFairStatistics(params: OutdoorFairStatisticsParams) {
|
||||
return request<{ code: number; msg?: string; data: OutdoorFairStatisticsResult }>(
|
||||
`${CMS_OUTDOOR_FAIR_BASE}/statistics`,
|
||||
{ method: 'GET', params, skipErrorHandler: true },
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增户外招聘会
|
||||
* POST /api/cms/outdoor-fair
|
||||
|
||||
Reference in New Issue
Block a user