7 Commits
v1.4.3 ... main

Author SHA1 Message Date
mac
350c9fb877 v1.5.3 — 日历同步按日期自动填充
- 后端 api_calendar_sync_all 查询后自动去重保存到各日期 checkin
- 不再只填充当前选中的日期
- 弹窗显示已填充天数
2026-06-05 12:19:22 +08:00
mac
19ae81ae6e v1.5.2 — 责善显示改进方案
- 责善列表项追加 → 反思内容
- 红色标注区分改进方案
2026-06-04 17:46:44 +08:00
mac
535af35911 v1.5.1 — 蓝图重命名为人生蓝图,图标改为太阳 2026-06-04 16:49:27 +08:00
mac
fc338f426a v1.5.0 — 蓝图 VI 统一
- 移除头部 mission 文字和六板块卡片
- Tab 改用 SVG 图标(bolt/放大镜/书本/列表)
- 板块用彩色圆点标识(六色 VI)
- 整体风格对齐天机阁设计系统
2026-06-04 16:43:08 +08:00
mac
5300ee426d v1.4.6 — 备注左对齐 2026-06-04 16:39:58 +08:00
mac
8ac6f1af6b v1.4.5 — 蓝图去统计数+勤学显示备注
- 六板块卡片移除统计数字,仅保留 emoji+名称
- 勤学项在列表中显示备注 note
2026-06-04 16:38:54 +08:00
mac
8c81fae334 v1.4.4 — 蓝图改为 Tab 筛选+明细列表
- 顶栏六板块卡片只显示统计数
- 新增立志/责善/勤学/全部四个 Tab
- 明细列表显示每条记录的板块+类型+内容
- 类型标签颜色区分(立志黄/责善红/勤学绿)
2026-06-04 16:19:50 +08:00
4 changed files with 198 additions and 116 deletions

33
app.py
View File

@@ -137,6 +137,7 @@ def compute_stats():
all_study_items.append({
'name': name.strip(),
'done': si.get('done', False) if isinstance(si, dict) else False,
'note': si.get('note', '') if isinstance(si, dict) else '',
'pillar': pillar
})
@@ -397,18 +398,46 @@ def api_calendar_sync():
@app.route('/api/calendar-sync-all', methods=['GET'])
@login_required
def api_calendar_sync_all():
"""批量查询过去15天~未来15天的钉钉日程按日期分组返回"""
"""批量查询过去15天~未来15天的钉钉日程按日期分组返回,并自动填充到对应日期的 checkin"""
import json as _json
from datetime import datetime, timedelta
today = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
results = []
saved_days = 0
for delta in range(-15, 16):
d = today + timedelta(days=delta)
ds = d.strftime('%Y-%m-%d')
events = _fetch_dingtalk_events(ds)
if events:
results.append({'date': ds, 'events': events})
return jsonify({'ok': True, 'data': results})
# 自动去重填充到对应日期的 checkin
existing = get_checkin(ds)
data = existing['data'] if existing else {'morning': [], 'evening': [], 'study': []}
morning = data.get('morning', [])
existing_texts = set()
for mi in morning:
t = mi if isinstance(mi, str) else mi.get('text', '')
if t.strip():
existing_texts.add(t.strip())
added = False
for evt in events:
summary = (evt.get('summary') or '').strip()
if not summary:
continue
text = f"{evt['time']}{summary}" if evt.get('time') else summary
loc = evt.get('location', '')
if loc:
text += f" @{loc}"
text = text.strip()
if text not in existing_texts:
morning.append(text)
existing_texts.add(text)
added = True
if added:
data['morning'] = morning
save_checkin(ds, data)
saved_days += 1
return jsonify({'ok': True, 'data': results, 'saved_days': saved_days})
# ── 启动 ──────────────────────────────────────────────

View File

