Files
hms/apps/miniprogram/src/components/ui/AiHealthSummaryCard/index.scss
iven 7e3d27ecf3 feat(ai): Phase 1A 收尾 — 用量记录 + 健康摘要端点 + 小程序组件
- chat_handler 添加 log_usage 精确记录 token 消耗(provider + model)
- SSE build_sse_stream 添加估算 token 用量记录(4 字符 ≈ 1 token)
- 新增 GET /ai/health-summary 端点聚合患者洞察+分析记录
- 小程序 AiHealthSummaryCard 组件(风险等级+洞察统计+摘要列表)
- 小程序 services/ai-analysis 新增 getHealthSummary API
2026-05-18 23:20:06 +08:00

101 lines
1.7 KiB
SCSS

.ai-summary-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;
}
.ai-summary-title {
font-size: var(--tk-font-size-body-lg, 18px);
font-weight: 600;
color: var(--tk-color-text, #333);
}
.ai-summary-risk {
padding: 4px 16px;
border-radius: 100px;
&-text {
font-size: var(--tk-font-size-cap, 13px);
color: #fff;
font-weight: 500;
}
}
.ai-summary-insight {
margin-bottom: 24px;
&-label {
font-size: var(--tk-font-size-cap, 13px);
color: var(--tk-color-text-secondary, #999);
display: block;
margin-bottom: 8px;
}
&-text {
font-size: var(--tk-font-size-body, 16px);
color: var(--tk-color-text, #333);
line-height: 1.5;
}
}
.ai-summary-stats {
display: flex;
gap: 40px;
margin-bottom: 24px;
}
.ai-summary-stat {
display: flex;
flex-direction: column;
align-items: center;
&-value {
font-size: 28px;
font-weight: 700;
color: var(--tk-color-primary, #1890ff);
}
&-label {
font-size: var(--tk-font-size-cap, 13px);
color: var(--tk-color-text-secondary, #999);
margin-top: 4px;
}
}
.ai-summary-items {
border-top: 1px solid var(--tk-color-border, #f0f0f0);
padding-top: 20px;
}
.ai-summary-item {
display: flex;
align-items: center;
gap: 16px;
padding: 12px 0;
&-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
&-title {
font-size: var(--tk-font-size-body-sm, 14px);
color: var(--tk-color-text, #333);
line-height: 1.4;
}
}
.ai-summary-loading {
display: flex;
justify-content: center;
padding: 32px 0;
&-text {
font-size: var(--tk-font-size-body-sm, 14px);
color: var(--tk-color-text-secondary, #999);
}
}