fix(*): 全量 UI 审查与 undefined 展示异常修复

This commit is contained in:
zhanjunhao
2026-11-20 10:18:17 +08:00
parent 04cc45bbb7
commit 605cff1d58
65 changed files with 507 additions and 274 deletions
+10 -7
View File
@@ -16,8 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { formatIdReference } from '../../helpers/safeDisplay';
import { formatPercent } from '../../helpers/safeDisplay';
import {
formatIdReference,
formatNumber,
formatPercent,
} from '../../helpers/safeDisplay';
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
@@ -271,7 +274,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
{
label: t('质量评分'),
value: metric.has('quality.score')
? value('quality.score', true).toFixed(1)
? formatNumber(value('quality.score', true), 1, t('数据不足'))
: t('数据不足'),
detail: `${Math.round(value('quality.feedback_count'))} ${t('反馈样本')}`,
icon: FlaskConical,
@@ -475,7 +478,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
</Tag>
</div>
<span>
{t('评分')}: {Number(row.score).toFixed(1)}
{t('评分')}: {formatNumber(row.score, 1)}
</span>
<span>
{t('样本')}: {row.sample_count}
@@ -496,7 +499,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
{
title: t('评分'),
dataIndex: 'score',
render: (score) => Number(score).toFixed(1),
render: (score) => formatNumber(score, 1),
},
{ title: t('样本'), dataIndex: 'sample_count' },
{
@@ -564,7 +567,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
<span>
{t('平均成本')}:{' '}
{row.data_sufficient
? Number(row.average_quota).toFixed(1)
? formatNumber(row.average_quota, 1)
: t('数据不足')}
</span>
</article>
@@ -598,7 +601,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
title: t('平均成本'),
render: (_, row) =>
row.data_sufficient
? Number(row.average_quota).toFixed(1)
? formatNumber(row.average_quota, 1)
: t('数据不足'),
},
]}