@@ -410,7 +410,7 @@
var totalDays = data.length;
var totalEvents = 0;
data.forEach(function(d){ totalEvents += d.events.length; });
summary.innerHTML = '同步完成!共 <b>' + totalDays + '</b> 天有日程,合计 <b>' + totalEvents + '</b> 个会议';
summary.innerHTML = '同步完成!共 <b>' + totalDays + '</b> 天有日程,合计 <b>' + totalEvents + '</b> 个会议' + (res.saved_days ? ',已自动填充 <b>' + res.saved_days + '</b> 天' : '');
// 渲染结果列表
var html = '';
@@ -1009,34 +1009,82 @@
Blueprint — 蓝图六板块
================================================================ */
var blueprintData = null;
var blueprintFilter = 'all';
function loadBlueprint() {
apiGetStats(function(err, data) {
if (err || !data || !data.pillar_breakdown) return;
var pb = data.pillar_breakdown;
PILLARS.forEach(function(p){
var el = document.getElementById('bp-count-' + p.name);
var info = pb[p.name] || {};
var m = info.morning || 0, e = info.evening || 0, s = info.study || 0;
if (el) el.textContent = '立志' + m + ' · 责善' + e + ' · 勤学' + s;
// 显示详情列表
var detailEl = document.getElementById('bp-detail-' + p.name);
if (detailEl) {
var html = '';
(info.morning_items || []).forEach(function(mi){
html += '<div class="bp-item" data-type="morning">🥼 ' + esc(mi.text) + '</div>';
});
(info.evening_items || []).forEach(function(ei){
html += '<div class="bp-item" data-type="evening">🔍 ' + esc(ei.mistake || ei.improvement) + '</div>';
});
(info.study_items || []).forEach(function(si){
html += '<div class="bp-item" data-type="study">📚 ' + esc(si.name) + '</div>';
});
detailEl.innerHTML = html || '<div class="bp-empty">暂无记录</div>';
}
});
blueprintData = data.pillar_breakdown;
renderBlueprintList();
});
}
function renderBlueprintPillars(pb) {
var container = document.getElementById('blueprint-pillars');
if (!container) return;
var html = '';
PILLARS.forEach(function(p){
html += '<div class="blueprint-pillar" data-pillar="' + p.name + '">' +
'<div class="bp-icon">' + p.emoji + '</div>' +
'<div class="bp-name">' + p.name + '</div>' +
'</div>';
});
container.innerHTML = html;
}
function renderBlueprintList() {
var list = document.getElementById('bp-list');
var empty = document.getElementById('bp-list-empty');
if (!list || !blueprintData) return;
var items = [];
PILLARS.forEach(function(p){
var info = blueprintData[p.name] || {};
if (blueprintFilter === 'all' || blueprintFilter === 'morning') {
(info.morning_items || []).forEach(function(mi){ items.push({pillar: p, text: mi.text, type: 'morning'}); });
}
if (blueprintFilter === 'all' || blueprintFilter === 'evening') {
(info.evening_items || []).forEach(function(ei){ items.push({pillar: p, text: ei.mistake || ei.improvement, improvement: ei.improvement, type: 'evening'}); });
}
if (blueprintFilter === 'all' || blueprintFilter === 'study') {
(info.study_items || []).forEach(function(si){ items.push({pillar: p, text: si.name, type: 'study', done: si.done, note: si.note}); });
}
});
if (items.length === 0) {
list.innerHTML = '';
if (empty) empty.style.display = 'block';
return;
}
if (empty) empty.style.display = 'none';
var typeLabels = {morning: '立志', evening: '责善', study: '勤学'};
var pillarColors = {
'医疗服务': '#4A6CF7', '医药营销': '#D97706', '医疗支付': '#059669',
'AI 智能': '#7C3AED', '公司治理': '#DC2626', '个人修养': '#0891B2'
};
var html = '';
items.forEach(function(item){
var dot = '<span class="bp-pillar-dot" style="background:' + (pillarColors[item.pillar.name] || '#94A3B8') + '"></span>';
var extra = '';
if (item.type === 'study' && item.note) extra = '<span class="bp-item-note">' + esc(item.note) + '</span>';
if (item.type === 'evening' && item.improvement) extra = '<span class="bp-item-note evening">→ ' + esc(item.improvement) + '</span>';
html += '<div class="bp-list-item">' +
dot +
'<span class="bp-item-pillar">' + item.pillar.name + '</span>' +
'<span class="bp-item-type ' + item.type + '">' + (typeLabels[item.type] || item.type) + '</span>' +
'<span class="bp-item-text">' + esc(item.text) + '</span>' +
extra +
'</div>';
});
list.innerHTML = html;
}
window.filterBlueprint = function(btn) {
blueprintFilter = btn.dataset.filter;
document.querySelectorAll('.bp-tab').forEach(function(t){ t.classList.remove('active'); });
btn.classList.add('active');
renderBlueprintList();
};
/* ================================================================
Init
================================================================ */

View File

