From 777a0f3cd1ac6c22c640d6a4bf4abbcffb6c9cd8 Mon Sep 17 00:00:00 2001 From: zizi Date: Fri, 31 Jul 2026 22:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=86=E6=9E=B6(=E7=9C=8B=E6=9D=BF):=20?= =?UTF-8?q?=E4=BD=9C=E5=93=81=E8=AF=A6=E6=83=85=E5=A2=9E=E8=A7=84=E5=88=92?= =?UTF-8?q?=E5=8C=BA=E5=9D=97=EF=BC=88=E8=AF=BB=20example=5Fplanning=5Fsec?= =?UTF-8?q?tion=EF=BC=8C=E5=A4=A7=E7=BA=B2/=E7=BB=86=E7=BA=B2/=E8=AE=BE?= =?UTF-8?q?=E5=AE=9A+=E7=8A=B6=E6=80=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/server.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dashboard/server.py b/dashboard/server.py index a15063d..7ca0cf2 100644 --- a/dashboard/server.py +++ b/dashboard/server.py @@ -335,10 +335,21 @@ def view_work(wid): f"{trs}") else: chap = empty_gap("还没有章节", "") + if table_exists("example_planning_section"): + _, secs = q("SELECT section_type, target_chapter, version, state FROM example_planning_section " + "WHERE work_id=%s AND deleted=false ORDER BY section_type, target_chapter NULLS FIRST, version DESC", + (wid,)) + plan = ("
规划(大纲 / 细纲 / 设定)
" + "" + + "".join(f"" + f"" for s in secs) + + "
类型章版本状态
{esc(s[0])}{esc(s[1]) if s[1] is not None else '—'}{esc(s[2])}{chip(s[3])}
") if secs else "
规划表已建 · 暂无规划(planner 落库后显示)
" + else: + plan = empty_gap("规划 · 待落库", "规划表(100)未建。") body = (f"
作品 / {esc(title)}
" f"

{esc(title)} {chip(status)}

" f"

{esc(genre)} · {fmt_num(wc)} 字 · {esc(cc)} 章

" - f"

{esc(summary)}

{chap}") + f"

{esc(summary)}

{chap}

规划

{plan}") return layout(title, body, "/works")