feat(platform): drill quality issues by source

This commit is contained in:
lingniu
2026-07-04 08:11:01 +08:00
parent 7a3f007340
commit a1e384f78d
2 changed files with 91 additions and 0 deletions

View File

@@ -139,6 +139,9 @@ export function Quality({
}
applyFilters({ ...filters, issueType: primaryIssueType });
};
const drillProtocol = (protocol: string) => {
applyFilters({ ...filters, protocol });
};
return (
<div className="vp-page">
@@ -184,6 +187,24 @@ export function Quality({
</Card>
</Col>
</Row>
<Card bordered title="问题来源分布" loading={loadingSummary} style={{ marginTop: 16 }}>
<Table
pagination={false}
dataSource={summary.protocols}
rowKey="name"
columns={[
{ title: '数据来源', render: (_: unknown, row: { name: string }) => qualityProtocolLabel(row.name) },
{ title: '问题数', dataIndex: 'count', width: 120 },
{
title: '操作',
width: 140,
render: (_: unknown, row: { name: string }) => (
<Button size="small" onClick={() => drillProtocol(row.name)}> {qualityProtocolLabel(row.name)} </Button>
)
}
]}
/>
</Card>
<Card bordered title="质量问题" style={{ marginTop: 16 }}>
<Form key={JSON.stringify(filters)} initValues={filters} layout="horizontal" onSubmit={(values) => {
const nextFilters = values as Record<string, string>;