feat(platform): refine vehicle operations language

This commit is contained in:
lingniu
2026-07-05 00:31:58 +08:00
parent 0613fe9f7b
commit 74ccddb1a7
4 changed files with 49 additions and 49 deletions

View File

@@ -225,7 +225,7 @@ function realtimeOperationsSummaryText({
`当前筛选:${realtimeFilterSummary(filters).join('') || '全部实时车辆'}`,
`车辆总数:${total.toLocaleString()},当前页:${rows.length.toLocaleString()}`,
`在线车辆:${onlineCount.toLocaleString()},定位有效:${locatedCount.toLocaleString()}`,
`降级服务${degradedCount.toLocaleString()}来源类型${sourceTypeCount.toLocaleString()}`,
`需要关注${degradedCount.toLocaleString()}数据通道${sourceTypeCount.toLocaleString()}`,
`地图配置:${amapConfigured ? '已配置' : '未配置'}`,
'重点车辆:',
issueLines,
@@ -364,13 +364,13 @@ function realtimeDutyHandoffText({
})
.slice(0, 8);
const lines = [
'【实时值班交接包】',
'【实时运营交接包】',
`当前筛选:${realtimeFilterSummary(filters).join('') || '全部实时车辆'}`,
`页面车辆:${rows.length.toLocaleString()} / 总计 ${total.toLocaleString()};版本:${runtimeRelease || '未标记'}`,
`在线:${onlineCount.toLocaleString()};离线:${(rows.length - onlineCount).toLocaleString()};定位有效:${locatedCount.toLocaleString()}降级${degradedCount.toLocaleString()};超时:${staleCount.toLocaleString()}来源类型${sourceTypeCount.toLocaleString()}`,
`在线:${onlineCount.toLocaleString()};离线:${(rows.length - onlineCount).toLocaleString()};定位有效:${locatedCount.toLocaleString()}需要关注${degradedCount.toLocaleString()};超时:${staleCount.toLocaleString()}数据通道${sourceTypeCount.toLocaleString()}`,
`地图:${amapConfigured ? '高德已配置' : '高德未配置'}`,
`来源覆盖:${sourceLines.length > 0 ? sourceLines.join('') : '当前页暂无来源明细'}`,
`值班入口:${appURL(buildAppHash({ page: 'realtime', protocol: filters.protocol, filters }))}`,
`车辆覆盖:${sourceLines.length > 0 ? sourceLines.join('') : '当前页暂无来源明细'}`,
`实时入口:${appURL(buildAppHash({ page: 'realtime', protocol: filters.protocol, filters }))}`,
''
];
if (sampleRows.length === 0) {
@@ -663,7 +663,7 @@ export function Realtime({
sourceTypeCount: primaryProtocols.size,
amapConfigured,
runtimeRelease: runtime?.platformRelease
}), '实时值班交接包');
}), '实时运营交接包');
const realtimeImpactLevel = degradedCount > 0 || staleCount > 0 || rows.length - onlineCount > 0 ? '需要处置' : '实时稳定';
const realtimeImpactColor = realtimeImpactLevel === '实时稳定' ? 'green' as const : degradedCount > 0 || staleCount > 0 ? 'orange' as const : 'blue' as const;
const realtimeImpactItems = [
@@ -780,9 +780,9 @@ export function Realtime({
{ label: '在线车辆', value: onlineCount, color: 'green' as const, action: () => applyFilters({ ...filters, online: 'online' }) },
{ label: '离线车辆', value: rows.length - onlineCount, color: rows.length - onlineCount > 0 ? 'orange' as const : 'green' as const, action: () => applyFilters({ ...filters, online: 'offline' }) },
{ label: '定位有效', value: locatedCount, color: locatedCount > 0 ? 'blue' as const : 'orange' as const },
{ label: '降级服务', value: degradedCount, color: degradedCount > 0 ? 'orange' as const : 'green' as const, action: () => applyFilters({ ...filters, serviceStatus: 'degraded' }) },
{ label: '需要关注', value: degradedCount, color: degradedCount > 0 ? 'orange' as const : 'green' as const, action: () => applyFilters({ ...filters, serviceStatus: 'degraded' }) },
{ label: '更新超时', value: staleCount, color: staleCount > 0 ? 'red' as const : 'green' as const },
{ label: '来源类型', value: primaryProtocols.size, color: 'blue' as const }
{ label: '数据通道', value: primaryProtocols.size, color: 'blue' as const }
].map((item) => (
item.action ? (
<button
@@ -809,7 +809,7 @@ export function Realtime({
<div className="vp-current-action-list">
{degradedCount > 0 ? (
<Button size="small" theme="light" type="warning" onClick={() => applyFilters({ ...filters, serviceStatus: 'degraded' })}>
{degradedCount.toLocaleString()}
{degradedCount.toLocaleString()}
</Button>
) : <Tag color="green"></Tag>}
{staleCount > 0 ? <Tag color="red"> {staleCount.toLocaleString()}</Tag> : <Tag color="green"></Tag>}
@@ -822,16 +822,16 @@ export function Realtime({
</div>
</div>
<div className="vp-source-coverage-board">
<div className="vp-current-service-title"></div>
<div className="vp-current-service-title"></div>
<div className="vp-source-coverage-grid">
{sourceCoverageRows.length === 0 ? (
<Typography.Text type="tertiary"></Typography.Text>
<Typography.Text type="tertiary"></Typography.Text>
) : sourceCoverageRows.map((item) => (
<button
key={item.protocol}
type="button"
className="vp-source-coverage-item"
aria-label={`筛选协议 ${item.protocol}`}
aria-label={`筛选数据通道 ${item.protocol}`}
onClick={() => applyFilters({ ...filters, protocol: item.protocol })}
>
<div className="vp-source-coverage-item-head">
@@ -859,7 +859,7 @@ export function Realtime({
<Tag color="green">{onlineCount.toLocaleString()} 线</Tag>
<Button size="small" theme="light" icon={<IconCopy />} aria-label="复制实时摘要" onClick={copyRealtimeSummary}></Button>
<Button size="small" theme="light" icon={<IconCopy />} aria-label="复制实时异常处置清单" onClick={copyRealtimeIssueChecklist}></Button>
<Button size="small" theme="light" icon={<IconCopy />} aria-label="复制实时值班交接包" onClick={copyRealtimeDutyHandoff}></Button>
<Button size="small" theme="light" icon={<IconCopy />} aria-label="复制实时运营交接包" onClick={copyRealtimeDutyHandoff}></Button>
</Space>
</div>
<VehicleMap
@@ -876,8 +876,8 @@ export function Realtime({
{ label: '在线车辆', value: onlineCount.toLocaleString(), color: 'green' as const },
{ label: '定位有效', value: locatedCount.toLocaleString(), color: 'green' as const },
{ label: '超时车辆', value: staleCount.toLocaleString(), color: staleCount > 0 ? 'orange' as const : 'green' as const },
{ label: '降级服务', value: degradedCount.toLocaleString(), color: degradedCount > 0 ? 'orange' as const : 'green' as const },
{ label: '来源类型', value: primaryProtocols.size.toLocaleString(), color: 'blue' as const }
{ label: '需要关注', value: degradedCount.toLocaleString(), color: degradedCount > 0 ? 'orange' as const : 'green' as const },
{ label: '数据通道', value: primaryProtocols.size.toLocaleString(), color: 'blue' as const }
].map((item) => (
<div key={item.label} className="vp-monitor-metric">
<Tag color={item.color}>{item.label}</Tag>
@@ -885,7 +885,7 @@ export function Realtime({
</div>
))}
<Typography.Text type="secondary">
Web JS Key Key
线
</Typography.Text>
{selectedMapRow ? (
<div className="vp-selected-vehicle-panel">
@@ -915,7 +915,7 @@ export function Realtime({
</div>
) : null}
<div className="vp-map-integration-panel">
<div className="vp-map-service-queue-title"></div>
<div className="vp-map-service-queue-title"></div>
{mapIntegrationRows.map((item) => (
<div key={item.label} className="vp-map-integration-row">
<div>
@@ -927,7 +927,7 @@ export function Realtime({
))}
</div>
<div className="vp-source-consistency-panel">
<div className="vp-map-service-queue-title"></div>
<div className="vp-map-service-queue-title"></div>
{sourceIssueRows.length === 0 ? (
<Typography.Text type="tertiary"></Typography.Text>
) : (