@@ -1428,59 +1428,93 @@ body {
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;
/* Tab 筛选 */
.bp-tabs {
display: flex;
gap: 4px;
margin-bottom: 20px;
border-bottom: 1.5px solid var(--border);
padding-bottom: 0;
}
.blueprint-pillars {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
.bp-tab {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 8px 16px;
border: none;
background: none;
font-size: 13px;
font-weight: 500;
color: var(--text-dim);
cursor: pointer;
border-bottom: 2px solid transparent;
margin-bottom: -1.5px;
transition: all 0.15s;
font-family: inherit;
}
.bp-tab .icon-sm { opacity: 0.6; }
.bp-tab:hover { color: var(--text); }
.bp-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.bp-tab.active .icon-sm { opacity: 1; }
.blueprint-pillar {
/* 明细列表 */
.bp-list {
display: flex;
flex-direction: column;
gap: 1px;
}
.bp-list-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
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;
border-bottom: 0.5px solid var(--border);
transition: background 0.15s;
}
.blueprint-pillar:hover {
border-color: var(--primary);
box-shadow: 0 4px 16px rgba(74,108,247,0.08);
.bp-list-item:hover { background: var(--bg); }
.bp-pillar-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.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); }
.bp-detail {
margin-top: 10px;
text-align: left;
font-size: 11px;
max-height: 120px;
overflow-y: auto;
border-top: 1px solid var(--border);
padding-top: 8px;
}
.bp-item {
padding: 2px 0;
.bp-item-pillar {
font-size: 12px;
color: var(--text-dim);
white-space: nowrap;
}
.bp-item-type {
font-size: 11px;
font-weight: 600;
padding: 2px 8px;
border-radius: 8px;
white-space: nowrap;
}
.bp-item-type.morning { background: var(--warning-light); color: #D97706; }
.bp-item-type.evening { background: var(--danger-light); color: var(--danger); }
.bp-item-type.study { background: var(--success-light); color: var(--success); }
.bp-item-text {
font-size: 13px;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bp-item-note {
font-size: 11px;
color: var(--text-muted);
margin-left: 4px;
white-space: nowrap;
}
.bp-item-note.evening { color: var(--danger); }
.bp-list-empty {
font-size: 13px;
color: var(--text-muted);
text-align: center;
padding: 32px 0;
}
.bp-empty { color: var(--text-muted); text-align: center; padding: 6px 0; }
@media (max-width: 900px) {
.blueprint-pillars { grid-template-columns: repeat(2, 1fr); }
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
}

View File

@@ -108,8 +108,8 @@
历史记录
</a>
<a class="nav-item" data-panel="blueprint" onclick="switchPanel('blueprint')">
<svg class="icon-sm"><use href="#icon-star"/></svg>
蓝图
<svg class="icon-sm"><use href="#icon-sun"/></svg>
人生蓝图
</a>
</nav>
@@ -276,55 +276,26 @@
<!-- ── 蓝图面板 ── -->
<section class="panel" id="panel-blueprint">
<div class="panel-header">
<h2>蓝图 · 数字医疗集团</h2>
<h2>人生蓝图</h2>
</div>
<div class="blueprint-mission">
一辈子,干成一件事 — 用 AI 重构医疗全链路
</div>
<div class="blueprint-pillars" id="blueprint-pillars">
<div class="blueprint-pillar" data-pillar="医疗服务">
<div class="bp-icon">🥼</div>
<div class="bp-name">医疗服务</div>
<div class="bp-desc">诊疗能力 · 临床路径 · 医疗质量</div>
<div class="bp-count" id="bp-count-医疗服务"></div>
<div class="bp-detail" id="bp-detail-医疗服务"></div>
</div>
<div class="blueprint-pillar" data-pillar="医药营销">
<div class="bp-icon">💊</div>
<div class="bp-name">医药营销</div>
<div class="bp-desc">科普 · 科研 · 学术会议 · 患者管理</div>
<div class="bp-count" id="bp-count-医药营销"></div>
<div class="bp-detail" id="bp-detail-医药营销"></div>
</div>
<div class="blueprint-pillar" data-pillar="医疗支付">
<div class="bp-icon">🛡️</div>
<div class="bp-name">医疗支付</div>
<div class="bp-desc">医保 · 商保 · 支付闭环</div>
<div class="bp-count" id="bp-count-医疗支付"></div>
<div class="bp-detail" id="bp-detail-医疗支付"></div>
</div>
<div class="blueprint-pillar" data-pillar="AI 智能">
<div class="bp-icon">🤖</div>
<div class="bp-name">AI 智能</div>
<div class="bp-desc">数字人 · 智能平台 · AI 赋能</div>
<div class="bp-count" id="bp-count-AI 智能"></div>
<div class="bp-detail" id="bp-detail-AI 智能"></div>
</div>
<div class="blueprint-pillar" data-pillar="公司治理">
<div class="bp-icon">🏛️</div>
<div class="bp-name">公司治理</div>
<div class="bp-desc">组织 · 人才 · 制度 · 文化</div>
<div class="bp-count" id="bp-count-公司治理"></div>
<div class="bp-detail" id="bp-detail-公司治理"></div>
</div>
<div class="blueprint-pillar" data-pillar="个人修养">
<div class="bp-icon">🎯</div>
<div class="bp-name">个人修养</div>
<div class="bp-desc">立志 · 责善 · 改过 · 勤学</div>
<div class="bp-count" id="bp-count-个人修养"></div>
<div class="bp-detail" id="bp-detail-个人修养"></div>
</div>
<!-- Tab 筛选 -->
<div class="bp-tabs">
<button class="bp-tab active" data-filter="all" onclick="filterBlueprint(this)">
<svg class="icon-sm"><use href="#icon-list-bullet"/></svg> 全部
</button>
<button class="bp-tab" data-filter="morning" onclick="filterBlueprint(this)">
<svg class="icon-sm"><use href="#icon-bolt"/></svg> 立志
</button>
<button class="bp-tab" data-filter="evening" onclick="filterBlueprint(this)">
<svg class="icon-sm"><use href="#icon-magnifying-glass"/></svg> 责善
</button>
<button class="bp-tab" data-filter="study" onclick="filterBlueprint(this)">
<svg class="icon-sm"><use href="#icon-book-open"/></svg> 勤学
</button>
</div>
<!-- 明细列表 -->
<div class="bp-list" id="bp-list"></div>
<div class="bp-list-empty" id="bp-list-empty" style="display:none">暂无记录</div>
</section>
</main>