优化组件无用字段,更新组件reame文件
This commit is contained in:
@ -28,17 +28,19 @@ const evaluationData = [
|
|||||||
{
|
{
|
||||||
id: '1-1',
|
id: '1-1',
|
||||||
subIndicator: '质量管理体系认证',
|
subIndicator: '质量管理体系认证',
|
||||||
score: '10',
|
subScore: '10',
|
||||||
isStar: '0',
|
isStar: '0',
|
||||||
actualScore: '8',
|
score: '8', // 实际评分
|
||||||
|
scoreNum: '8', // 用于提交的评分值
|
||||||
remark: '已获得ISO9001认证'
|
remark: '已获得ISO9001认证'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '1-2',
|
id: '1-2',
|
||||||
subIndicator: '质量控制流程',
|
subIndicator: '质量控制流程',
|
||||||
score: '10',
|
subScore: '10',
|
||||||
isStar: '1',
|
isStar: '1',
|
||||||
actualScore: '9',
|
score: '9', // 实际评分
|
||||||
|
scoreNum: '9', // 用于提交的评分值
|
||||||
remark: '质量控制流程完善'
|
remark: '质量控制流程完善'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -81,9 +83,10 @@ interface IndicatorItem {
|
|||||||
indicatorNdList: { // 二级指标列表
|
indicatorNdList: { // 二级指标列表
|
||||||
id?: string; // 二级指标ID
|
id?: string; // 二级指标ID
|
||||||
subIndicator: string; // 二级指标名称
|
subIndicator: string; // 二级指标名称
|
||||||
score: string; // 二级指标分值
|
subScore: string; // 二级指标分值
|
||||||
isStar?: string; // 是否为星号项
|
isStar?: string; // 是否为星号项
|
||||||
actualScore?: string; // 实际评分
|
score: string; // 实际评分值(用于显示)
|
||||||
|
scoreNum: string; // 实际评分值(用于提交)
|
||||||
remark?: string; // 评分说明
|
remark?: string; // 评分说明
|
||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ const SupplierEvaluateScoreDetail: React.FC = () => {
|
|||||||
return {
|
return {
|
||||||
baseIndicator: indicator.baseIndicator,
|
baseIndicator: indicator.baseIndicator,
|
||||||
indicatorDesc: indicator.indicatorDesc,
|
indicatorDesc: indicator.indicatorDesc,
|
||||||
score: indicator.score,
|
score: indicator.score, // 一级指标分值
|
||||||
// 为ScoreEvaluationTable组件添加额外字段
|
// 为ScoreEvaluationTable组件添加额外字段
|
||||||
indicatorNdList:
|
indicatorNdList:
|
||||||
indicator.subIndicator
|
indicator.subIndicator
|
||||||
@ -76,16 +76,17 @@ const SupplierEvaluateScoreDetail: React.FC = () => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 字段映射说明:
|
||||||
|
// 1. subScore: API返回的二级指标标准分值
|
||||||
|
// 2. score: API返回的实际评分值
|
||||||
|
// 3. scoreNum: 组件内部使用的实际评分值字段,用于提交数据
|
||||||
return {
|
return {
|
||||||
id: subItem.id,
|
id: subItem.id,
|
||||||
subIndicator: subItem.subIndicator,
|
subIndicator: subItem.subIndicator,
|
||||||
// 注意:组件内部使用subScore作为二级指标分值,但在表格中显示为ndScore
|
subScore: subItem.subScore, // 二级指标标准分值
|
||||||
subScore: subItem.subScore,
|
|
||||||
isStar: subItem.starIndicator,
|
isStar: subItem.starIndicator,
|
||||||
// 修正:使用scoreNum作为实际评分值,这是组件期望的字段
|
scoreNum: subItem.score || '', // 实际评分值:使用API返回的score字段
|
||||||
scoreNum: subItem.score || '',
|
score: subItem.score || '', // 组件内部显示用
|
||||||
// 保留score字段以兼容组件内部逻辑
|
|
||||||
score: subItem.score || '',
|
|
||||||
remark: subItem.remark || '',
|
remark: subItem.remark || '',
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user