feat: 优化通道运营商与金额展示
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
type UnreportedSignatureItem,
|
||||
type PagedResult,
|
||||
} from '@/api/adminApi';
|
||||
import { Breadcrumb, Button, Input, Pagination, Table, Tag, type TableColumn } from '@/components/ui';
|
||||
import { Breadcrumb, Button, CarrierTag, Input, Pagination, Table, Tag, type TableColumn } from '@/components/ui';
|
||||
import { successRateClassName, successRateTone } from '@/utils/successRate';
|
||||
|
||||
const carrierOrder = ['mobile', 'unicom', 'telecom', 'unknown'];
|
||||
@@ -348,7 +348,7 @@ function RetirementHeatmap({ date, dimensionType, dimensions, items, title }: {
|
||||
<strong title={`企业:${row.tenantName}\n企业应用:${row.applicationName || '未绑定企业应用'}`}>{row.signatureName}</strong>
|
||||
{row.channelName ? <small>{row.channelName}</small> : null}
|
||||
</span>
|
||||
<Tag tone="neutral">{carrierLabels[row.carrier] ?? row.carrier}</Tag>
|
||||
<CarrierTag carrier={row.carrier} />
|
||||
</th>
|
||||
<td className="signature-retirement-heatmap__total">{row.total.toLocaleString('zh-CN')}</td>
|
||||
{dates.map((dateKey) => {
|
||||
@@ -508,7 +508,7 @@ function SignatureQualityDrawer({
|
||||
{carriers.map((carrier) => (
|
||||
<article className={`signature-carrier-card signature-carrier-card--${normalizeCarrier(carrier.carrier)}`} key={carrier.carrier}>
|
||||
<div>
|
||||
<Tag tone={carrierTagTone(carrier.carrier)}>{carrierLabel(carrier.carrier)}</Tag>
|
||||
<CarrierTag carrier={carrier.carrier} />
|
||||
<strong>{carrier.businessMessageCount.toLocaleString('zh-CN')} 条业务短信</strong>
|
||||
</div>
|
||||
<dl>
|
||||
@@ -639,14 +639,6 @@ function carrierLabel(value: string) {
|
||||
return carrierLabels[normalizeCarrier(value)] ?? '未知';
|
||||
}
|
||||
|
||||
function carrierTagTone(value: string): 'info' | 'accent' | 'warning' | 'neutral' {
|
||||
const carrier = normalizeCarrier(value);
|
||||
if (carrier === 'mobile') return 'info';
|
||||
if (carrier === 'unicom') return 'accent';
|
||||
if (carrier === 'telecom') return 'warning';
|
||||
return 'neutral';
|
||||
}
|
||||
|
||||
function formatDuration(value?: number | null) {
|
||||
if (value == null) return '—';
|
||||
if (value < 1000) return `${Math.round(value)} 毫秒`;
|
||||
|
||||
Reference in New Issue
Block a user