后端查看效果,不用拉取
This commit is contained in:
19
src/types/analysis/industry.d.ts
vendored
19
src/types/analysis/industry.d.ts
vendored
@@ -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[];
|
||||
Reference in New Issue
Block a user