对接评价结果接口
This commit is contained in:
@ -35,22 +35,3 @@ export const ApprovalResultColor = {
|
||||
[ApprovalResult.APPROVED]: 'green',
|
||||
[ApprovalResult.REJECTED]: 'red',
|
||||
};
|
||||
|
||||
// 导入评价等级
|
||||
import { EvaluateLevel, EvaluateLevelText, EvaluateLevelColor } from './supplierTemplateDict';
|
||||
|
||||
// 重新导出评价等级
|
||||
export { EvaluateLevel, EvaluateLevelText, EvaluateLevelColor };
|
||||
|
||||
// 评价分数对应等级
|
||||
export const getEvaluateLevel = (score: number): string => {
|
||||
if (score >= 90) {
|
||||
return EvaluateLevel.EXCELLENT;
|
||||
} else if (score >= 80) {
|
||||
return EvaluateLevel.GOOD;
|
||||
} else if (score >= 70) {
|
||||
return EvaluateLevel.AVERAGE;
|
||||
} else {
|
||||
return EvaluateLevel.POOR;
|
||||
}
|
||||
};
|
||||
|
@ -31,14 +31,6 @@ export const TemplateStatusColor = {
|
||||
[TemplateStatus.DISABLED]: 'red',
|
||||
};
|
||||
|
||||
// 评价等级
|
||||
export const EvaluateLevel = {
|
||||
EXCELLENT: 'excellent', // 优秀
|
||||
GOOD: 'good', // 良好
|
||||
AVERAGE: 'average', // 一般
|
||||
POOR: 'poor', // 较差
|
||||
};
|
||||
|
||||
// 是否设置星号项
|
||||
export const StarLevel = {
|
||||
NO: '0', // 否
|
||||
@ -50,20 +42,6 @@ export const StarLevelText = {
|
||||
[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',
|
||||
|
Reference in New Issue
Block a user