zhengyiming
2025-02-10 958b79ed89b9e742540f714a80261d222c0fc09b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// import { IndustryCategoryType } from '@/constants';
export class BaseCategoryRoute implements API.CategoryDto {
  name: string;
  id: string;
  routeName: string;
  isDependencing = false;
 
  constructor(category: API.CategoryDto) {
    this.id = category.id;
    this.name = category.name;
  }
 
  getRouteName() {
    return this.routeName;
  }
 
  getQuery() {
    return {};
  }
}
 
export class FrontNeedSomeoneCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontNeedSomeone';
}
 
export class FrontNeedHeadHunterCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontNeedHeadHunter';
}
 
export class FrontNeedTrainCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontNeedTrain';
}
 
export class FrontOrderCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontOrder';
}
 
export class FrontResourceCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontResource';
}
 
export class FrontHRCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontHR';
}
 
export class FrontHumanResourceCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontHumanResource';
}
 
export class FrontParkCategoryRoute extends BaseCategoryRoute {
  routeName = 'FrontPark';
  isDependencing = true;
}
 
export class IndustryMatchingCategoryRoute extends BaseCategoryRoute {
  routeName = 'IndustryComplement';
 
  getQuery() {
    return {
      categoryId: this.id ?? '',
    };
  }
}
 
export class IndustryInformationCategoryRoute extends BaseCategoryRoute {
  routeName = 'IndustryInformation';
 
  getQuery() {
    return {
      categoryId: this.id ?? '',
    };
  }
}
 
export class CategoryUtils {
  static isHumanResource(categoryName: string) {
    return categoryName === '人资公司';
  }
  static isSocialSecurityAgency(categoryName: string) {
    return categoryName === '社保代理';
  }
  static isIHasResource(categoryName: string) {
    return categoryName === '我有人';
  }
  static isIHasOrder(categoryName: string) {
    return categoryName === '我有订单';
  }
  static isHumanResourceByName(categoryName: string) {
    return categoryName === '人力资源协会';
  }
 
  static isIHasPark(categoryName: string) {
    return categoryName === '我有园区';
  }
  static isCampusRecruitment(categoryName: string) {
    return categoryName === '校园招聘';
  }
 
  static isPayrollElectronicTag(categoryName: string) {
    return categoryName === '发薪电签';
  }
  static isInsurance(categoryName: string) {
    return categoryName === '保险';
  }
  static isBackgroundCheck(categoryName: string) {
    return categoryName === '背调';
  }
 
  static isINeedPerson(categoryName: string) {
    return categoryName === '我要人';
  }
  static isINeedHeadHunter(categoryName: string) {
    return categoryName === '我要猎头';
  }
  static isINeedTrain(categoryName: string) {
    return categoryName === '我要培训';
  }
 
  static isINeedConsult(categoryName: string) {
    return categoryName === '我要咨询';
  }
  static isRLZYJJRXH(categoryName: string) {
    return categoryName === '人力资源经理人协会';
  }
 
  static RenboExhibition(categoryName: string) {
    return categoryName === '人博展会';
  }
  static IndustryForums(categoryName: string) {
    return categoryName === '行业论坛';
  }
 
  static InformationGathering(categoryName: string) {
    return categoryName === '行业资讯';
  }
  static IndustryPolicy(categoryName: string) {
    return categoryName === '行业政策';
  }
 
  static isZYXS(categoryName: string) {
    return categoryName === '卓玥学社';
  }
 
  static CategoryRouteMap = new Map<string, typeof BaseCategoryRoute>([
    //------------甲方需求------------
    ['我要人', FrontNeedSomeoneCategoryRoute],
    ['我要猎头', FrontNeedHeadHunterCategoryRoute],
    ['我要培训', FrontNeedTrainCategoryRoute],
    //------------行业服务------------
    ['我有订单', FrontOrderCategoryRoute],
    ['我有人', FrontResourceCategoryRoute],
    ['人资公司', FrontHRCategoryRoute],
    ['人力资源协会', FrontHumanResourceCategoryRoute],
    //------------行业配套------------
    ['我有园区', FrontParkCategoryRoute],
    ['发薪电签', IndustryMatchingCategoryRoute],
    ['保险', IndustryMatchingCategoryRoute],
    ['背调', IndustryMatchingCategoryRoute],
    //------------行业咨询------------
    ['人博展会', IndustryInformationCategoryRoute],
    ['行业论坛', IndustryInformationCategoryRoute],
    ['行业资讯', IndustryInformationCategoryRoute],
    ['行业动态', IndustryInformationCategoryRoute],
    ['行业政策', IndustryInformationCategoryRoute],
  ]);
 
  static createCategoryRoute(category: API.CategoryDto): BaseCategoryRoute {
    const CategoryRoute = this.CategoryRouteMap.get(category.name);
    if (CategoryRoute) {
      return new CategoryRoute(category);
    }
  }
}