feat(platform): align vehicle detail with service delivery

This commit is contained in:
lingniu
2026-07-06 04:53:34 +08:00
parent 7ac1390394
commit 286840c19c
2 changed files with 14 additions and 14 deletions

View File

@@ -714,13 +714,13 @@ export function VehicleDetail({
};
const copyVehicleOperationsSummary = () => {
if (!detail) {
Toast.warning('当前没有可复制的运营摘要');
Toast.warning('当前没有可复制的车辆服务摘要');
return;
}
const vehicleName = [archivePlate, displayVIN].filter((item) => item && item !== '-').join(' / ') || displayLookupKey;
const actionLines = serviceActions.map((item, index) => `${index + 1}. ${item.label}${item.description}`);
const lines = [
'【车辆服务运营摘要】',
'【车辆服务摘要】',
`车辆:${vehicleName}`,
`当前范围:${scopeText}`,
`服务状态:${customerStatusTitle(serviceStatus?.title) || serviceConclusion.status}`,
@@ -738,7 +738,7 @@ export function VehicleDetail({
`历史数据:${vehicleServiceURL(vehicleServiceHash('history-query', { tab: 'raw', includeFields: 'true' }))}`,
`统计查询:${vehicleServiceURL(vehicleServiceHash('mileage'))}`
];
copyText(lines.join('\n'), '运营摘要');
copyText(lines.join('\n'), '车辆服务摘要');
};
const detailWorkbench = [
{
@@ -963,7 +963,7 @@ export function VehicleDetail({
detail: priorityQualityIssue ? `${qualityIssueLabel(priorityQualityIssue.issueType)} / ${priorityQualityIssue.lastSeen || '-'}` : '暂无高优先级告警,保持观察。',
color: qualityCount > 0 ? 'orange' as const : 'green' as const,
primaryAction: '告警事件',
secondaryAction: '运营摘要',
secondaryAction: '服务摘要',
disabled: !onOpenQuality || (!hasResolvedVIN && qualityCount <= 0),
onPrimary: () => onOpenQuality?.(qualityFiltersForCurrentVehicle()),
onSecondary: () => copyVehicleOperationsSummary()
@@ -1262,7 +1262,7 @@ export function VehicleDetail({
<Button icon={<IconRefresh />} onClick={() => load(query)} loading={loading}></Button>
<Button icon={<IconCopy />} onClick={copyVehicleServiceURL}></Button>
<Button disabled={!detail} icon={<IconCopy />} onClick={copyVehicleDiagnosticSummary}></Button>
<Button disabled={!detail} icon={<IconCopy />} onClick={copyVehicleOperationsSummary}></Button>
<Button disabled={!detail} icon={<IconCopy />} onClick={copyVehicleOperationsSummary}></Button>
<Button disabled={!detail} icon={<IconDownload />} onClick={exportVehicleReport}> CSV</Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenRealtime(resolvedVIN, activeProtocol)}></Button>
<Button disabled={!hasResolvedVIN} onClick={() => onOpenHistory(resolvedVIN, activeProtocol)}></Button>
@@ -1491,7 +1491,7 @@ export function VehicleDetail({
<Card
bordered
title={<Space><span></span><Button size="small" disabled={!detail} icon={<IconCopy />} onClick={copyUnifiedVehicleService}></Button></Space>}
title={<Space><span></span><Button size="small" disabled={!detail} icon={<IconCopy />} onClick={copyUnifiedVehicleService}></Button></Space>}
style={{ marginTop: 16 }}
>
<div className="vp-unified-service-board">
@@ -1690,7 +1690,7 @@ export function VehicleDetail({
</div>
</Card>
<Card bordered title="单车运营工作台" style={{ marginTop: 16 }}>
<Card bordered title="单车服务任务台" style={{ marginTop: 16 }}>
<div className="vp-workbench-grid">
{detailWorkbench.map((item) => (
<div key={item.title} className="vp-workbench-item">
@@ -1708,7 +1708,7 @@ export function VehicleDetail({
theme="light"
type="primary"
disabled={item.disabled || (item.title === '告警处置' && !onOpenQuality)}
aria-label={`单车运营工作${item.title} ${action.label}`}
aria-label={`单车服务任务${item.title} ${action.label}`}
onClick={action.onClick}
>
{action.label}