feat(platform): refine vehicle operations language
This commit is contained in:
@@ -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>
|
||||
) : (
|
||||
|
||||
@@ -120,7 +120,7 @@ const vehicleExportColumns: CsvColumn<VehicleCoverageRow>[] = [
|
||||
{ title: 'OEM', value: (row) => row.oem },
|
||||
{ title: '来源', value: (row) => row.protocols?.join('|') },
|
||||
{ title: '缺失来源', value: (row) => row.missingProtocols?.join('|') },
|
||||
{ title: '来源覆盖', value: (row) => sourceEvidenceText(row) },
|
||||
{ title: '车辆覆盖', value: (row) => sourceEvidenceText(row) },
|
||||
{ title: '服务状态', value: (row) => vehicleServiceStatus(row).label },
|
||||
{ title: '诊断摘要', value: (row) => sourceDiagnosisText(row) },
|
||||
{ title: '档案完整度', value: (row) => vehicleArchiveCompleteness(row).label },
|
||||
@@ -150,7 +150,7 @@ function vehicleFilterSummary(filters: Record<string, string>) {
|
||||
return [
|
||||
filters.keyword ? `关键词:${filters.keyword}` : '',
|
||||
filters.protocol ? `数据来源:${filters.protocol}` : '',
|
||||
filters.coverage ? `来源覆盖:${coverageLabel[filters.coverage] ?? filters.coverage}` : '',
|
||||
filters.coverage ? `车辆覆盖:${coverageLabel[filters.coverage] ?? filters.coverage}` : '',
|
||||
filters.missingProtocol ? `缺失来源:${filters.missingProtocol}` : '',
|
||||
filters.serviceStatus ? `服务状态:${serviceStatusLabel[filters.serviceStatus] ?? filters.serviceStatus}` : '',
|
||||
filters.online ? `在线:${onlineLabel[filters.online] ?? filters.online}` : '',
|
||||
@@ -654,7 +654,7 @@ export function Vehicles({
|
||||
|
||||
return (
|
||||
<div className="vp-page">
|
||||
<PageHeader title="车辆服务" description="以 VIN 为主对象维护车辆身份、数据来源覆盖、在线状态和绑定状态" />
|
||||
<PageHeader title="车辆服务" description="以 VIN 为主对象维护车辆身份、车辆覆盖、在线状态和绑定状态" />
|
||||
<Card bordered>
|
||||
<Form key={JSON.stringify(filters)} initValues={filters} layout="horizontal" onSubmit={(values) => {
|
||||
const nextFilters = values as Record<string, string>;
|
||||
@@ -666,7 +666,7 @@ export function Vehicles({
|
||||
<Select.Option value="JT808">JT808</Select.Option>
|
||||
<Select.Option value="YUTONG_MQTT">YUTONG_MQTT</Select.Option>
|
||||
</Form.Select>
|
||||
<Form.Select field="coverage" label="来源覆盖" placeholder="全部" style={{ width: 130 }}>
|
||||
<Form.Select field="coverage" label="车辆覆盖" placeholder="全部" style={{ width: 130 }}>
|
||||
<Select.Option value="single">单源</Select.Option>
|
||||
<Select.Option value="multi">多源</Select.Option>
|
||||
</Form.Select>
|
||||
|
||||
Reference in New Issue
Block a user