Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
350c9fb877 | ||
|
|
19ae81ae6e | ||
|
|
535af35911 | ||
|
|
fc338f426a | ||
|
|
5300ee426d | ||
|
|
8ac6f1af6b | ||
|
|
8c81fae334 | ||
|
|
67505414d9 | ||
|
|
03745e19c3 | ||
|
|
be9f10e968 | ||
|
|
6e1b793b40 | ||
|
|
e90e8c30ff | ||
|
|
046f144896 | ||
|
|
ba592c07b7 | ||
|
|
105d62f8db | ||
|
|
c3dba63870 | ||
|
|
f015b72ad8 | ||
|
|
bb07d320f2 | ||
|
|
46862e5110 | ||
|
|
7b4134a72c | ||
|
|
13a0e12b34 | ||
|
|
1ea81b3086 | ||
|
|
bafac0bc12 |
223
app.py
223
app.py
@@ -77,6 +77,30 @@ def compute_stats():
|
||||
total_evening = 0
|
||||
total_study = 0
|
||||
calendar = {}
|
||||
all_morning_items = []
|
||||
all_evening_items = []
|
||||
all_study_items = []
|
||||
|
||||
# 关键词 → 板块 自动归类规则
|
||||
PILLAR_KEYWORDS = {
|
||||
'医药营销': ['科普','科研','学术会议','学术','会议','患者管理','临床推广','临床','药企','处方','KOL','代表','拜访','荣昌','恒瑞','信达','鲁银','OPC','项目','标杆','客户'],
|
||||
'医疗服务': ['诊疗','治疗','医生','医院','科室','手术','门诊','患者','病','护理','诊断','影像','检验'],
|
||||
'医疗支付': ['医保','商保','理赔','支付','保险','费用','报销','商业保险','保单'],
|
||||
'AI 智能': ['AI','数字人','智能','算法','自动化','平台','系统','网站','开发','代码','程序','模型'],
|
||||
'公司治理': ['团队','组织','管理','招聘','HR','制度','流程','财务','考核','KPI','规划','人才','架构','预算'],
|
||||
'个人修养': ['早起','睡觉','俯卧撑','运动','冥想','阅读','复盘','写作','习惯','修身','立志','责善','改过','勤学'],
|
||||
}
|
||||
|
||||
def classify_auto(text):
|
||||
"""根据文本内容自动归类"""
|
||||
if not text or not text.strip():
|
||||
return ''
|
||||
text_lower = text.strip()
|
||||
for pillar, keywords in PILLAR_KEYWORDS.items():
|
||||
for kw in keywords:
|
||||
if kw in text_lower:
|
||||
return pillar
|
||||
return '' # 未匹配
|
||||
|
||||
for row in rows:
|
||||
d = row['date']
|
||||
@@ -85,7 +109,42 @@ 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())
|
||||
# 收集并自动归类
|
||||
for mi in morning:
|
||||
text = mi if isinstance(mi, str) else mi.get('text', '')
|
||||
if isinstance(text, str) and text.strip():
|
||||
auto_pillar = mi.get('pillar', '') if isinstance(mi, dict) else ''
|
||||
if not auto_pillar:
|
||||
auto_pillar = classify_auto(text)
|
||||
all_morning_items.append({'text': text.strip(), 'pillar': auto_pillar})
|
||||
|
||||
for ei in evening:
|
||||
if isinstance(ei, dict):
|
||||
m = (ei.get('mistake') or '').strip()
|
||||
imp = (ei.get('improvement') or '').strip()
|
||||
if m or imp:
|
||||
pillar = ei.get('pillar', '') or classify_auto(m + ' ' + imp)
|
||||
all_evening_items.append({'mistake': m, 'improvement': imp, 'pillar': pillar})
|
||||
elif isinstance(ei, str) and ei.strip():
|
||||
all_evening_items.append({'mistake': ei.strip(), 'improvement': '', 'pillar': classify_auto(ei)})
|
||||
|
||||
for si in study:
|
||||
name = si.get('name', '') if isinstance(si, dict) else str(si)
|
||||
if name.strip():
|
||||
pillar = si.get('pillar', '') if isinstance(si, dict) else ''
|
||||
if not pillar:
|
||||
pillar = classify_auto(name)
|
||||
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
|
||||
})
|
||||
|
||||
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()
|
||||
@@ -103,10 +162,38 @@ def compute_stats():
|
||||
# day_score = 60 + extra * 5 (不在此处使用,仅用于日历状态)
|
||||
calendar[d] = 'pass' if all_three else 'fail'
|
||||
|
||||
# 构建板块统计
|
||||
pillars = ['医疗服务','医药营销','医疗支付','AI 智能','公司治理','个人修养']
|
||||
pillar_breakdown = {}
|
||||
for p in pillars:
|
||||
pillar_breakdown[p] = {
|
||||
'morning': 0, 'evening': 0, 'study': 0,
|
||||
'morning_items': [], 'evening_items': [], 'study_items': []
|
||||
}
|
||||
for mi in all_morning_items:
|
||||
p = mi['pillar']
|
||||
if p in pillar_breakdown:
|
||||
pillar_breakdown[p]['morning'] += 1
|
||||
pillar_breakdown[p]['morning_items'].append(mi)
|
||||
for ei in all_evening_items:
|
||||
p = ei['pillar']
|
||||
if p in pillar_breakdown:
|
||||
pillar_breakdown[p]['evening'] += 1
|
||||
pillar_breakdown[p]['evening_items'].append(ei)
|
||||
for si in all_study_items:
|
||||
p = si['pillar']
|
||||
if p in pillar_breakdown:
|
||||
pillar_breakdown[p]['study'] += 1
|
||||
pillar_breakdown[p]['study_items'].append(si)
|
||||
|
||||
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,
|
||||
evening_items=all_evening_items,
|
||||
study_items=all_study_items,
|
||||
pillar_breakdown=pillar_breakdown
|
||||
)
|
||||
|
||||
|
||||
@@ -193,9 +280,9 @@ def api_create_wish():
|
||||
name = body.get('name', '').strip()
|
||||
if not name:
|
||||
return jsonify({'ok': False, 'error': '名称不能为空'}), 400
|
||||
priority = body.get('priority', '中')
|
||||
quadrant = body.get('quadrant', '重要不紧急')
|
||||
deadline = body.get('deadline', '')
|
||||
wid = save_wish(name, priority, deadline)
|
||||
wid = save_wish(name, quadrant, deadline)
|
||||
return jsonify({'ok': True, 'id': wid})
|
||||
|
||||
|
||||
@@ -225,6 +312,134 @@ def api_reorder_wishes():
|
||||
return jsonify({'ok': True})
|
||||
|
||||
|
||||
# ── 日历同步 API ────────────────────────────
|
||||
|
||||
CALENDAR_CACHE = os.path.join(os.path.expanduser('~'), '.workbuddy', 'data', 'ziwei-power', 'calendar_cache.json')
|
||||
DING_MCP_URL = 'https://mcp-gw.dingtalk.com/server/95959163f85d8b58a167f65cd8bd3d22690b16c75ebacd0fa095016396a10e0d?key=0993e4d4e44c50ea25a0db840cc5815e'
|
||||
|
||||
|
||||
def _fetch_dingtalk_events(date_str):
|
||||
"""调用钉钉 MCP 实时查询指定日期的日程"""
|
||||
import json as _json, urllib.request as _ur
|
||||
from datetime import datetime, timezone, timedelta
|
||||
tz = timezone(timedelta(hours=8))
|
||||
try:
|
||||
d = datetime.strptime(date_str, '%Y-%m-%d').replace(tzinfo=tz)
|
||||
except ValueError:
|
||||
return []
|
||||
start_ts = int(d.replace(hour=0, minute=0, second=0).timestamp() * 1000)
|
||||
end_ts = int(d.replace(hour=23, minute=59, second=59).timestamp() * 1000)
|
||||
body = _json.dumps({
|
||||
'jsonrpc': '2.0', 'method': 'tools/call', 'id': 1,
|
||||
'params': {'name': 'list_calendar_events', 'arguments': {
|
||||
'calendarId': 'primary', 'startTime': start_ts, 'endTime': end_ts, 'limit': 20
|
||||
}}
|
||||
}).encode('utf-8')
|
||||
req = _ur.Request(DING_MCP_URL, data=body, headers={
|
||||
'Content-Type': 'application/json', 'Accept': 'application/json'
|
||||
})
|
||||
try:
|
||||
with _ur.urlopen(req, timeout=10) as resp:
|
||||
data = _json.loads(resp.read())
|
||||
events = data.get('result', {}).get('structuredContent', {}).get('result', {}).get('events', [])
|
||||
except Exception:
|
||||
return None # 网络错误返回 None,调用方回退缓存
|
||||
results = []
|
||||
for e in events:
|
||||
summary = (e.get('summary') or '').strip()
|
||||
if not summary:
|
||||
continue
|
||||
start = e.get('start', {}).get('dateTime', '')
|
||||
end = e.get('end', {}).get('dateTime', '')
|
||||
time_str = ''
|
||||
if start and end:
|
||||
time_str = start[11:16] + '-' + end[11:16]
|
||||
results.append({
|
||||
'date': date_str, 'summary': summary,
|
||||
'time': time_str, 'location': e.get('location') or ''
|
||||
})
|
||||
# 写入缓存
|
||||
try:
|
||||
all_cached = []
|
||||
try:
|
||||
with open(CALENDAR_CACHE, 'r') as f:
|
||||
all_cached = _json.load(f)
|
||||
except (FileNotFoundError, _json.JSONDecodeError):
|
||||
pass
|
||||
# 替换同一天的旧缓存
|
||||
all_cached = [c for c in all_cached if c.get('date') != date_str] + results
|
||||
with open(CALENDAR_CACHE, 'w') as f:
|
||||
_json.dump(all_cached, f, ensure_ascii=False, indent=2)
|
||||
except Exception:
|
||||
pass
|
||||
return results
|
||||
|
||||
|
||||
@app.route('/api/calendar-sync', methods=['GET'])
|
||||
@login_required
|
||||
def api_calendar_sync():
|
||||
import json as _json
|
||||
date = request.args.get('date', '')
|
||||
if not date:
|
||||
return jsonify({'ok': False, 'error': '缺少 date 参数'}), 400
|
||||
# 优先实时查询钉钉 MCP
|
||||
events = _fetch_dingtalk_events(date)
|
||||
if events is None:
|
||||
# MCP 不可用,回退缓存
|
||||
try:
|
||||
with open(CALENDAR_CACHE, 'r') as f:
|
||||
all_cached = _json.load(f)
|
||||
events = [e for e in all_cached if e.get('date') == date]
|
||||
except (FileNotFoundError, _json.JSONDecodeError):
|
||||
events = []
|
||||
return jsonify({'ok': True, 'data': events})
|
||||
|
||||
|
||||
@app.route('/api/calendar-sync-all', methods=['GET'])
|
||||
@login_required
|
||||
def api_calendar_sync_all():
|
||||
"""批量查询过去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})
|
||||
# 自动去重填充到对应日期的 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})
|
||||
|
||||
|
||||
# ── 启动 ──────────────────────────────────────────────
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
15
database.py
15
database.py
@@ -11,7 +11,7 @@ os.makedirs(DB_DIR, exist_ok=True)
|
||||
DB_PATH = os.path.join(DB_DIR, 'ziwei_power.db')
|
||||
|
||||
# 当前数据库 schema 版本 —— 改表结构时必须 +1 并补迁移逻辑
|
||||
CURRENT_SCHEMA_VERSION = 2
|
||||
CURRENT_SCHEMA_VERSION = 3
|
||||
|
||||
|
||||
def get_conn():
|
||||
@@ -69,6 +69,11 @@ def init_db():
|
||||
)
|
||||
''')
|
||||
|
||||
if current < 3:
|
||||
# v3: 优先级改为四象限
|
||||
conn.execute("ALTER TABLE wishes ADD COLUMN quadrant TEXT NOT NULL DEFAULT '重要不紧急'")
|
||||
conn.execute("UPDATE wishes SET quadrant = CASE priority WHEN '高' THEN '重要紧急' WHEN '中' THEN '重要不紧急' WHEN '低' THEN '不紧急不重要' ELSE '重要不紧急' END WHERE quadrant = '重要不紧急'")
|
||||
|
||||
# ── 将来加字段/改表在此扩展 ──
|
||||
# if current < 2:
|
||||
# conn.execute('ALTER TABLE checkins ADD COLUMN tags TEXT DEFAULT ""')
|
||||
@@ -152,14 +157,14 @@ def get_wishes():
|
||||
return [dict(row) for row in rows]
|
||||
|
||||
|
||||
def save_wish(name, priority, deadline):
|
||||
def save_wish(name, quadrant, deadline):
|
||||
"""新增一条心愿"""
|
||||
now = datetime.now().isoformat()
|
||||
conn = get_conn()
|
||||
max_order = conn.execute('SELECT COALESCE(MAX(sort_order), -1) + 1 AS n FROM wishes').fetchone()['n']
|
||||
conn.execute(
|
||||
'INSERT INTO wishes (name, priority, deadline, done, sort_order, created_at) VALUES (?, ?, ?, 0, ?, ?)',
|
||||
(name, priority, deadline, max_order, now)
|
||||
'INSERT INTO wishes (name, quadrant, deadline, done, sort_order, created_at) VALUES (?, ?, ?, 0, ?, ?)',
|
||||
(name, quadrant, deadline, max_order, now)
|
||||
)
|
||||
conn.commit()
|
||||
wish_id = conn.execute('SELECT last_insert_rowid()').fetchone()[0]
|
||||
@@ -169,7 +174,7 @@ def save_wish(name, priority, deadline):
|
||||
|
||||
def update_wish(wish_id, **kwargs):
|
||||
"""更新心愿字段"""
|
||||
allowed = ['name', 'priority', 'deadline', 'done']
|
||||
allowed = ['name', 'quadrant', 'deadline', 'done']
|
||||
updates = {k: v for k, v in kwargs.items() if k in allowed}
|
||||
if not updates:
|
||||
return
|
||||
|
||||
417
static/app.js
417
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
|
||||
================================================================ */
|
||||
@@ -76,7 +86,7 @@
|
||||
function apiGetStats(cb) {
|
||||
fetch('/api/stats')
|
||||
.then(function(r){ return r.json(); })
|
||||
.then(function(res){ if (res.ok) cb(null, res.data); else cb(res.error); })
|
||||
.then(function(res){ if (res.ok) cb(null, res); else cb(res.error); })
|
||||
.catch(function(e){ cb(e.message); });
|
||||
}
|
||||
|
||||
@@ -106,6 +116,7 @@
|
||||
if (name === 'weekly') loadWeekly();
|
||||
if (name === 'history') loadHistory();
|
||||
if (name === 'wishes') loadWishes();
|
||||
if (name === 'blueprint') loadBlueprint();
|
||||
};
|
||||
|
||||
/* ================================================================
|
||||
@@ -237,9 +248,9 @@
|
||||
var eveningItems = [];
|
||||
var eRows = document.querySelectorAll('#evening-list .evening-row');
|
||||
for (var j=0; j<eRows.length; j++) {
|
||||
var cols = eRows[j].querySelectorAll('.col input');
|
||||
var mistake = cols[0] ? cols[0].value.trim() : '';
|
||||
var improve = cols[1] ? cols[1].value.trim() : '';
|
||||
var inputs = eRows[j].querySelectorAll('input[type="text"]');
|
||||
var mistake = inputs[0] ? inputs[0].value.trim() : '';
|
||||
var improve = inputs[1] ? inputs[1].value.trim() : '';
|
||||
if (mistake || improve) eveningItems.push({ mistake: mistake, improvement: improve });
|
||||
}
|
||||
|
||||
@@ -269,7 +280,10 @@
|
||||
// 早间立志
|
||||
document.getElementById('morning-list').innerHTML = '';
|
||||
if (morning.length === 0) morning = [''];
|
||||
for (var m=0; m<morning.length; m++) addMorningRow(morning[m]);
|
||||
for (var m=0; m<morning.length; m++) {
|
||||
var txt = typeof morning[m] === 'string' ? morning[m] : (morning[m].text || '');
|
||||
addMorningRow(txt);
|
||||
}
|
||||
|
||||
// 责善改过
|
||||
document.getElementById('evening-list').innerHTML = '';
|
||||
@@ -299,11 +313,12 @@
|
||||
function addMorningRow(val) {
|
||||
var container = document.getElementById('morning-list');
|
||||
var idx = container.children.length;
|
||||
val = val || '';
|
||||
var text = typeof val === 'string' ? val : (val && val.text ? val.text : '');
|
||||
text = text || '';
|
||||
var div = document.createElement('div');
|
||||
div.className = 'item-row';
|
||||
div.innerHTML = '<span class="idx">' + (idx+1) + '.</span>' +
|
||||
'<input type="text" value="' + esc(val) + '" placeholder="今天最重要的一件事…">' +
|
||||
'<input type="text" value="' + esc(text) + '" placeholder="今天最重要的一件事…">' +
|
||||
'<button class="btn-del" onclick="this.parentElement.remove();renumberMorning()"><svg class="icon-sm"><use href="#icon-x"/></svg></button>';
|
||||
container.appendChild(div);
|
||||
renumberMorning();
|
||||
@@ -319,30 +334,15 @@
|
||||
|
||||
function addEveningRow(mistake, improve) {
|
||||
var container = document.getElementById('evening-list');
|
||||
var idx = container.children.length;
|
||||
mistake = mistake || '';
|
||||
improve = improve || '';
|
||||
var div = document.createElement('div');
|
||||
div.className = 'evening-row';
|
||||
div.innerHTML =
|
||||
'<div class="evening-header">' +
|
||||
'<span class="idx">' + (idx+1) + '.</span>' +
|
||||
'<button class="btn-del" onclick="this.parentElement.parentElement.remove();renumberEvening()"><svg class="icon-sm"><use href="#icon-x"/></svg></button>' +
|
||||
'</div>' +
|
||||
'<div class="mistake-row">' +
|
||||
'<div class="col"><label>错误</label><input type="text" value="' + esc(mistake) + '" placeholder="今天犯的错…"></div>' +
|
||||
'<div class="col"><label>改进方案</label><input type="text" value="' + esc(improve) + '" placeholder="下次怎么做…"></div>' +
|
||||
'</div>';
|
||||
'<button class="btn-del" onclick="this.parentElement.remove()"><svg class="icon-sm"><use href="#icon-x"/></svg></button>' +
|
||||
'<input type="text" value="' + esc(mistake) + '" placeholder="犯的错误…">' +
|
||||
'<input type="text" value="' + esc(improve) + '" placeholder="改进方案…">';
|
||||
container.appendChild(div);
|
||||
renumberEvening();
|
||||
}
|
||||
|
||||
function renumberEvening() {
|
||||
var rows = document.querySelectorAll('#evening-list .evening-row');
|
||||
for (var i=0; i<rows.length; i++) {
|
||||
var span = rows[i].querySelector('.idx');
|
||||
if (span) span.textContent = (i+1) + '.';
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 勤学预设项目 ── */
|
||||
@@ -377,6 +377,97 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ── 日历同步 ── */
|
||||
|
||||
window.syncCalendar = function() {
|
||||
var overlay = document.getElementById('sync-modal-overlay');
|
||||
var loading = document.getElementById('sync-loading');
|
||||
var resultsEl = document.getElementById('sync-results');
|
||||
var summary = document.getElementById('sync-summary');
|
||||
var list = document.getElementById('sync-list');
|
||||
var btn = document.querySelector('.btn-cal-sync');
|
||||
if (!overlay) return;
|
||||
|
||||
// 打开弹窗,显示加载中
|
||||
overlay.style.display = 'flex';
|
||||
loading.style.display = 'block';
|
||||
resultsEl.style.display = 'none';
|
||||
if (btn) { btn.style.opacity = '0.5'; btn.disabled = true; }
|
||||
|
||||
fetch('/api/calendar-sync-all')
|
||||
.then(function(r){ return r.json(); })
|
||||
.then(function(res){
|
||||
loading.style.display = 'none';
|
||||
resultsEl.style.display = 'block';
|
||||
if (btn) { btn.style.opacity = '1'; btn.disabled = false; }
|
||||
if (!res.ok) { summary.innerHTML = '<span style="color:var(--danger)">同步失败: ' + (res.error || '未知错误') + '</span>'; return; }
|
||||
var data = res.data || [];
|
||||
if (data.length === 0) {
|
||||
summary.innerHTML = '未查询到任何日程';
|
||||
return;
|
||||
}
|
||||
// 统计
|
||||
var totalDays = data.length;
|
||||
var totalEvents = 0;
|
||||
data.forEach(function(d){ totalEvents += d.events.length; });
|
||||
summary.innerHTML = '同步完成!共 <b>' + totalDays + '</b> 天有日程,合计 <b>' + totalEvents + '</b> 个会议' + (res.saved_days ? ',已自动填充 <b>' + res.saved_days + '</b> 天' : '');
|
||||
|
||||
// 渲染结果列表
|
||||
var html = '';
|
||||
data.forEach(function(day) {
|
||||
html += '<div class="sync-day">';
|
||||
html += '<div class="sync-day-header"><span>' + day.date + '</span></div>';
|
||||
day.events.forEach(function(e) {
|
||||
var timeStr = e.time ? ' (' + e.time + ')' : '';
|
||||
html += '<div class="sync-event">' +
|
||||
'<span class="sync-event-icon">📌</span>' +
|
||||
'<span class="sync-event-text">' + esc(e.summary) + '<span class="sync-event-time">' + esc(timeStr) + '</span></span>' +
|
||||
'</div>';
|
||||
});
|
||||
html += '</div>';
|
||||
});
|
||||
list.innerHTML = html;
|
||||
|
||||
// 自动填充今天到选中日期的日程
|
||||
autoFillTodayEvents(data);
|
||||
})
|
||||
.catch(function(){
|
||||
loading.style.display = 'none';
|
||||
resultsEl.style.display = 'block';
|
||||
summary.innerHTML = '<span style="color:var(--danger)">网络错误,请重试</span>';
|
||||
if (btn) { btn.style.opacity = '1'; btn.disabled = false; }
|
||||
});
|
||||
};
|
||||
|
||||
function autoFillTodayEvents(data) {
|
||||
var todayDate = document.getElementById('check-date').value;
|
||||
var added = 0;
|
||||
data.forEach(function(day) {
|
||||
if (day.date !== todayDate) return;
|
||||
day.events.forEach(function(e) {
|
||||
var text = e.time ? '【' + e.time + '】' + e.summary : e.summary;
|
||||
if (e.location) text += ' @' + e.location;
|
||||
var existing = document.querySelectorAll('#morning-list input[type="text"]');
|
||||
var already = false;
|
||||
existing.forEach(function(inp){ if (inp.value.indexOf(e.summary) >= 0) already = true; });
|
||||
if (already) return;
|
||||
var count = document.querySelectorAll('#morning-list .item-row').length;
|
||||
if (count >= 3) return;
|
||||
addMorningRow(text);
|
||||
added++;
|
||||
});
|
||||
});
|
||||
if (added > 0) {
|
||||
showToast('已自动填充 ' + added + ' 条今日日程', 'info');
|
||||
triggerAutoSave();
|
||||
}
|
||||
}
|
||||
|
||||
window.closeSyncModal = function() {
|
||||
var overlay = document.getElementById('sync-modal-overlay');
|
||||
if (overlay) overlay.style.display = 'none';
|
||||
};
|
||||
|
||||
window.addMorning = function() {
|
||||
var count = document.querySelectorAll('#morning-list .item-row').length;
|
||||
if (count >= 3) { showToast('最多 3 条立志', 'error'); return; }
|
||||
@@ -444,13 +535,20 @@
|
||||
var panel = document.getElementById('panel-daily');
|
||||
if (!panel) return;
|
||||
|
||||
// 输入框 & 文本域:失去焦点时保存
|
||||
// 输入框 & 文本域 & 下拉选择器:失去焦点时保存
|
||||
panel.addEventListener('blur', function(e) {
|
||||
if (e.target.matches('input[type="text"], textarea, input[type="date"]')) {
|
||||
if (e.target.matches('input[type="text"], textarea, input[type="date"], select')) {
|
||||
triggerAutoSave();
|
||||
}
|
||||
}, true);
|
||||
|
||||
// 选择器:change 事件也保存(及时响应)
|
||||
panel.addEventListener('change', function(e) {
|
||||
if (e.target.matches('select.morning-pillar')) {
|
||||
triggerAutoSave();
|
||||
}
|
||||
});
|
||||
|
||||
// 复选框:change 事件
|
||||
panel.addEventListener('change', function(e) {
|
||||
if (e.target.matches('input[type="checkbox"]')) {
|
||||
@@ -636,17 +734,27 @@
|
||||
};
|
||||
|
||||
/* ================================================================
|
||||
Wishes — 心愿清单
|
||||
Wishes — 心愿清单(四象限)
|
||||
================================================================ */
|
||||
var wishes = [];
|
||||
var dragSourceId = null;
|
||||
var dragSourceQuadrant = null;
|
||||
var wishesLoaded = false;
|
||||
var QUADRANTS = ['重要紧急', '重要不紧急', '紧急不重要', '不紧急不重要'];
|
||||
|
||||
function normalizeQuadrant(w) {
|
||||
if (QUADRANTS.indexOf(w.quadrant) >= 0) return w.quadrant;
|
||||
// 老数据回退: priority → quadrant
|
||||
var map = {'高': '重要紧急', '中': '重要不紧急', '低': '不紧急不重要'};
|
||||
return map[w.priority] || '重要不紧急';
|
||||
}
|
||||
|
||||
function loadWishes() {
|
||||
if (wishesLoaded) { renderWishes(); return; }
|
||||
// 优先使用页面嵌入数据
|
||||
if (window.__INITIAL_WISHES__) {
|
||||
wishes = window.__INITIAL_WISHES__;
|
||||
// 规范化 quadrant
|
||||
wishes.forEach(function(w){ w.quadrant = normalizeQuadrant(w); });
|
||||
wishesLoaded = true;
|
||||
renderWishes();
|
||||
return;
|
||||
@@ -657,49 +765,110 @@
|
||||
}
|
||||
|
||||
function renderWishes() {
|
||||
var list = document.getElementById('wishes-list');
|
||||
var empty = document.getElementById('wishes-empty');
|
||||
if (!list) return;
|
||||
if (wishes.length === 0) {
|
||||
list.innerHTML = '';
|
||||
if (empty) empty.style.display = 'block';
|
||||
var emptyEl = document.getElementById('wishes-empty');
|
||||
if (!wishes.length) {
|
||||
QUADRANTS.forEach(function(q){ document.getElementById('quad-list-' + q).innerHTML = ''; });
|
||||
if (emptyEl) emptyEl.style.display = 'block';
|
||||
return;
|
||||
}
|
||||
if (empty) empty.style.display = 'none';
|
||||
var html = '';
|
||||
for (var i = 0; i < wishes.length; i++) {
|
||||
var w = wishes[i];
|
||||
var doneCls = w.done ? ' done' : '';
|
||||
var priCls = 'pri-' + (w.priority || '中');
|
||||
var deadline = w.deadline ? w.deadline : '';
|
||||
html += '<div class="wish-item' + doneCls + '" draggable="true" data-id="' + w.id + '">' +
|
||||
'<span class="wish-drag-handle"><svg class="icon-xs"><use href="#icon-list-bullet"/></svg></span>' +
|
||||
'<input type="checkbox" class="wish-check" ' + (w.done ? 'checked' : '') + ' onchange="toggleWish(' + w.id + ', this.checked)">' +
|
||||
'<span class="wish-name" title="' + esc(w.name) + '">' + esc(w.name) + '</span>' +
|
||||
'<span class="wish-pri ' + priCls + '">' + esc(w.priority) + '</span>' +
|
||||
(deadline ? '<span class="wish-deadline">' + esc(deadline) + '</span>' : '') +
|
||||
'<button class="btn-del wish-del" onclick="deleteWishItem(' + w.id + ')"><svg class="icon-xs"><use href="#icon-x"/></svg></button>' +
|
||||
'</div>';
|
||||
}
|
||||
list.innerHTML = html;
|
||||
if (emptyEl) emptyEl.style.display = 'none';
|
||||
|
||||
// 按象限分组渲染
|
||||
QUADRANTS.forEach(function(quadrant) {
|
||||
var list = document.getElementById('quad-list-' + quadrant);
|
||||
if (!list) return;
|
||||
var items = wishes.filter(function(w){ return normalizeQuadrant(w) === quadrant; });
|
||||
var html = '';
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
var w = items[i];
|
||||
var doneCls = w.done ? ' done' : '';
|
||||
var deadline = w.deadline ? w.deadline : '';
|
||||
html += '<div class="wish-item' + doneCls + '" draggable="true" data-id="' + w.id + '" data-quadrant="' + quadrant + '">' +
|
||||
'<span class="wish-drag-handle"><svg class="icon-xs"><use href="#icon-list-bullet"/></svg></span>' +
|
||||
'<input type="checkbox" class="wish-check" ' + (w.done ? 'checked' : '') + ' onchange="toggleWish(' + w.id + ', this.checked)">' +
|
||||
'<span class="wish-name" title="' + esc(w.name) + '">' + esc(w.name) + '</span>' +
|
||||
(deadline ? '<span class="wish-deadline">' + esc(deadline) + '</span>' : '') +
|
||||
'<button class="btn-del wish-del" onclick="deleteWishItem(' + w.id + ')"><svg class="icon-xs"><use href="#icon-x"/></svg></button>' +
|
||||
'</div>';
|
||||
}
|
||||
list.innerHTML = html;
|
||||
});
|
||||
|
||||
bindDragEvents();
|
||||
bindEditClicks();
|
||||
}
|
||||
|
||||
/* ── Drag & Drop ── */
|
||||
/* ── 点击编辑 ── */
|
||||
|
||||
function bindEditClicks() {
|
||||
document.querySelectorAll('#panel-wishes .wish-item').forEach(function(item) {
|
||||
// 只在点击名称或日期区域时触发编辑(排除 checkbox / 拖拽手柄 / 删除按钮)
|
||||
item.addEventListener('click', function(e) {
|
||||
if (e.target.closest('.wish-check') || e.target.closest('.wish-drag-handle') ||
|
||||
e.target.closest('.wish-del') || e.target.closest('.wish-edit-form')) return;
|
||||
var id = parseInt(this.dataset.id);
|
||||
var w = wishes.find(function(x){ return x.id === id; });
|
||||
if (w) startEditWish(this, w);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function startEditWish(el, w) {
|
||||
if (el.querySelector('.wish-edit-form')) return; // 已在编辑中
|
||||
el.classList.add('editing');
|
||||
var deadline = w.deadline || '';
|
||||
var quadOpts = QUADRANTS.map(function(q){
|
||||
return '<option value="' + q + '"' + (q === normalizeQuadrant(w) ? ' selected' : '') + '>' + q + '</option>';
|
||||
}).join('');
|
||||
el.innerHTML =
|
||||
'<div class="wish-edit-form">' +
|
||||
'<input type="text" class="wish-edit-name" value="' + esc(w.name) + '" maxlength="50">' +
|
||||
'<div class="wish-edit-row">' +
|
||||
'<select class="wish-edit-quadrant">' + quadOpts + '</select>' +
|
||||
'<input type="date" class="wish-edit-deadline" value="' + esc(deadline) + '">' +
|
||||
'</div>' +
|
||||
'<div class="wish-edit-actions">' +
|
||||
'<button class="btn-wish-save" onclick="event.stopPropagation();saveEditWish(' + w.id + ', this)">保存</button>' +
|
||||
'<button class="btn-wish-cancel" onclick="event.stopPropagation();window.renderWishes()">取消</button>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
}
|
||||
|
||||
window.saveEditWish = function(id, btn) {
|
||||
var form = btn.closest('.wish-edit-form');
|
||||
var name = form.querySelector('.wish-edit-name').value.trim();
|
||||
if (!name) { showToast('名称不能为空', 'error'); return; }
|
||||
var quadrant = form.querySelector('.wish-edit-quadrant').value;
|
||||
var deadline = form.querySelector('.wish-edit-deadline').value;
|
||||
fetch('/api/wishes/' + id, {
|
||||
method: 'PUT',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({name: name, quadrant: quadrant, deadline: deadline})
|
||||
}).then(function(r){ return r.json(); })
|
||||
.then(function(res) {
|
||||
if (!res.ok) { showToast(res.error, 'error'); return; }
|
||||
var w = wishes.find(function(x){ return x.id === id; });
|
||||
if (w) { w.name = name; w.quadrant = quadrant; w.deadline = deadline; }
|
||||
renderWishes();
|
||||
});
|
||||
};
|
||||
|
||||
/* ── Drag & Drop (跨象限) ── */
|
||||
|
||||
function bindDragEvents() {
|
||||
var items = document.querySelectorAll('#wishes-list .wish-item');
|
||||
var items = document.querySelectorAll('#panel-wishes .wish-item');
|
||||
items.forEach(function(item) {
|
||||
item.addEventListener('dragstart', function(e) {
|
||||
dragSourceId = parseInt(this.dataset.id);
|
||||
dragSourceQuadrant = this.dataset.quadrant;
|
||||
this.classList.add('dragging');
|
||||
e.dataTransfer.effectAllowed = 'move';
|
||||
});
|
||||
item.addEventListener('dragend', function(e) {
|
||||
item.addEventListener('dragend', function() {
|
||||
this.classList.remove('dragging');
|
||||
dragSourceId = null;
|
||||
// 移除所有 over 状态
|
||||
document.querySelectorAll('#wishes-list .wish-item').forEach(function(el){ el.classList.remove('drag-over'); });
|
||||
dragSourceQuadrant = null;
|
||||
document.querySelectorAll('.quad-cell, .wish-item').forEach(function(el){ el.classList.remove('drag-over'); });
|
||||
});
|
||||
item.addEventListener('dragover', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -711,23 +880,60 @@
|
||||
});
|
||||
item.addEventListener('drop', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.classList.remove('drag-over');
|
||||
var targetId = parseInt(this.dataset.id);
|
||||
var targetQuadrant = this.dataset.quadrant;
|
||||
if (dragSourceId === targetId) return;
|
||||
// 更新本地顺序
|
||||
|
||||
var fromIdx = -1, toIdx = -1;
|
||||
for (var j = 0; j < wishes.length; j++) {
|
||||
if (wishes[j].id === dragSourceId) fromIdx = j;
|
||||
if (wishes[j].id === targetId) toIdx = j;
|
||||
}
|
||||
if (fromIdx >= 0 && toIdx >= 0) {
|
||||
var item = wishes.splice(fromIdx, 1)[0];
|
||||
wishes.splice(toIdx, 0, item);
|
||||
var moved = wishes.splice(fromIdx, 1)[0];
|
||||
wishes.splice(toIdx, 0, moved);
|
||||
// 更新象限
|
||||
if (dragSourceQuadrant !== targetQuadrant) {
|
||||
moved.quadrant = targetQuadrant;
|
||||
fetch('/api/wishes/' + moved.id, {
|
||||
method: 'PUT',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({quadrant: targetQuadrant})
|
||||
}).catch(function(){ showToast('保存失败', 'error'); });
|
||||
}
|
||||
renderWishes();
|
||||
saveWishOrder();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 象限空区域接受 drop
|
||||
document.querySelectorAll('.quad-cell').forEach(function(cell) {
|
||||
cell.addEventListener('dragover', function(e) {
|
||||
if (this.querySelector('.wish-item')) return; // 有内容时让 item 处理
|
||||
e.preventDefault();
|
||||
this.classList.add('drag-over');
|
||||
});
|
||||
cell.addEventListener('dragleave', function() { this.classList.remove('drag-over'); });
|
||||
cell.addEventListener('drop', function(e) {
|
||||
this.classList.remove('drag-over');
|
||||
if (this.querySelector('.wish-item')) return; // 已由 item 处理
|
||||
e.preventDefault();
|
||||
var q = this.dataset.quadrant;
|
||||
var moved = wishes.find(function(w){ return w.id === dragSourceId; });
|
||||
if (moved) {
|
||||
moved.quadrant = q;
|
||||
fetch('/api/wishes/' + moved.id, {
|
||||
method: 'PUT',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({quadrant: q})
|
||||
}).catch(function(){ showToast('保存失败', 'error'); });
|
||||
renderWishes();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function saveWishOrder() {
|
||||
@@ -751,23 +957,24 @@
|
||||
if (form) form.style.display = 'none';
|
||||
document.getElementById('wish-name').value = '';
|
||||
document.getElementById('wish-deadline').value = '';
|
||||
document.getElementById('wish-priority').value = '中';
|
||||
var sel = document.getElementById('wish-quadrant');
|
||||
if (sel) sel.value = '重要不紧急';
|
||||
};
|
||||
|
||||
window.addWish = function() {
|
||||
var name = document.getElementById('wish-name').value.trim();
|
||||
if (!name) { showToast('请输入心愿名称', 'error'); return; }
|
||||
var priority = document.getElementById('wish-priority').value;
|
||||
var quadrant = document.getElementById('wish-quadrant').value;
|
||||
var deadline = document.getElementById('wish-deadline').value;
|
||||
fetch('/api/wishes', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({name: name, priority: priority, deadline: deadline})
|
||||
body: JSON.stringify({name: name, quadrant: quadrant, deadline: deadline})
|
||||
}).then(function(r){ return r.json(); })
|
||||
.then(function(res){
|
||||
if (!res.ok) { showToast(res.error, 'error'); return; }
|
||||
hideWishForm();
|
||||
wishes.push({id: res.id, name: name, priority: priority, deadline: deadline, done: 0});
|
||||
wishes.push({id: res.id, name: name, quadrant: quadrant, deadline: deadline, done: 0});
|
||||
renderWishes();
|
||||
});
|
||||
};
|
||||
@@ -796,6 +1003,88 @@
|
||||
btn.classList.toggle('active', editing);
|
||||
};
|
||||
|
||||
window.renderWishes = renderWishes;
|
||||
|
||||
/* ================================================================
|
||||
Blueprint — 蓝图六板块
|
||||
================================================================ */
|
||||
|
||||
var blueprintData = null;
|
||||
var blueprintFilter = 'all';
|
||||
|
||||
function loadBlueprint() {
|
||||
apiGetStats(function(err, data) {
|
||||
if (err || !data || !data.pillar_breakdown) return;
|
||||
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
|
||||
================================================================ */
|
||||
|
||||
493
static/style.css
493
static/style.css
@@ -428,6 +428,12 @@ body {
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.panel-header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.check-date-input {
|
||||
padding: 8px 14px;
|
||||
border: 1.5px solid var(--border);
|
||||
@@ -535,6 +541,29 @@ body {
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
/* 日历同步按钮 */
|
||||
.btn-cal-sync {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 8px 14px;
|
||||
border: 1.5px solid var(--border);
|
||||
background: var(--card);
|
||||
color: var(--text-dim);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
flex-shrink: 0;
|
||||
font-family: inherit;
|
||||
}
|
||||
.btn-cal-sync:hover {
|
||||
border-color: var(--primary);
|
||||
color: var(--primary);
|
||||
background: var(--primary-light);
|
||||
}
|
||||
|
||||
/* 编辑模式下才显示的元素 */
|
||||
.edit-only { display: none; }
|
||||
.card.editing .edit-only { display: flex; }
|
||||
@@ -615,9 +644,13 @@ body {
|
||||
.btn-del:hover { background: var(--danger-light); }
|
||||
.btn-del .icon-sm { width: 16px; height: 16px; }
|
||||
|
||||
/* 责善改过 横排双输入 */
|
||||
/* 责善改过 — 简洁分割线风格 */
|
||||
|
||||
.evening-row {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 0 0 12px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
@@ -626,42 +659,17 @@ body {
|
||||
.evening-row:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.evening-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
.evening-row .btn-del {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.evening-header .idx {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mistake-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.mistake-row .col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mistake-row .col label {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
font-weight: 500;
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
.mistake-row input[type="text"] {
|
||||
.evening-row input[type="text"] {
|
||||
width: 100%;
|
||||
padding: 9px 12px;
|
||||
border: 1.5px solid var(--border);
|
||||
@@ -671,8 +679,10 @@ body {
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
transition: border-color 0.2s, background 0.2s;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.mistake-row input[type="text"]:focus {
|
||||
|
||||
.evening-row input[type="text"]:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
background: var(--card);
|
||||
@@ -1081,7 +1091,125 @@ body {
|
||||
.toast.info { background: var(--primary); color: #FFF; }
|
||||
|
||||
/* ═══════════════════════════════════════════
|
||||
Wishes Panel
|
||||
Sync Modal
|
||||
═══════════════════════════════════════════ */
|
||||
|
||||
.sync-modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9998;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
.sync-modal {
|
||||
background: var(--card);
|
||||
border-radius: var(--radius);
|
||||
width: 90%;
|
||||
max-width: 560px;
|
||||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 8px 40px rgba(0,0,0,0.15);
|
||||
overflow: hidden;
|
||||
}
|
||||
.sync-modal-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sync-modal-header h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
}
|
||||
.sync-modal-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 22px;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
padding: 0 4px;
|
||||
line-height: 1;
|
||||
}
|
||||
.sync-modal-loading {
|
||||
padding: 40px 20px;
|
||||
text-align: center;
|
||||
color: var(--text-dim);
|
||||
font-size: 14px;
|
||||
}
|
||||
.sync-spinner {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: 3px solid var(--border);
|
||||
border-top-color: var(--primary);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
margin: 0 auto 14px;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.sync-modal-results {
|
||||
padding: 16px 20px;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
.sync-summary {
|
||||
font-size: 14px;
|
||||
color: var(--text);
|
||||
margin-bottom: 14px;
|
||||
padding: 10px 14px;
|
||||
background: var(--primary-light);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
.sync-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
.sync-day {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
}
|
||||
.sync-day-header {
|
||||
background: var(--bg);
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-dim);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.sync-event {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
}
|
||||
.sync-event + .sync-event { border-top: 1px solid var(--bg); }
|
||||
.sync-event-icon { flex-shrink: 0; }
|
||||
.sync-event-text { flex: 1; }
|
||||
.sync-event-time { font-size: 11px; color: var(--text-muted); margin-left: 6px; }
|
||||
.sync-modal-footer {
|
||||
padding: 12px 20px;
|
||||
border-top: 1px solid var(--border);
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.sync-modal-footer .btn-wish-save {
|
||||
width: auto;
|
||||
padding: 8px 24px;
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════
|
||||
Wishes — 四象限
|
||||
═══════════════════════════════════════════ */
|
||||
|
||||
#panel-wishes.editing .edit-only { display: inline-flex; }
|
||||
@@ -1108,135 +1236,157 @@ body {
|
||||
box-sizing: border-box;
|
||||
background: var(--card);
|
||||
}
|
||||
.wish-form input[type="text"]:focus,
|
||||
.wish-form input[type="date"]:focus,
|
||||
.wish-form select:focus {
|
||||
.wish-form input:focus, .wish-form select:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px rgba(74,108,247,0.08);
|
||||
}
|
||||
.wish-form-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.wish-form-row select,
|
||||
.wish-form-row input { flex: 1; }
|
||||
.wish-form-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
.wish-form-row { display: flex; gap: 8px; }
|
||||
.wish-form-row select, .wish-form-row input { flex: 1; }
|
||||
.wish-form-actions { display: flex; gap: 8px; }
|
||||
.btn-wish-save {
|
||||
flex: 1;
|
||||
padding: 8px;
|
||||
border: none;
|
||||
background: var(--primary);
|
||||
color: #FFF;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
flex: 1; padding: 8px; border: none; background: var(--primary); color: #FFF;
|
||||
border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
|
||||
cursor: pointer; font-family: inherit;
|
||||
}
|
||||
.btn-wish-save:hover { background: var(--primary-dark); }
|
||||
.btn-wish-cancel {
|
||||
flex: 1;
|
||||
padding: 8px;
|
||||
border: 1.5px solid var(--border);
|
||||
flex: 1; padding: 8px; border: 1.5px solid var(--border); background: var(--card);
|
||||
color: var(--text-dim); border-radius: var(--radius-sm); font-size: 13px;
|
||||
cursor: pointer; font-family: inherit;
|
||||
}
|
||||
|
||||
/* 四象限网格 */
|
||||
.quad-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
gap: 12px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.quad-cell {
|
||||
background: var(--card);
|
||||
color: var(--text-dim);
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 180px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.quad-cell.drag-over {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 3px rgba(74,108,247,0.10);
|
||||
background: var(--primary-light);
|
||||
}
|
||||
|
||||
.quad-title {
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.wishes-grid {
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.wishes-list {
|
||||
.quad-list {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.wishes-empty {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
text-align: center;
|
||||
padding: 32px 0;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.wish-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
gap: 8px;
|
||||
padding: 7px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--card);
|
||||
border: 0.5px solid var(--border);
|
||||
box-shadow: var(--shadow);
|
||||
transition: background 0.15s, box-shadow 0.15s;
|
||||
background: var(--bg);
|
||||
transition: opacity 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
.wish-item:hover { box-shadow: var(--shadow-hover); }
|
||||
.wish-item.dragging { opacity: 0.4; }
|
||||
.wish-item:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
|
||||
.wish-item.dragging { opacity: 0.3; }
|
||||
.wish-item.drag-over {
|
||||
background: var(--primary-light);
|
||||
box-shadow: inset 0 0 0 2px var(--primary);
|
||||
background: var(--card);
|
||||
}
|
||||
|
||||
.wish-drag-handle {
|
||||
color: var(--text-muted);
|
||||
cursor: grab;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--text-muted); cursor: grab; flex-shrink: 0;
|
||||
display: flex; align-items: center;
|
||||
}
|
||||
.wish-drag-handle:active { cursor: grabbing; }
|
||||
|
||||
.wish-check {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: var(--success);
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
width: 15px; height: 15px; accent-color: var(--success);
|
||||
flex-shrink: 0; cursor: pointer;
|
||||
}
|
||||
|
||||
.wish-name {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: var(--text);
|
||||
min-width: 0;
|
||||
word-break: break-all;
|
||||
flex: 1; font-size: 13px; color: var(--text); min-width: 0;
|
||||
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
}
|
||||
.wish-item.done .wish-name {
|
||||
text-decoration: line-through;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.wish-pri {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.wish-pri.pri-高 { background: var(--danger-light); color: var(--danger); }
|
||||
.wish-pri.pri-中 { background: var(--warning-light); color: #D97706; }
|
||||
.wish-pri.pri-低 { background: var(--bg); color: var(--text-muted); }
|
||||
.wish-item.done .wish-name { text-decoration: line-through; color: var(--text-muted); }
|
||||
|
||||
.wish-deadline {
|
||||
font-size: 12px;
|
||||
color: var(--text-dim);
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
font-size: 11px; color: var(--text-dim); white-space: nowrap; flex-shrink: 0;
|
||||
}
|
||||
|
||||
.wish-del {
|
||||
display: none;
|
||||
.wish-del { display: none; }
|
||||
.wish-del .icon-xs { width: 13px; height: 13px; }
|
||||
|
||||
/* 内联编辑 */
|
||||
.wish-item.editing {
|
||||
background: var(--card);
|
||||
padding: 8px 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.wish-edit-form {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.wish-edit-form input[type="text"],
|
||||
.wish-edit-form input[type="date"],
|
||||
.wish-edit-form select {
|
||||
width: 100%;
|
||||
padding: 6px 8px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 12px;
|
||||
font-family: inherit;
|
||||
color: var(--text);
|
||||
background: var(--card);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wish-edit-form input:focus,
|
||||
.wish-edit-form select:focus {
|
||||
outline: none;
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 2px rgba(74,108,247,0.08);
|
||||
}
|
||||
.wish-edit-name { font-weight: 500; }
|
||||
.wish-edit-row { display: flex; gap: 6px; }
|
||||
.wish-edit-row select,
|
||||
.wish-edit-row input { flex: 1; }
|
||||
.wish-edit-actions { display: flex; gap: 6px; }
|
||||
.wish-edit-actions .btn-wish-save,
|
||||
.wish-edit-actions .btn-wish-cancel {
|
||||
flex: 1; padding: 6px; font-size: 12px;
|
||||
}
|
||||
|
||||
.wishes-empty {
|
||||
font-size: 13px; color: var(--text-muted); text-align: center; padding: 32px 0;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
|
||||
}
|
||||
.wish-del .icon-xs { width: 14px; height: 14px; }
|
||||
|
||||
/* ═══════════════════════════════════════════
|
||||
SVG icons helpers
|
||||
@@ -1273,3 +1423,98 @@ body {
|
||||
}
|
||||
.main-content { height: auto; overflow: visible; padding: 16px; }
|
||||
}
|
||||
|
||||
/* ═══════════════════════════════════════════
|
||||
Blueprint Panel
|
||||
═══════════════════════════════════════════ */
|
||||
|
||||
/* Tab 筛选 */
|
||||
.bp-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1.5px solid var(--border);
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.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; }
|
||||
|
||||
/* 明细列表 */
|
||||
.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-bottom: 0.5px solid var(--border);
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.bp-list-item:hover { background: var(--bg); }
|
||||
.bp-pillar-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 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;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.quad-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
|
||||
}
|
||||
|
||||
@@ -13,6 +13,27 @@
|
||||
|
||||
<div id="toast" class="toast"></div>
|
||||
|
||||
<!-- 日历同步弹窗 -->
|
||||
<div class="sync-modal-overlay" id="sync-modal-overlay" style="display:none">
|
||||
<div class="sync-modal">
|
||||
<div class="sync-modal-header">
|
||||
<h3>📅 日历同步</h3>
|
||||
<button class="sync-modal-close" onclick="closeSyncModal()">×</button>
|
||||
</div>
|
||||
<div class="sync-modal-loading" id="sync-loading">
|
||||
<div class="sync-spinner"></div>
|
||||
<p>正在从钉钉同步过去15天~未来15天日程…</p>
|
||||
</div>
|
||||
<div class="sync-modal-results" id="sync-results" style="display:none">
|
||||
<div class="sync-summary" id="sync-summary"></div>
|
||||
<div class="sync-list" id="sync-list"></div>
|
||||
</div>
|
||||
<div class="sync-modal-footer">
|
||||
<button class="btn-wish-save" onclick="closeSyncModal()">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app-layout">
|
||||
|
||||
<!-- ═══ 左侧边栏 ═══ -->
|
||||
@@ -86,6 +107,10 @@
|
||||
<svg class="icon-sm"><use href="#icon-list-bullet"/></svg>
|
||||
历史记录
|
||||
</a>
|
||||
<a class="nav-item" data-panel="blueprint" onclick="switchPanel('blueprint')">
|
||||
<svg class="icon-sm"><use href="#icon-sun"/></svg>
|
||||
人生蓝图
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- 底部新建按钮 -->
|
||||
@@ -104,7 +129,12 @@
|
||||
<section class="panel active" id="panel-daily">
|
||||
<div class="panel-header">
|
||||
<h2>每日打卡</h2>
|
||||
<input type="date" id="check-date" class="check-date-input" onchange="loadCheckin()">
|
||||
<div class="panel-header-right">
|
||||
<input type="date" id="check-date" class="check-date-input" onchange="loadCheckin()">
|
||||
<button class="btn-cal-sync" onclick="syncCalendar()" title="同步钉钉日历">
|
||||
<svg class="icon-sm"><use href="#icon-calendar"/></svg> 日历同步
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="daily-grid">
|
||||
<div class="card card-morning">
|
||||
@@ -205,10 +235,11 @@
|
||||
<div class="wish-form" id="wish-form" style="display:none">
|
||||
<input type="text" id="wish-name" placeholder="心愿名称…" maxlength="50">
|
||||
<div class="wish-form-row">
|
||||
<select id="wish-priority">
|
||||
<option value="高">高优先</option>
|
||||
<option value="中" selected>中优先</option>
|
||||
<option value="低">低优先</option>
|
||||
<select id="wish-quadrant">
|
||||
<option value="重要紧急">重要紧急</option>
|
||||
<option value="重要不紧急" selected>重要不紧急</option>
|
||||
<option value="紧急不重要">紧急不重要</option>
|
||||
<option value="不紧急不重要">不紧急不重要</option>
|
||||
</select>
|
||||
<input type="date" id="wish-deadline">
|
||||
</div>
|
||||
@@ -217,14 +248,54 @@
|
||||
<button class="btn-wish-cancel" onclick="hideWishForm()">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn-add edit-only" id="wishes-add-btn" onclick="showWishForm()" style="margin-bottom:12px">
|
||||
<button class="btn-add edit-only" id="wishes-add-btn" onclick="showWishForm()" style="margin-bottom:16px">
|
||||
<svg class="icon-sm"><use href="#icon-plus"/></svg> 新增心愿
|
||||
</button>
|
||||
<!-- 列表 -->
|
||||
<div class="wishes-grid" id="wishes-grid">
|
||||
<div class="wishes-list" id="wishes-list"></div>
|
||||
<div class="wishes-empty" id="wishes-empty">暂无心愿,点击上方按钮添加</div>
|
||||
<!-- 四象限网格 -->
|
||||
<div class="quad-grid">
|
||||
<div class="quad-cell" data-quadrant="重要紧急" id="quad-重要紧急">
|
||||
<div class="quad-title">重要 & 紧急</div>
|
||||
<div class="quad-list" id="quad-list-重要紧急"></div>
|
||||
</div>
|
||||
<div class="quad-cell" data-quadrant="重要不紧急" id="quad-重要不紧急">
|
||||
<div class="quad-title">重要 & 不紧急</div>
|
||||
<div class="quad-list" id="quad-list-重要不紧急"></div>
|
||||
</div>
|
||||
<div class="quad-cell" data-quadrant="紧急不重要" id="quad-紧急不重要">
|
||||
<div class="quad-title">紧急 & 不重要</div>
|
||||
<div class="quad-list" id="quad-list-紧急不重要"></div>
|
||||
</div>
|
||||
<div class="quad-cell" data-quadrant="不紧急不重要" id="quad-不紧急不重要">
|
||||
<div class="quad-title">不紧急 & 不重要</div>
|
||||
<div class="quad-list" id="quad-list-不紧急不重要"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wishes-empty" id="wishes-empty" style="display:none">暂无心愿,点击上方按钮添加</div>
|
||||
</section>
|
||||
|
||||
<!-- ── 蓝图面板 ── -->
|
||||
<section class="panel" id="panel-blueprint">
|
||||
<div class="panel-header">
|
||||
<h2>人生蓝图</h2>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user