From a716142d2f55c91a91f80508f83f77cc53967a42 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Fri, 26 Jun 2026 09:08:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9C=8B=E6=9D=BF=E5=8E=BB=E9=A1=B5?= =?UTF-8?q?=E5=A4=B4=E5=89=AF=E6=A0=87=E9=A2=98=E3=80=81=E7=AB=99=E5=9E=8B?= =?UTF-8?q?/=E9=A2=91=E6=AE=B5=E6=8E=92=E9=99=A4=E6=9C=AA=E7=9F=A5?= =?UTF-8?q?=E3=80=81=E7=9F=AE=E5=B1=8F=E5=8F=AF=E6=BB=9A=E5=8A=A8=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/routers/dashboard.py | 4 ++-- docs/project_context.md | 7 +++++++ frontend/src/components/CapacityDashboard.vue | 10 +++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/api/routers/dashboard.py b/app/api/routers/dashboard.py index d119a3b..610f66b 100644 --- a/app/api/routers/dashboard.py +++ b/app/api/routers/dashboard.py @@ -182,8 +182,8 @@ def dashboard_overview(rat: str = Query("4g")): "summary": summary_out, "problem_pie": problem_pie, "by_system": group_by("制式", skip_unknown=True), - "by_station": group_by("站型"), - "by_freq": group_by("频段", limit=12), + "by_station": group_by("站型", skip_unknown=True), + "by_freq": group_by("频段", limit=12, skip_unknown=True), "ul_hist": util_hist(ul), "dl_hist": util_hist(dl), "top_cells": top_cells, diff --git a/docs/project_context.md b/docs/project_context.md index 6270c64..ded9433 100644 --- a/docs/project_context.md +++ b/docs/project_context.md @@ -955,3 +955,10 @@ CellData 处理日志细化(`app/services/cell_data.py`): - 注入内容:subtitle「高负荷小区分析 · 实时数据」;actions = 4G / 5G 两个按钮(激活=`type:primary, variant:solid`,未激活=`default+outline`,点击 `switchRat`)+「刷新」(icon `RefreshOutline`,`loading/disabled` 绑 `loadingOverview`)。因 `PageHeaderAction.type/variant` 非响应式,用 `watch([rat, ready], applyPageHeader)` 在制式切换/就绪时重建 actions;`onBeforeUnmount` 调 `resetPageHeader` 清理;未就绪(无结果表)时不注入。 - 清理:移除 `ratOptions` 及 `.cap-topbar/.cap-title/.cap-spark/.cap-sub/.cap-controls/.cap-refresh` 样式;`.cap-seg*` 保留(问题清单的筛选分段仍在用)。 - 验证:`frontend` `npm run build`(vue-tsc+vite) 通过。 + +## 2026-06-26:看板页头去副标题 + 站型/频段排除未知 + 矮屏可滚动 + +- 去掉页头副标题「高负荷小区分析 · 实时数据」:`applyPageHeader` 只传 `actions`,不传 `subtitle`。 +- 站型分布、频段标记小区也排除「未知」:`overview` 的 `by_station`、`by_freq` 调用加 `skip_unknown=True`(同制式分布,`WHERE 列 IS NOT NULL AND <> ''`)。 +- 矮屏可滚动:`.cap-dashboard` `overflow:hidden` → `overflow-y:auto`(仍固定 `height:calc(100vh-64px)`);`.cap-list` `min-height:0` → `min-height:300px`。视口够高时 flex 填满不滚动;过矮时卡片+图表+清单(≥300px) 总高超出 → 整页出纵向滚动条,可滚到问题小区清单。移除原 `@media(<=1180px)` 里多余的 `height:auto/overflow` 覆盖(统一由主规则处理)。 +- 验证:后端 `py_compile` 通过;`frontend` `vue-tsc --noEmit` 通过。 diff --git a/frontend/src/components/CapacityDashboard.vue b/frontend/src/components/CapacityDashboard.vue index 233635d..a171d27 100644 --- a/frontend/src/components/CapacityDashboard.vue +++ b/frontend/src/components/CapacityDashboard.vue @@ -655,7 +655,7 @@ function applyPageHeader() { resetPageHeader(); return; } - setPageHeader({ subtitle: '高负荷小区分析 · 实时数据', actions: buildHeaderActions() }); + setPageHeader({ actions: buildHeaderActions() }); } watch([rat, ready], applyPageHeader); @@ -738,7 +738,8 @@ onBeforeUnmount(resetPageHeader); box-sizing: border-box; display: flex; flex-direction: column; - overflow: hidden; + /* 视口足够高时整页不滚动;过矮时出现纵向滚动条,保证能看到清单 */ + overflow-y: auto; padding: 14px 18px; color: var(--cap-text); background: var(--cap-bg); @@ -878,8 +879,8 @@ onBeforeUnmount(resetPageHeader); .cap-panel-head.sm { font-size: 12px; margin: 14px 0 8px; } .cap-panel-head .bar { width: 4px; height: 13px; border-radius: 2px; background: linear-gradient(180deg, #22d3ee, #818cf8); } -/* 清单:占据剩余高度,表体内部滚动(表头固定) */ -.cap-list { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding-bottom: 10px; } +/* 清单:占据剩余高度,表体内部滚动(表头固定);min-height 保证矮屏下不被压没、触发整页滚动 */ +.cap-list { flex: 1 1 0; min-height: 300px; display: flex; flex-direction: column; padding-bottom: 10px; } .cap-list-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; } .cap-list-head .cap-panel-head { margin-bottom: 0; } .cap-list-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } @@ -921,7 +922,6 @@ onBeforeUnmount(resetPageHeader); .cap-card-icon { width: 30px; height: 30px; font-size: 16px; } } @media (max-width: 1180px) { - .cap-dashboard { height: auto; min-height: calc(100vh - 64px); overflow: auto; } .cap-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cap-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cap-list { min-height: 360px; }