1
0

refactor: 全面重构前端 Dashboard 为 TDesign + TanStack Query 分组表格布局

- 卡片式布局改为分组 PrimaryTable,Modal 改为 Drawer
- 手写 hooks 替换为 TanStack Query(轮询/缓存/条件查询)
- CSS 607行精简至73行,颜色迁移至 TDesign tokens
- 可用率进度条颜色按 10% 一档红→绿渐变
- 新增纯函数测试 34 项全通过(排序/筛选/色阶阈值)
- 同步更新主 specs 并归档变更文档
This commit is contained in:
2026-05-12 01:06:53 +08:00
parent 48b40238b8
commit f48e39a615
41 changed files with 1314 additions and 1302 deletions

View File

@@ -27,9 +27,9 @@ src/
shared/
api.ts 前后端共享 TypeScript 类型
web/ Vite + React 前端 Dashboard
components/ UI 组件(卡片、分组、模态框、状态条等)
constants/ 常量定义(类型映射等
hooks/ 数据轮询和详情管理 hooks
components/ UI 组件(表格、分组、Drawer、状态条等)
constants/ 常量定义(列配置、类型映射、排序/筛选/颜色阈值函数
hooks/ TanStack Query 数据层useTargetDetail 集成轮询/条件查询)
utils/ 前端工具函数
scripts/ 开发、构建和 smoke test 脚本
tests/ Bun test 测试