diff --git a/app.py b/app.py index 9d319f8..1f3807f 100644 --- a/app.py +++ b/app.py @@ -77,6 +77,7 @@ def compute_stats(): total_evening = 0 total_study = 0 calendar = {} + all_morning_items = [] # 收集所有立志项用于蓝图统计 for row in rows: d = row['date'] @@ -85,7 +86,17 @@ def compute_stats(): evening = data.get('evening', []) study = data.get('study', []) - morning_count = sum(1 for x in morning if isinstance(x, str) and x.strip()) + # 收集 morning items + for mi in morning: + if isinstance(mi, dict) and (mi.get('text', '') or '').strip(): + all_morning_items.append(mi) + elif isinstance(mi, str) and mi.strip(): + all_morning_items.append({'text': mi, 'pillar': ''}) + + morning_count = sum(1 for x in morning if ( + isinstance(x, str) and x.strip() or + isinstance(x, dict) and (x.get('text', '') or '').strip() + )) evening_count = sum(1 for x in evening if ( isinstance(x, str) and x.strip() or isinstance(x, dict) and (x.get('mistake', '') or '').strip() @@ -106,7 +117,8 @@ def compute_stats(): return dict( total_days=total_days, total_morning=total_morning, total_evening=total_evening, total_study=total_study, - calendar=calendar + calendar=calendar, + morning_items=all_morning_items ) diff --git a/static/app.js b/static/app.js index 8e5afc2..b066960 100644 --- a/static/app.js +++ b/static/app.js @@ -25,6 +25,16 @@ '知识库能力提升' ]; + /* 蓝图六板块 */ + var PILLARS = [ + {key:'medical_service', name:'医疗服务', emoji:'🥼'}, + {key:'pharma_mkt', name:'医药营销', emoji:'💊'}, + {key:'payment', name:'医疗支付', emoji:'🛡️'}, + {key:'ai', name:'AI 智能', emoji:'🤖'}, + {key:'governance', name:'公司治理', emoji:'🏛️'}, + {key:'self_cultivation', name:'个人修养', emoji:'🎯'} + ]; + /* ================================================================ Toast ================================================================ */ @@ -106,6 +116,7 @@ if (name === 'weekly') loadWeekly(); if (name === 'history') loadHistory(); if (name === 'wishes') loadWishes(); + if (name === 'blueprint') loadBlueprint(); }; /* ================================================================ @@ -231,7 +242,11 @@ var mEls = document.querySelectorAll('#morning-list .item-row input'); for (var i=0; i' + p.emoji + ' ' + p.name + ''; + }); var div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = '' + (idx+1) + '.' + - '' + + '' + + '' + ''; container.appendChild(div); renumberMorning(); @@ -983,6 +1010,27 @@ window.renderWishes = renderWishes; + /* ================================================================ + Blueprint — 蓝图六板块 + ================================================================ */ + + function loadBlueprint() { + apiGetStats(function(err, data) { + if (err || !data || !data.morning_items) return; + var counts = {}; + PILLARS.forEach(function(p){ counts[p.name] = 0; }); + var total = 0; + (data.morning_items || []).forEach(function(item){ + var name = (typeof item === 'string') ? '' : (item.pillar || ''); + if (counts[name] !== undefined) { counts[name]++; total++; } + }); + PILLARS.forEach(function(p){ + var el = document.getElementById('bp-count-' + p.name); + if (el) el.textContent = counts[p.name] + ' 条'; + }); + }); + } + /* ================================================================ Init ================================================================ */ diff --git a/static/style.css b/static/style.css index 92cabdb..8a14f0e 100644 --- a/static/style.css +++ b/static/style.css @@ -1423,3 +1423,60 @@ body { } .main-content { height: auto; overflow: visible; padding: 16px; } } + +/* ═══════════════════════════════════════════ + Blueprint Panel + ═══════════════════════════════════════════ */ + +.blueprint-mission { + font-size: 15px; + font-weight: 600; + color: var(--primary); + margin-bottom: 24px; + padding: 12px 16px; + background: var(--primary-light); + border-radius: var(--radius); + text-align: center; +} + +.blueprint-pillars { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16px; +} + +.blueprint-pillar { + background: var(--card); + border: 1.5px solid var(--border); + border-radius: var(--radius); + padding: 20px 16px; + text-align: center; + transition: border-color 0.2s, box-shadow 0.2s; +} +.blueprint-pillar:hover { + border-color: var(--primary); + box-shadow: 0 4px 16px rgba(74,108,247,0.08); +} + +.bp-icon { font-size: 32px; margin-bottom: 8px; } +.bp-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; } +.bp-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; } +.bp-count { font-size: 13px; font-weight: 600; color: var(--primary); } + +/* 立志板块选择器 */ +.morning-pillar { + padding: 4px 8px; + border: 1.5px solid var(--border); + border-radius: var(--radius-sm); + font-size: 11px; + font-family: inherit; + color: var(--text-dim); + background: var(--card); + min-width: 100px; + cursor: pointer; +} +.morning-pillar:hover { border-color: var(--primary); } + +@media (max-width: 900px) { + .blueprint-pillars { grid-template-columns: repeat(2, 1fr); } +} diff --git a/templates/index.html b/templates/index.html index 932f2bf..cc207df 100644 --- a/templates/index.html +++ b/templates/index.html @@ -107,6 +107,10 @@ 历史记录 + + + 蓝图 + @@ -269,6 +273,54 @@ + +
+
+

蓝图 · 数字医疗集团

+
+
+ 一辈子,干成一件事 — 用 AI 重构医疗全链路 +
+
+
+
🥼
+
医疗服务
+
诊疗能力 · 临床路径 · 医疗质量
+
+
+
+
💊
+
医药营销
+
科普 · 科研 · 学术会议 · 患者管理
+
+
+
+
🛡️
+
医疗支付
+
医保 · 商保 · 支付闭环
+
+
+
+
🤖
+
AI 智能
+
数字人 · 智能平台 · AI 赋能
+
+
+
+
🏛️
+
公司治理
+
组织 · 人才 · 制度 · 文化
+
+
+
+
🎯
+
个人修养
+
立志 · 责善 · 改过 · 勤学
+
+
+
+
+