feat(platform): streamline dashboard around vehicle workflows

This commit is contained in:
lingniu
2026-07-05 15:02:14 +08:00
parent e829f143e7
commit 2824982b60
2 changed files with 46 additions and 46 deletions

View File

@@ -956,10 +956,10 @@ export function Dashboard({
onClick: openTimeMonitorHistory
},
{
label: '里程核对',
label: '统计查询',
value: `${formatCount(serviceSummary?.totalVehicles)} 车辆`,
detail: '用同一范围核对区间里程和日统计闭合。',
action: '核对里程',
action: '查看统计',
color: 'green' as const,
onClick: openTimeMonitorMileage
},
@@ -1405,9 +1405,9 @@ export function Dashboard({
onClick: openTimeMonitorHistory
},
{
title: '里程核对',
title: '统计查询',
description: '按车辆口径核对区间里程、日统计和异常来源。',
action: '里程统计',
action: '统计查询',
evidence: `${formatCount(serviceSummary?.totalVehicles)} 辆可统计`,
onClick: openTimeMonitorMileage
},
@@ -1507,7 +1507,7 @@ export function Dashboard({
</div>
<div className="vp-fleet-monitor-panel">
<div className="vp-fleet-monitor-panel-head">
<Typography.Text strong></Typography.Text>
<Typography.Text strong></Typography.Text>
<Button size="small" theme="light" type="primary" onClick={copyCustomerServiceGuide}></Button>
</div>
<div className="vp-fleet-next-actions">
@@ -1526,7 +1526,7 @@ export function Dashboard({
</button>
))}
</div>
<Typography.Text strong></Typography.Text>
<Typography.Text strong></Typography.Text>
<div className="vp-fleet-monitor-actions">
{customerCockpitWorkflows.map((item) => (
<button key={item.title} type="button" className="vp-fleet-monitor-action" onClick={item.onClick} aria-label={`客户车辆工作流 ${item.title} ${item.action}`}>
@@ -1543,10 +1543,10 @@ export function Dashboard({
<Tag color={timeMonitorScope().keyword ? 'green' : 'grey'}>{timeMonitorScope().keyword ? '单车' : '全域'}</Tag>
</Space>
<strong>{timeMonitorSummary}</strong>
<span></span>
<span></span>
<Space wrap>
<Button size="small" theme="solid" type="primary" onClick={openTimeMonitorHistory}></Button>
<Button size="small" theme="light" type="primary" onClick={openTimeMonitorMileage}></Button>
<Button size="small" theme="light" type="primary" onClick={openTimeMonitorMileage}></Button>
<Button size="small" theme="light" type="primary" onClick={openTimeMonitorRaw}></Button>
</Space>
</div>
@@ -1561,39 +1561,6 @@ export function Dashboard({
</div>
</div>
</Card>
<Card bordered title="车辆服务指挥台" style={{ marginBottom: 16 }}>
<div className="vp-command-center-grid">
{commandCenterItems.map((item) => (
<div key={item.title} className="vp-command-center-item">
<div className="vp-command-center-head">
<Tag color={item.color}>{item.title}</Tag>
<strong>{item.value}</strong>
</div>
<Typography.Text type="secondary">{item.detail}</Typography.Text>
<Space wrap>
<Button
size="small"
theme="solid"
type="primary"
aria-label={`车辆服务指挥台 ${item.title} ${item.primaryAction}`}
onClick={item.onPrimary}
>
{item.primaryAction}
</Button>
<Button
size="small"
theme="light"
type="primary"
aria-label={`车辆服务指挥台 ${item.title} ${item.secondaryAction}`}
onClick={item.onSecondary}
>
{item.secondaryAction}
</Button>
</Space>
</div>
))}
</div>
</Card>
<Card
bordered
title={<Space><span></span><Tag color="blue">{timeMonitorSummary}</Tag></Space>}
@@ -1749,9 +1716,42 @@ export function Dashboard({
<details className="vp-dashboard-secondary-details">
<summary>
<span></span>
<small>KPI </small>
<small>KPI </small>
</summary>
<div className="vp-dashboard-secondary-body">
<Card bordered title="车辆服务指挥台" style={{ marginBottom: 16 }}>
<div className="vp-command-center-grid">
{commandCenterItems.map((item) => (
<div key={item.title} className="vp-command-center-item">
<div className="vp-command-center-head">
<Tag color={item.color}>{item.title}</Tag>
<strong>{item.value}</strong>
</div>
<Typography.Text type="secondary">{item.detail}</Typography.Text>
<Space wrap>
<Button
size="small"
theme="solid"
type="primary"
aria-label={`车辆服务指挥台 ${item.title} ${item.primaryAction}`}
onClick={item.onPrimary}
>
{item.primaryAction}
</Button>
<Button
size="small"
theme="light"
type="primary"
aria-label={`车辆服务指挥台 ${item.title} ${item.secondaryAction}`}
onClick={item.onSecondary}
>
{item.secondaryAction}
</Button>
</Space>
</div>
))}
</div>
</Card>
<Card bordered title="客户常用服务" style={{ marginBottom: 16 }}>
<div className="vp-customer-workflow-grid">
{customerHeroActions.map((item) => (