feat(web+mp): AI 分析结果增强展示
Web 端 AiAnalysisList: - 分析结果 Markdown 风格渲染(标题/列表/粗体/代码) - 趋势分析类型显示统计方法提示 - 自动分析结果显示「系统自动分析」标签 小程序 ai-report/detail: - 新增 result_metadata 字段 - 自动分析标记(紫色标签) - 趋势分析统计方法说明卡片
This commit is contained in:
@@ -55,6 +55,9 @@ export default function AiReportDetail() {
|
||||
? markdownToHtml(analysis.result_content)
|
||||
: '<p>暂无分析结果</p>';
|
||||
|
||||
const isTrendAnalysis = analysis.analysis_type === 'trend';
|
||||
const isAutoAnalysis = (analysis.result_metadata as Record<string, unknown>)?.auto_analysis === true;
|
||||
|
||||
return (
|
||||
<View className='detail-page'>
|
||||
<View className='detail-card'>
|
||||
@@ -63,8 +66,21 @@ export default function AiReportDetail() {
|
||||
<Text className='meta-item'>模型: {analysis.model_used}</Text>
|
||||
<Text className='meta-item'>{new Date(analysis.created_at).toLocaleString('zh-CN')}</Text>
|
||||
</View>
|
||||
{isAutoAnalysis && (
|
||||
<View className='auto-badge'>
|
||||
<Text className='auto-badge-text'>系统自动分析</Text>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
{isTrendAnalysis && (
|
||||
<View className='trend-tip-card'>
|
||||
<Text className='trend-tip-text'>
|
||||
趋势分析基于最小二乘法线性回归和 2 倍标准差异常检测。R² 越接近 1 表示趋势拟合越好。斜率为正表示上升趋势,斜率为负表示下降趋势。
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
<View className='content-card'>
|
||||
<RichText className='report-content' nodes={htmlContent} />
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user