diff --git a/demo/topology_repair/final_explicit_time.png b/demo/topology_repair/final_explicit_time.png new file mode 100644 index 0000000..aa5e964 Binary files /dev/null and b/demo/topology_repair/final_explicit_time.png differ diff --git a/demo/topology_repair/final_ghc05_bottom.png b/demo/topology_repair/final_ghc05_bottom.png new file mode 100644 index 0000000..d8677aa Binary files /dev/null and b/demo/topology_repair/final_ghc05_bottom.png differ diff --git a/demo/topology_repair/final_ghc05_mid.png b/demo/topology_repair/final_ghc05_mid.png new file mode 100644 index 0000000..6060771 Binary files /dev/null and b/demo/topology_repair/final_ghc05_mid.png differ diff --git a/demo/topology_repair/final_ghc05_top.png b/demo/topology_repair/final_ghc05_top.png new file mode 100644 index 0000000..4c68502 Binary files /dev/null and b/demo/topology_repair/final_ghc05_top.png differ diff --git a/demo/topology_repair/final_invalid_time.png b/demo/topology_repair/final_invalid_time.png new file mode 100644 index 0000000..b65a60c Binary files /dev/null and b/demo/topology_repair/final_invalid_time.png differ diff --git a/demo/topology_repair/final_mobile_modal.png b/demo/topology_repair/final_mobile_modal.png new file mode 100644 index 0000000..a27d5f5 Binary files /dev/null and b/demo/topology_repair/final_mobile_modal.png differ diff --git a/demo/topology_repair/final_mobile_top.png b/demo/topology_repair/final_mobile_top.png new file mode 100644 index 0000000..59fc310 Binary files /dev/null and b/demo/topology_repair/final_mobile_top.png differ diff --git a/demo/topology_repair/mission_bl_01.png b/demo/topology_repair/mission_bl_01.png new file mode 100644 index 0000000..8644f5d Binary files /dev/null and b/demo/topology_repair/mission_bl_01.png differ diff --git a/demo/topology_repair/mission_bl_02.png b/demo/topology_repair/mission_bl_02.png new file mode 100644 index 0000000..2ce8b38 Binary files /dev/null and b/demo/topology_repair/mission_bl_02.png differ diff --git a/demo/topology_repair/mission_bl_03.png b/demo/topology_repair/mission_bl_03.png new file mode 100644 index 0000000..982cc7b Binary files /dev/null and b/demo/topology_repair/mission_bl_03.png differ diff --git a/demo/topology_repair/mission_ghc_01.png b/demo/topology_repair/mission_ghc_01.png new file mode 100644 index 0000000..1836bdd Binary files /dev/null and b/demo/topology_repair/mission_ghc_01.png differ diff --git a/demo/topology_repair/mission_ghc_02.png b/demo/topology_repair/mission_ghc_02.png new file mode 100644 index 0000000..26d7121 Binary files /dev/null and b/demo/topology_repair/mission_ghc_02.png differ diff --git a/demo/topology_repair/mission_ghc_03.png b/demo/topology_repair/mission_ghc_03.png new file mode 100644 index 0000000..a670522 Binary files /dev/null and b/demo/topology_repair/mission_ghc_03.png differ diff --git a/demo/topology_repair/mission_ghc_04.png b/demo/topology_repair/mission_ghc_04.png new file mode 100644 index 0000000..2e1d7dd Binary files /dev/null and b/demo/topology_repair/mission_ghc_04.png differ diff --git a/demo/topology_repair/mission_ghc_05.png b/demo/topology_repair/mission_ghc_05.png new file mode 100644 index 0000000..a1a8f1b Binary files /dev/null and b/demo/topology_repair/mission_ghc_05.png differ diff --git a/demo/topology_repair/mission_jc_01.png b/demo/topology_repair/mission_jc_01.png new file mode 100644 index 0000000..af6b2e7 Binary files /dev/null and b/demo/topology_repair/mission_jc_01.png differ diff --git a/demo/topology_repair/task6_core_modal.png b/demo/topology_repair/task6_core_modal.png new file mode 100644 index 0000000..ce4e637 Binary files /dev/null and b/demo/topology_repair/task6_core_modal.png differ diff --git a/docs/guanghan_topology_repair_verification_2026-07-09.md b/docs/guanghan_topology_repair_verification_2026-07-09.md new file mode 100644 index 0000000..685289a --- /dev/null +++ b/docs/guanghan_topology_repair_verification_2026-07-09.md @@ -0,0 +1,90 @@ +# 广寒基地拓扑页面修复与验收报告 + +日期:2026-07-09 +验收地址:`http://localhost:8080/guanghan_topology_demo.html?mission=GHC-05` + +## 修复结论 + +页面现已由 PostgreSQL 中的任务、事件、组件、连接关系和布局数据共同驱动,不再依赖写死的当前拓扑。任务选择、明确时间查询、浏览器前进/后退、模块详情弹窗、历史快照和错误提示均已修复并通过自动化与截图验收。 + +## 已修复项目 + +1. Flask 在 8080 端口同时提供页面与同源 API,移除前端写死的 5000 端口。 +2. 数据库密码不再包含于源码默认值;配置从 `.env` 读取。 +3. 增加数据库任务列表接口,任务选择器不再写死。 +4. 明确时间格式或时区无效时返回 JSON 400,页面保留当前拓扑并显示中文错误。 +5. 同时传入 `mission` 与 `at` 时按明确时间查询,同时保留任务上下文。 +6. 任务快照锚点与 Timeline 最后一条记录对齐。 +7. SVG 节点、结构连接、加压走道、燃料/供电线和散热器均由数据库快照及布局生成。 +8. GHC-05 空间骨架按确认结构实现: + - 核心舱为四向安装节点; + - 北、东、南、西分别为居住舱#2、实验舱、居住舱#1、温室模块; + - 居住舱#1经绿色加压走道连接电力模块北部模块; + - 温室模块经绿色加压走道连接吴刚二号; + - 电力模块四向模块及四块大型折叠散热面板完整显示; + - 冰轮一号、二号、三号分别位于电力模块西、南、东。 +9. 未来北、东、西扩展点只保留源码注释,不在当前画面显示。 +10. 修复长文本越界,节点标签按可用宽度适配。 +11. 模块弹窗改用安全文本节点填充,显示安装位置、状态、参数、尺寸、连接与任务节点。 +12. 弹窗关闭后恢复触发节点焦点,浏览器前进/后退可恢复对应快照。 +13. 补录现有资料可核验的载具尺寸与质量: + - 冰轮 Block 1:高 30.2 m,干重 25 t; + - 冰轮 Block 2:高 36.7 m,干重 28.194 t; + - 吴刚 Block 2:展开直径 11.2 m,干重 9.64 t,燃料罐直径 4.25 m。 + 其余缺乏可靠资料的尺寸继续显示“资料未记录”,未补造数据。 + +## 历史任务快照验收 + +| 任务 | 可视节点 | 连接线 | 加压走道 | 散热器 | 文字越界 | +|---|---:|---:|---:|---:|---:| +| BL-01 | 1 | 0 | 0 | 0 | 0 | +| GHC-01 | 2 | 0 | 0 | 0 | 0 | +| JC-01 | 2 | 0 | 0 | 0 | 0 | +| BL-02 | 3 | 0 | 0 | 0 | 0 | +| GHC-02 | 3 | 1 | 0 | 0 | 0 | +| GHC-03 | 7 | 5 | 0 | 3 | 0 | +| BL-03 | 8 | 5 | 0 | 3 | 0 | +| GHC-04 | 9 | 8 | 0 | 4 | 0 | +| GHC-05 | 14 | 13 | 2 | 4 | 0 | + +GHC-03 与之后的“可视节点”可包含多个数据库组件的组合显示节点,因此组件数量可能大于表中的可视节点数量。 + +## 自动化验证 + +执行: + +```powershell +.venv\Scripts\python.exe -m unittest tests.test_topology_api tests.test_guanghan_topology_demo tests.test_guanghan_topology_e2e -v +``` + +结果:19 项测试全部通过。 + +覆盖内容包括: + +- 同源页面/API 与安全配置; +- 任务列表、任务时间锚点、明确时间优先级及错误处理; +- 组件引入任务、尺寸、布局成员、散热器和冰轮接口方向; +- GHC-05 两条加压走道终点; +- 历史快照与 GHC-05 动态渲染; +- 任务选择、时间查询、浏览器历史、弹窗语义与焦点恢复。 + +## 截图证据 + +- `demo/topology_repair/final_ghc05_top.png` +- `demo/topology_repair/final_ghc05_mid.png` +- `demo/topology_repair/final_ghc05_bottom.png` +- `demo/topology_repair/final_mobile_top.png` +- `demo/topology_repair/final_mobile_modal.png` +- `demo/topology_repair/final_explicit_time.png` +- `demo/topology_repair/final_invalid_time.png` +- `demo/topology_repair/mission_*.png`(九个任务快照) + +## 运行说明 + +服务启动命令: + +```powershell +.venv\Scripts\python.exe -m topology_api.app +``` + +健康检查:`http://localhost:8080/health`