From e82841fe8375db81452bb194bd2b1c80128a035c Mon Sep 17 00:00:00 2001 From: cjw <792430652@qq.com> Date: Mon, 16 Feb 2026 17:48:46 +0800 Subject: [PATCH] deving --- templates/result.html | 112 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/templates/result.html b/templates/result.html index 5397442..0b81c77 100644 --- a/templates/result.html +++ b/templates/result.html @@ -331,6 +331,34 @@ ${displayTopologyData(task.geometry_data)} + +
+
🎯 检测到的特征
+
+ ${displayFeaturesData(task)} +
+
+ +
+
💡 设计建议
+
+ ${displayRecommendationsData(task)} +
+
+ +
+
📈 质量指标
+
+ ${displayMetricsData(task)} +
+
+ +
+
🔍 分析信息
+
+ ${displayAnalysisInfo(task)} +
+
`; } @@ -464,6 +492,90 @@ `; } + function displayFeaturesData(task) { + if (task.analysis_result && task.analysis_result.detected_features) { + const features = task.analysis_result.detected_features; + if (features.length > 0) { + return features.map(feature => ` +
+
${feature.feature_type || '未知特征'}
+
置信度: ${(feature.confidence || 0).toFixed(2)}
+
+ `).join(''); + } else { + return '
无特征数据
'; + } + } else { + return '
无特征数据
'; + } + } + + function displayRecommendationsData(task) { + if (task.analysis_result && task.analysis_result.design_recommendations) { + const recommendations = task.analysis_result.design_recommendations; + if (recommendations.length > 0) { + return recommendations.map(rec => ` +
+
${rec.rec_type || '建议'}
+
优先级: ${rec.priority || '中'}
+
+ `).join(''); + } else { + return '
无建议数据
'; + } + } else { + return '
无建议数据
'; + } + } + + function displayMetricsData(task) { + if (task.analysis_result && task.analysis_result.quality_metrics) { + const metrics = task.analysis_result.quality_metrics; + return ` +
+
体积利用率
+
${(metrics.volume_utilization || 0).toFixed(2)}%
+
+
+
壁厚均匀性
+
${(metrics.wall_thickness_uniformity || 0).toFixed(2)}%
+
+
+
几何复杂度
+
${(metrics.geometric_complexity || 0).toFixed(2)}
+
+ `; + } else { + return '
无质量指标数据
'; + } + } + + function displayAnalysisInfo(task) { + let infoHTML = ''; + if (task.geometry_data) { + const geo = task.geometry_data; + infoHTML += ` +
+
分析时间
+
${task.upload_time || 'N/A'}
+
+
+
分析方法
+
${geo.analysis_method || 'N/A'}
+
+ `; + } + if (task.analysis_result) { + infoHTML += ` +
+
分析状态
+
${task.status || 'N/A'}
+
+ `; + } + return infoHTML || '
无分析信息
'; + } + // 工具函数 function getStatusText(status) { const statusMap = {