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

分析模块:补齐看板、排行、趋势及报表数值兜底
企业与用户中心:修复统计、成员、技能及资金字段展示
充值与交易:修复充值、发票、订单、订阅及支付字段拼接
平台页面:修复渠道、模型、服务监控与状态空值展示
通用能力:新增安全展示工具,补齐九语言文案与回归测试
文档记录:更新修复范围、影响及回滚说明
This commit is contained in:
zhanjunhao
2026-11-20 10:18:17 +08:00
parent 74ca103334
commit c492e2b7c0
65 changed files with 507 additions and 274 deletions
@@ -25,6 +25,7 @@ import { RefreshCw } from '@/components/common/icons/ActionIcons';
import { ConsoleDrawer } from '@/components/console/ConsolePrimitives';
import useOrgCacheHourly from '../../hooks/analytics/useOrgCacheHourly';
import { useIsMobile } from '../../hooks/common/useIsMobile';
import { formatIdReference, formatPercent } from '../../helpers/safeDisplay';
// 图表序列色属于专用图表(VChart)配色,统计块沿用同色以便与图例对应。
// 千分位缩写。线上单小时 cache_read 能到十亿量级,不缩写轴标签会糊成一片。
@@ -179,7 +180,7 @@ const OrgCacheHourlySheet = ({ visible, org, onClose, t }) => {
value: (datum) =>
datum?.hit_rate === null || datum?.hit_rate === undefined
? t('无流量')
: `${Number(datum.hit_rate).toFixed(1)}%`,
: formatPercent(datum.hit_rate, 1),
},
{
key: () => t('实际消费'),
@@ -228,14 +229,15 @@ const OrgCacheHourlySheet = ({ visible, org, onClose, t }) => {
// 自适应量程会把 76%~87% 的波动拉成满屏振荡,像出了故障。
min: 0,
max: 100,
label: { formatMethod: (v) => `${Math.round(v)}%` },
label: { formatMethod: (v) => formatPercent(v, 0) },
seriesIndex: [1],
},
],
};
}, [points, hasTraffic, t]);
const orgTitle = org?.org_name || (org ? `${t('企业')} ${org.org_id}` : '');
const orgReference = formatIdReference(org?.org_id);
const orgTitle = org?.org_name || (org ? `${t('企业')} ${orgReference}` : '');
return (
<ConsoleDrawer
@@ -250,7 +252,7 @@ const OrgCacheHourlySheet = ({ visible, org, onClose, t }) => {
</span>
{org?.org_id ? (
<span className='text-xs font-normal text-[var(--text-secondary)]'>
#{org.org_id}
{orgReference}
</span>
) : null}
</div>
@@ -284,7 +286,7 @@ const OrgCacheHourlySheet = ({ visible, org, onClose, t }) => {
value={
totals.hit_rate === null || totals.hit_rate === undefined
? '--'
: `${Number(totals.hit_rate).toFixed(2)}%`
: formatPercent(totals.hit_rate, 2)
}
sub={t('按 token 加权')}
color={SERIES_COLORS.hitRate}