Files
zkxw/docs/superpowers/specs/2026-05-15-operations-support-design.md
T
2026-05-17 08:36:37 +08:00

49 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 运营支撑模块设计规格
## 概述
实现需求文档 2.4 节中运营支撑下的三个子模块:洁净室管理、库位管理、展馆预约。
新增一级菜单【运营支撑】,下设三个二级菜单。
## SQL 表(已存在,无需新建)
1. `biz_clean_room` - 洁净室信息(编号、名称、等级A/B/C/D、状态正常/异常、面积)
2. `biz_clean_room_access_log` - 洁净室人员进出(人员、部门、进入时间、目的、离开时间、体温)
3. `biz_storage_facility` - 细胞存储设施树节点(树形结构:parent_id, node_name, node_type, is_leaf)
4. `biz_storage_facility_slot` - 存储位置格子(叶子节点下的小方格)
5. `biz_exhibition_appointment` - 展馆预约(预约编号、来访单位、联系人、到访日期、人数、接待人员)
## 模块设计
### 模块 1: 洁净室管理
- **类型**: 标准列表 + 子表模式
- **后端**: Model + CRUD (`clean_room.py`) + API 路由
- **前端**: 参照 `system/unit/index.vue`,增加"人员进出"按钮弹窗查看进出记录
- **路由**: `/operations/clean-room`
- **API**: `/web/admin/clean-rooms` + `/web/admin/clean-room-access-logs`
### 模块 2: 库位管理
- **类型**: 树形结构模式
- **后端**: Model + CRUD (`storage_facility.py`) + API 路由(树查询 + 节点 CRUD + 格子 CRUD)
- **前端**: 参照 `system/category/index.vue`,左侧树形结构,右侧节点详情+格子列表
- **路由**: `/operations/storage-facility`
- **API**: `/web/admin/storage-facilities` + `/web/admin/storage-facility-slots`
- **工具**: 使用 `tree-path.ts` 构建完整路径
### 模块 3: 展馆预约
- **类型**: 标准列表模式
- **后端**: Model + CRUD (`exhibition_appointment.py`) + API 路由
- **前端**: 参照 `system/unit/index.vue` 标准列表
- **路由**: `/operations/exhibition-appointment`
- **API**: `/web/admin/exhibition-appointments`
## 技术规范
- 后端模式:flat 函数式 CRUD(参照 `app/crud/item_unit.py`),不用 service 层
- 前端模式:API 函数加入 `admin.ts`,路由加入 `sqxp.ts`
- 所有查询带 `tenant_no` 过滤,删除为软删除
- Fresh Mint 配色 (`--primary #10b981`)
- 树形模块使用 `tree-path.ts` 工具
## 实施顺序
1. 后端:Models → CRUD → API 路由 → 注册
2. 前端:API 函数 → 路由 → 页面组件
3. 测试:API 验证 + 页面功能验证