diff --git a/README.md b/README.md index 4801c23..4546056 100644 --- a/README.md +++ b/README.md @@ -410,7 +410,7 @@ python scripts/legacy/add_entry_date.py --force # 全部重算 - **表格防竖排**:`table.tbl th` / `.pill` / `.tag-mini` 统一 `white-space:nowrap`,容易挤窄的列(区域、负责人)在 `` 上加 `class="nowrap"`;实在挤不下交给 `.tbl-wrap { overflow:auto }` 横向滚动。 - **抽屉不被内容撑破**:`.form-row > div { min-width: 0 }`(grid 子项默认 `min-width:auto`,会被交付环节步骤条撑出整表横向滚动),步骤条本身 `flex:1 1 132px`(132px = 日期输入框含日历图标的最小可用宽度)。 -> 备注:`styles.css` 里的 `.pcard`、`.board-grid` 当前没有任何 JS 引用(历史遗留样式),此处只做记录,未删除。 +> 备注:历史遗留的 `.pcard`、`.board-grid`、`.svg-chart`、`.legend`、`.risk-item` 等零引用样式已随死代码清理删除(2026-10-29)。 ## 数据导出 diff --git a/web/app.js b/web/app.js index c41c207..ec64f47 100644 --- a/web/app.js +++ b/web/app.js @@ -12,23 +12,20 @@ monthIdx: null, categoryId: null, keyword: "", - idle: "key", showArchived: false, meta: null, periods: null, categories: [], - projects: [], drawerProject: null, // 详情抽屉:周期反馈的显示粒度 / 范围 / 往前翻页偏移 dw: { group: "week", range: 2, back: 0 }, // 定制项目 customMeta: null, finance: null, // /custom/finance 汇总:统计条与年度任务的唯一数据源 - // 定制:项目明细 / 本周进展 两个 tab(原交付流水线 / 阶段看板 / 财务跟踪已下线) + // 定制:项目总览 / 本周进展 / 年度任务 三个 tab customTab: "list", customAnnualEdit: false, // 年度任务:默认查看模式,点「编辑」才可改 customRegion: "", - customStage: "", customStatus: "", customRisk: "", customOrigin: "", @@ -592,22 +589,6 @@ return `${esc(cat.name)}`; } - /** 规范省级行政区下拉(按大区分组)。selected 不在标准列表时补一个选项,避免丢值。 */ - function regionOptions(selected, withEmpty) { - const groups = (state.customMeta && state.customMeta.region_groups) || []; - const all = groups.reduce((acc, g) => acc.concat(g.regions), []); - let html = withEmpty === false ? "" : ``; - for (const g of groups) { - html += `` + - g.regions.map((r) => ``).join("") + - ``; - } - if (selected && all.indexOf(selected) < 0) { - html += ``; - } - return html; - } - /** 触发浏览器下载(导出 Excel) */ function download(url) { const a = document.createElement("a"); @@ -821,27 +802,6 @@ return note ? `${Ico.svg("alert")}${esc(note)}` : ""; } - /* ---------------------------------------------------------------- charts */ - function stackBar(items) { - const total = items.reduce((a, b) => a + b.count, 0) || 1; - let x = 0, segs = ""; - items.filter((i) => i.count > 0).forEach((d) => { - const w = (d.count / total) * 100; - segs += `${esc(d.name)}: ${d.count}`; - x += w; - }); - return `${segs}`; - } - - function barList(rows) { - return rows.map((r) => ` -
-
${r.is_key ? starMark(true) + " " : ""}${esc(r.name)}
-
-
${r.progress}${r.estimated ? "*" : ""}
-
`).join(""); - } - /* ---------------------------------------------------------------- periods */ /** 新建周期:只填「9月第1周」,年份自动接在最新周期之后(也支持写全年份) */ function createNewPeriod() { @@ -1687,7 +1647,7 @@ `; const chips = ``; - // 原来挂在左侧菜单栏的分类筛选器,收进卡头,能力不变 + // 分类筛选器在卡头 const catFilter = `