feat(platform): copy quality issue notification

This commit is contained in:
lingniu
2026-07-04 14:05:48 +08:00
parent e515a4251e
commit a91eefd614
2 changed files with 93 additions and 1 deletions

View File

@@ -249,6 +249,10 @@ function priorityIssueRows(rows: QualityIssueRow[]): PriorityIssueRow[] {
.slice(0, 5);
}
function priorityIssueFromRow(row: QualityIssueRow): PriorityIssueRow {
return priorityIssueRows([row])[0];
}
function priorityIssueNotificationText(row: PriorityIssueRow) {
const lookup = qualityIssueVehicleLookup(row);
const dateFrom = issueEvidenceDate(row.lastSeen);
@@ -817,6 +821,7 @@ export function Quality({
<Button size="small" disabled={!lookup.key || !onOpenHistory} onClick={() => openIssueHistory(row)}></Button>
<Button size="small" disabled={!lookup.key || !onOpenRaw} onClick={() => openIssueRaw(row)}> RAW</Button>
<Button size="small" disabled={!lookup.key || !onOpenMileage} onClick={() => openIssueMileage(row)}></Button>
<Button size="small" onClick={() => copyText(priorityIssueNotificationText(priorityIssueFromRow(row)), '告警通知')}></Button>
<Button size="small" disabled={!lookup.key} onClick={() => onOpenVehicle(lookup.key, row.protocol)}>
{lookup.label}
</Button>