后端查看效果,不用拉取

This commit is contained in:
yy
2025-05-30 14:26:32 +08:00
parent f7e4ccc608
commit 4136170101
7 changed files with 911 additions and 499 deletions

View File

@@ -4,18 +4,25 @@ import { ReactNode } from 'react';
export type TimeDimension = '月' | '季度' | '年';
export type AnalysisType = '岗位发布数量' | '招聘增长率';
export type QuarterFormat = `${number}-${'Q1'|'Q2'|'Q3'|'Q4'|'第一季度'|'第二季度'|'第三季度'|'第四季度'}`;
export type AnalysisCategory = 'industry' | 'area' | 'salary';
export type SalaryRange = '3k-5k' | '5k-8k' | '8k-10k' | '10k+';
export interface IndustryDataItem {
date: string;
category: string;
value: number;
}
export interface AreaDataItem {
name: string;
value: number;
time: string;
}
export interface IndustryTrendParams {
timeDimension: TimeDimension;
type: AnalysisType;
startTime: string;
endTime: string;
selectedIndustry: string;
}
export interface IndustryTrendState extends IndustryTrendParams {
@@ -80,7 +87,15 @@ export interface ChartConfig {
}>;
legend?: boolean;
}
export interface IndustryTrendState {
timeDimension: TimeDimension;
type: AnalysisType;
startTime: string;
endTime: string;
selectedIndustry: string;
selectedSalaryRange: string;
analysisCategory: AnalysisCategory; // 新增分析类别
}
export type DateFormatter = (dateStr: string, dimension: TimeDimension) => string;
export type QuarterFormatter = (dateStr: string) => QuarterFormat;
export type ApiDataConverter = (apiData: any) => IndustryDataItem[];