80 lines
1.8 KiB
TypeScript
80 lines
1.8 KiB
TypeScript
// 模板类型 - 从任务字典导入
|
|
import { TaskType, TaskTypeText } from './supplierTaskDict';
|
|
|
|
// 品类限制类型
|
|
export const CategoryLimitationType = {
|
|
UNIVERSAL: '0', // 通用不限品类
|
|
LIMITED: '1', // 限制品类
|
|
};
|
|
|
|
export const CategoryLimitationTypeText = {
|
|
[CategoryLimitationType.UNIVERSAL]: '通用不限品类',
|
|
[CategoryLimitationType.LIMITED]: '限制品类',
|
|
};
|
|
|
|
// 模板状态
|
|
export const TemplateStatus = {
|
|
DRAFT: '0', // 草稿
|
|
ENABLED: '1', // 启用
|
|
DISABLED: '2', // 禁用
|
|
};
|
|
|
|
export const TemplateStatusText = {
|
|
[TemplateStatus.DRAFT]: '草稿',
|
|
[TemplateStatus.ENABLED]: '已启用',
|
|
[TemplateStatus.DISABLED]: '已禁用',
|
|
};
|
|
|
|
export const TemplateStatusColor = {
|
|
[TemplateStatus.DRAFT]: 'default',
|
|
[TemplateStatus.ENABLED]: 'green',
|
|
[TemplateStatus.DISABLED]: 'red',
|
|
};
|
|
|
|
// 评价等级
|
|
export const EvaluateLevel = {
|
|
EXCELLENT: 'excellent', // 优秀
|
|
GOOD: 'good', // 良好
|
|
AVERAGE: 'average', // 一般
|
|
POOR: 'poor', // 较差
|
|
};
|
|
|
|
// 是否设置星号项
|
|
export const StarLevel = {
|
|
NO: '0', // 否
|
|
YES: '1', // 是
|
|
};
|
|
|
|
export const StarLevelText = {
|
|
[StarLevel.NO]: '否',
|
|
[StarLevel.YES]: '是',
|
|
};
|
|
|
|
export const EvaluateLevelText = {
|
|
[EvaluateLevel.EXCELLENT]: 'A',
|
|
[EvaluateLevel.GOOD]: 'B',
|
|
[EvaluateLevel.AVERAGE]: 'C',
|
|
[EvaluateLevel.POOR]: 'D',
|
|
};
|
|
|
|
export const EvaluateLevelColor = {
|
|
[EvaluateLevel.EXCELLENT]: 'green',
|
|
[EvaluateLevel.GOOD]: 'blue',
|
|
[EvaluateLevel.AVERAGE]: 'orange',
|
|
[EvaluateLevel.POOR]: 'red',
|
|
};
|
|
|
|
// 指标添加选项
|
|
export enum IndicatorAddOption {
|
|
CAN_ADD = '0',
|
|
CANNOT_ADD = '1',
|
|
}
|
|
|
|
export const IndicatorAddOptionText = {
|
|
[IndicatorAddOption.CAN_ADD]: '可增加',
|
|
[IndicatorAddOption.CANNOT_ADD]: '不可增加',
|
|
};
|
|
|
|
// 重新导出任务类型
|
|
export { TaskType, TaskTypeText };
|