// 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);
|
}
|
}
|
}
|