# movingmonitors **Repository Path**: deanying0114/movingmonitors ## Basic Information - **Project Name**: movingmonitors - **Description**: for moving stuff like monitors accessories, intuitive drag and drop assignment - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: cursor/add-stage1-prd - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-27 - **Last Updated**: 2026-07-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Moving Monitors 办公室搬迁:将旧办公室 / HP / 新采购的**显示器库存**,分配至新办公楼 **7F / 8F / 12F** 工位。 ## 技术栈 - 后端:Python + Django + Django REST Framework - 前端:Vue 3 + Vite - 数据库:SQLite ## 核心数据模型 | 对象 | 说明 | |---|---| | 工位 Seat | `floor_level + code + label`(新办公室座位/占用人) | | 显示器型号 MonitorModel | 矩阵列(如 Lenovo ThinkVision P24h-2L) | | 来源位置 InventoryLocation | 矩阵行(旧办房间 / HP / 采购批次) | | 库存格 InventoryStock | 行列交叉的**可用台数** | | 分配 Assignment | 从某库存格取 N 台放到某工位 | ## 分期 | 阶段 | 说明 | |---|---| | Stage 1 | 表格 + 拖拽分配(当前) | | Stage 2 | 叠加楼层平面图(签收后) | ## 文档 - [产品需求文档(PRD)](docs/PRD.md) - [运维说明(启动 / 安装 / 排查)](docs/OPS.md) - 初始数据:`seatplans/seats_current.csv`、`seatplans/monitors_current.csv` ## 本地启动 完整步骤见 **[docs/OPS.md](docs/OPS.md)**。日常最快启动: ```powershell # 终端 A — 后端 cd D:\coding_space\movingmonitors\backend python manage.py runserver 8000 # 终端 B — 前端 cd D:\coding_space\movingmonitors\frontend npm run dev -- --host 127.0.0.1 --port 5173 ``` 浏览器打开:http://127.0.0.1:5173/ ## CSV 导入 / 导出 | 类型 | 模板 | 当前数据 | |---|---|---| | 工位(清单) | `/api/templates/seats/` | `/api/export/seats/` | | 显示器(矩阵) | `/api/templates/monitors/` | `/api/export/monitors/` | 导入模式: - **新增(append)**:工位跳过已存在;矩阵在已有单元格上**累加**数量 - **全覆盖(replace)**:清空后按文件重建(会清空相关分配) **工位** ```csv floor_level,code,label 12,H12.01,Cheng Jingwen ``` **显示器矩阵**(型号为列,单元格为台数) ```csv code,label,Lenovo ThinkVision P24h-2L,Lenovo ThinkVision P24h-40 HKRI25F-0,Reception,2, HP01,HePing 01,3, NewPurchase,From JOS,,51 ``` 来源类别按 `code` 自动识别:`HKRI*`→旧办,`HP*`→HP,`NewPurchase`→新采购。