feat(platform): label dashboard protocols as evidence

This commit is contained in:
lingniu
2026-07-04 04:58:27 +08:00
parent 59bda6a6eb
commit 4d9422a434
2 changed files with 3 additions and 2 deletions

View File

@@ -153,12 +153,12 @@ export function Dashboard({ onOpenVehicle, onOpenQuality, onOpenVehicles }: { on
</Card>
</Col>
<Col span={8}>
<Card title="数据来源在线分布" bordered>
<Card title="来源证据在线分布" bordered>
<Table
pagination={false}
dataSource={serviceSummary?.protocols ?? summary?.protocols ?? []}
columns={[
{ title: '数据来源', dataIndex: 'protocol' },
{ title: '来源证据', dataIndex: 'protocol' },
{ title: '在线', dataIndex: 'online' },
{ title: '总数', dataIndex: 'total' },
{

View File

@@ -124,6 +124,7 @@ test('dashboard renders vehicle service summary metrics', async () => {
expect(screen.getByText('暂无来源车辆')).toBeInTheDocument();
expect(screen.getByText('461')).toBeInTheDocument();
expect(screen.getByText('身份未绑定')).toBeInTheDocument();
expect(screen.getByText('来源证据在线分布')).toBeInTheDocument();
expect(fetchMock).toHaveBeenCalledWith('/api/vehicle-service/summary', undefined);
});