refactor: update SVG circle radius and improve code readability in ReportExportDialog
Build and Push CodeReview / build (push) Waiting to run
Details
Build and Push CodeReview / build (push) Waiting to run
Details
This commit is contained in:
parent
7f951d5451
commit
7c0d95385f
File diff suppressed because it is too large
Load Diff
|
|
@ -866,8 +866,8 @@ export const ReportExportDialog = memo(function ReportExportDialog({
|
|||
};
|
||||
const scoreInfo = getScoreGrade(score);
|
||||
|
||||
// SVG 圆环进度条
|
||||
const circumference = 2 * Math.PI * 40; // r=40 (smaller)
|
||||
// SVG 圆环进度条 (逆时针方向)
|
||||
const circumference = 2 * Math.PI * 23; // r=23 matches SVG circle radius
|
||||
const strokeDashoffset = circumference - (score / 100) * circumference;
|
||||
|
||||
return `<!DOCTYPE html>
|
||||
|
|
@ -1012,8 +1012,8 @@ export const ReportExportDialog = memo(function ReportExportDialog({
|
|||
transform: rotate(-90deg);
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.score-ring-bg { fill: none; stroke: var(--border); stroke-width: 5; }
|
||||
.score-ring-progress {
|
||||
fill: none;
|
||||
|
|
@ -1457,10 +1457,10 @@ export const ReportExportDialog = memo(function ReportExportDialog({
|
|||
<span class="severity-bar-title">分布</span>
|
||||
<div class="severity-bar">
|
||||
${totalFindings > 0 ? `
|
||||
<div class="severity-segment critical" style="width:${(criticalCount/totalFindings)*100}%"></div>
|
||||
<div class="severity-segment high" style="width:${(highCount/totalFindings)*100}%"></div>
|
||||
<div class="severity-segment medium" style="width:${(mediumCount/totalFindings)*100}%"></div>
|
||||
<div class="severity-segment low" style="width:${(lowCount/totalFindings)*100}%"></div>
|
||||
<div class="severity-segment critical" style="width:${(criticalCount / totalFindings) * 100}%"></div>
|
||||
<div class="severity-segment high" style="width:${(highCount / totalFindings) * 100}%"></div>
|
||||
<div class="severity-segment medium" style="width:${(mediumCount / totalFindings) * 100}%"></div>
|
||||
<div class="severity-segment low" style="width:${(lowCount / totalFindings) * 100}%"></div>
|
||||
` : ''}
|
||||
</div>
|
||||
<div class="severity-legend">
|
||||
|
|
|
|||
Loading…
Reference in New Issue