From 18f97cd571dc898ede674ef98544f2e712d081bc Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Wed, 4 Nov 2026 01:34:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(web):=20=E5=8D=A1=E5=A4=B4=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E7=BB=9F=E4=B8=80=E8=B5=B0=20cardHead()=EF=BC=8C?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E9=A1=B5=E3=80=8C=E6=96=B0=E5=A2=9E=E5=AE=9A?= =?UTF-8?q?=E5=88=B6=E9=A1=B9=E7=9B=AE=E3=80=8D=E6=8C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 手写的

…

共 7 处(录入页两个卡、设置页三个卡、 人员页两个小卡)全部改用 cardHead():按钮归位 .head-tools(此前贴在标题旁,右不对齐), 标题自动进 .t 包装、图标自动补齐,风格与列表页一致。 - 录入页「定制项目 · 交付记录录入」卡头的「新增」按钮补 canW(custom) 门槛—— 只有录入权限的账号本来就不能新建定制项目(POST /custom/projects 归 custom), 此前按钮可见可点、点了吃 403;对应绑定加空引用保护。 - node --check 通过 --- web/app.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/web/app.js b/web/app.js index 1dc4cf6..b20f825 100644 --- a/web/app.js +++ b/web/app.js @@ -2654,9 +2654,7 @@
-

定制项目 · 交付记录录入

- -
+ ${cardHead({ title: "定制项目 · 交付记录录入", tools: canW("custom") ? `` : "" })}
1选择定制项目与周期
@@ -2680,7 +2678,8 @@ b.addEventListener("click", () => { state.intakeType = b.dataset.itype; renderIntake(); }) ); sel.addEventListener("change", () => { customIntakeId = Number(sel.value); }); - $("#btnNewCustomIntake").addEventListener("click", () => + const bnci = $("#btnNewCustomIntake"); + if (bnci) bnci.addEventListener("click", () => openNewCustomDialog((p) => { customIntakeId = p.id; renderCustomIntake(host); }) ); $("#cInSearch").addEventListener("input", (e) => { @@ -2850,7 +2849,7 @@
-

自研产品 · 执行记录录入

+ ${cardHead({ title: "自研产品 · 执行记录录入" })}
1选择项目与周期
@@ -3036,7 +3035,7 @@ host.innerHTML = `
-

AI 整理配置

+ ${cardHead({ title: "AI 整理配置" })}
${state.meta.ai.enabled ? `
已启用 AI 整理(模型:${esc(state.meta.ai.model || "—")})
` @@ -3049,7 +3048,7 @@
-

数据库

+ ${cardHead({ title: "数据库" })}
${esc(health.db)}
${health.db === "sqlite" ? `
data/board.db
` : ""} @@ -3058,10 +3057,7 @@
-
-

周期管理

- ${rw ? `` : ""} -
+ ${cardHead({ title: "周期管理", tools: rw ? `` : "" })}
@@ -3450,7 +3446,7 @@
-

人员归属

+ ${cardHead({ title: "人员归属" })}
${sum.affiliations.map((a) => `
@@ -3461,7 +3457,7 @@
-

花名册外的负责人

+ ${cardHead({ title: "花名册外的负责人" })}
${sum.outside.length ? sum.outside.map((o) => `
周期起止日期常规记录定制记录