fix(ui): 修复登录和并发请求并统一页面展示
调整登录流程和请求处理,统一各中心的表格交互、主题样式和页面展示。
This commit is contained in:
@@ -31,6 +31,10 @@ import {
|
||||
} from 'lucide-react';
|
||||
import { ChangeText, KpiCard, SectionCard } from './shared';
|
||||
import { formatCny, formatCst, pct, SEGMENTS } from './utils';
|
||||
import {
|
||||
formatPercent,
|
||||
formatRatioPercent,
|
||||
} from '../../../helpers/safeDisplay';
|
||||
|
||||
// ─── 报表抬头:统计口径 + 数据状态 ─────────────────────────────────
|
||||
export const ReportHeader = ({ report, onExport, t }) => {
|
||||
@@ -209,7 +213,7 @@ export const KpiGrid = ({ report, lists, cny, onJump, t }) => {
|
||||
n: (k.active_orgs || 0).toLocaleString(),
|
||||
count: k.active_orgs || 0,
|
||||
}),
|
||||
sub: `${t('活跃率')} ${pct(k.active_orgs, servingOrgs).toFixed(1)}% · ${t('新增')} ${k.new_orgs || 0}`,
|
||||
sub: `${t('活跃率')} ${formatRatioPercent(k.active_orgs, servingOrgs)} · ${t('新增')} ${k.new_orgs || 0}`,
|
||||
compare: (
|
||||
<ChangeText cur={k.active_orgs} prev={k.prev_active_orgs} t={t} />
|
||||
),
|
||||
@@ -229,7 +233,7 @@ export const KpiGrid = ({ report, lists, cny, onJump, t }) => {
|
||||
n: (k.active_members || 0).toLocaleString(),
|
||||
count: k.active_members || 0,
|
||||
}),
|
||||
sub: `${t('渗透率')} ${Math.min(100, pct(k.active_members, k.total_members)).toFixed(1)}% · ${t('成员')} ${(k.total_members || 0).toLocaleString()}`,
|
||||
sub: `${t('渗透率')} ${formatPercent(Math.min(100, pct(k.active_members, k.total_members)))} · ${t('成员')} ${(k.total_members || 0).toLocaleString()}`,
|
||||
tip: t('本期通过企业密钥产生调用的去重成员数(按自然日统计)'),
|
||||
onClick: () => onJump('growth'),
|
||||
},
|
||||
@@ -277,7 +281,7 @@ export const KpiGrid = ({ report, lists, cny, onJump, t }) => {
|
||||
},
|
||||
{
|
||||
title: t('企业消耗占平台'),
|
||||
value: `${share.toFixed(1)}%`,
|
||||
value: formatPercent(share),
|
||||
sub: `${t('个人消耗')} ${formatCny(k.personal_quota, cny)}`,
|
||||
compare:
|
||||
shareDelta === null ? null : (
|
||||
@@ -341,7 +345,7 @@ export const HealthSegments = ({ report, cny, activeSegment, onSelect, t }) => {
|
||||
{t(meta.label)}
|
||||
</Tag>
|
||||
<span className='text-xs text-gray-400 tabular-nums'>
|
||||
{pct(s.count, totalCount).toFixed(0)}%
|
||||
{formatPercent(pct(s.count, totalCount), 0)}
|
||||
</span>
|
||||
</div>
|
||||
<div className='mt-2 text-lg font-bold text-gray-800 dark:text-gray-100 tabular-nums'>
|
||||
|
||||
Reference in New Issue
Block a user