diff --git a/PROGRESS.md b/PROGRESS.md index a23ef14..f19501e 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -2,7 +2,7 @@ > 配合 `DESIGN.md`。本文件只记 phase 状态、决策偏差、文件量、下一步。每条 1-2 句:做了啥 + 关键判断;细节查 `git log` / `git diff` / `DESIGN §7.9`。 -最后更新:2026-06-26(定时任务执行历史列表(分页)+ bump 0.29.0) +最后更新:2026-06-26(admin 近7天用量表加合计行 + bump 0.31.1) --- @@ -21,6 +21,10 @@ ## 已完成关键能力 +### 2026-06-26 / admin 近7天用量表加合计行(bump 0.31.1) + +- 纯前端展示:`renderByDay`(`web/static/js/admin.js`)在 `by_day_7d` 表底加 `
` 合计行,对 7 天 cost_cny/tokens_in/tokens_out 求和;`tfoot .total-row` 样式(粗体 + 上分隔线)在 `admin.html`。无数据时不渲染合计行。后端数据已有(`_usage_section`),无改动。 + ### 2026-06-26 / per-account 模型访问控制(档位制,复用 plan 列)(bump 0.31.0) - 需求:管理后台按账户控制可调用哪些模型。deepseek flash/pro + seedream/seedance + 内网 local 对所有人开放,doubao/glm 按账户分配。 diff --git a/core/__init__.py b/core/__init__.py index 1904194..110e847 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,3 +1,3 @@ # zcbot 版本号单一事实源:web/app.py 的 FastAPI version、/healthz 返回、前端展示都引这里。 # 改版本只动这一行。 -__version__ = "0.31.0" +__version__ = "0.31.1" diff --git a/web/static/admin.html b/web/static/admin.html index 8e876cc..bb4d61d 100644 --- a/web/static/admin.html +++ b/web/static/admin.html @@ -98,6 +98,7 @@ td.num { font-family: var(--mono); } td.email { font-family: var(--mono); max-width: 220px; overflow: hidden; text-overflow: ellipsis; } .bar-cell { position: relative; } + tfoot .total-row td { border-top: 2px solid var(--border); border-bottom: none; font-weight: 700; } .scroll-x { overflow-x: auto; } .empty { color: var(--muted); padding: 8px; text-align: center; } diff --git a/web/static/js/admin.js b/web/static/js/admin.js index 01e222d..a732a4c 100644 --- a/web/static/js/admin.js +++ b/web/static/js/admin.js @@ -135,9 +135,21 @@ function renderByDay(rows) { + `| 日期 | 成本 | 输入 | 输出 |
|---|