维护国际化

This commit is contained in:
linxd
2025-07-03 10:21:55 +08:00
parent fafb2cda44
commit cf8e9d0820
61 changed files with 2246 additions and 836 deletions

View File

@ -9,6 +9,7 @@ import {
Typography,
Tooltip,
} from 'antd';
import { useIntl } from 'umi';
import './ScoreEvaluationTable.less';
const { Text } = Typography;
@ -63,6 +64,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
isDetail = false,
loading = false,
}) => {
const intl = useIntl();
// 表格数据源
const [dataSource, setDataSource] = useState<TableRowItem[]>([]);
@ -196,10 +198,10 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
const columns = [
{
title: '一级指标',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.level1' }),
children: [
{
title: '序号',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.index' }),
dataIndex: 'index',
align: 'center' as const,
key: 'index',
@ -209,7 +211,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
},
},
{
title: '基本指标',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.baseIndicator' }),
align: 'center' as const,
dataIndex: 'baseIndicator',
key: 'baseIndicator',
@ -234,7 +236,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
},
},
{
title: '指标说明',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.indicatorDesc' }),
align: 'center' as const,
dataIndex: 'descIndicator',
key: 'descIndicator',
@ -259,7 +261,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
},
},
{
title: '分值',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.score' }),
align: 'center' as const,
dataIndex: 'stScore',
key: 'stScore',
@ -286,10 +288,10 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
],
},
{
title: '二级指标',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.level2' }),
children: [
{
title: '细分指标',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.subIndicator' }),
dataIndex: 'subIndicator',
key: 'subIndicator',
align: 'center' as const,
@ -297,7 +299,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
render: (text: string) => text || '-',
},
{
title: '分值',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.subScore' }),
dataIndex: 'ndScore',
key: 'ndScore',
width: 80,
@ -305,7 +307,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
render: (text: string) => text || '0',
},
{
title: '评分',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.actualScore' }),
dataIndex: 'score',
key: 'score',
width: 100,
@ -321,13 +323,13 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
value={text ? parseFloat(String(text)) : undefined}
onChange={(val) => handleInputChange(val, record, 'score')}
style={{ width: '100%' }}
placeholder="请输入评分"
placeholder={intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.placeholder.score' })}
/>
);
},
},
{
title: '评分说明',
title: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.remark' }),
dataIndex: 'remark',
key: 'remark',
width: 200,
@ -343,7 +345,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
<TextArea
value={text}
onChange={(e) => handleInputChange(e.target.value, record, 'remark')}
placeholder="请输入评分说明"
placeholder={intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.placeholder.remark' })}
autoSize={{ minRows: 1, maxRows: 3 }}
/>
);
@ -364,7 +366,7 @@ const ScoreEvaluationTable: React.FC<ScoreEvaluationTableProps> = ({
size="middle"
loading={loading}
scroll={{ x: 'max-content' }}
locale={{ emptyText: '无数据' }}
locale={{ emptyText: intl.formatMessage({ id: 'supplierEvaluateScore.scoreTable.emptyText' }) }}
/>
</div>
);