feat(ai): 优化拆解重跑与结果展示
This commit is contained in:
13
apps/web/lib/ai-decompose-report.ts
Normal file
13
apps/web/lib/ai-decompose-report.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface ReportRequirement {
|
||||
id: string;
|
||||
code: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export function formatReportRequirementLabel(reqId: string, requirements: ReportRequirement[]): string {
|
||||
const requirement = requirements.find((item) => item.id === reqId || item.code === reqId);
|
||||
if (!requirement) return reqId;
|
||||
return `${requirement.code} ${requirement.title}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user