Files
smart_grid_iot/.trae/specs/survey-detail-building-select/tasks.md
T
wk 7c915f8946 docs(specs): 新增现场勘察业务相关 spec 文档
- rework-survey-equipment-tree:勘察设备树明细模式重构
- fix-equipment-topology-display:设备拓扑图完整显示修复
- survey-detail-building-select:勘察明细所属建筑下拉
- generate-floor-options-from-building:按建筑楼层生成楼层下拉
- survey-progress-track-detail:进度跟踪跳转勘察明细页
- survey-complete-to-tech-review:勘察完成提交技术复核与复核按钮改名
2026-10-25 02:34:18 +08:00

27 lines
2.2 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.
# Tasks
## 勘察明细页设备表单改造(同一文件 `client/src/views/dispatch/survey/detail.vue`,串行完成)
- [x] Task 1: 两处表单模板 UI 改造
- [x] 1.1 右侧节点属性面板「设备信息」表单(约 L167-169):将「所在位置」替换为「所属建筑」下拉(`a-select`,`buildingId`,allow-clear)+「所在楼层」输入(`floorNo`)+「具体位置」输入(`location`)
- [x] 1.2 新增/编辑客户设备弹窗表单(约 L231-233):同样替换为「所属建筑」下拉 +「所在楼层」输入 +「具体位置」输入
- [x] Task 2: 表单数据模型与提交/回显逻辑
- [x] 2.1 `NodeForm`/`EquipForm` 接口与 `nodeForm`/`equipForm` 增加 `buildingId: number | null`、`floorNo: string` 字段
- [x] 2.2 `handleAddEquip`/`handleEditEquip` 初始化与回显 `buildingId`/`floorNo`
- [x] 2.3 `watch(selectedNode)` 回显 `buildingId`/`floorNo`/`location`
- [x] 2.4 `handleEquipSubmit`:新增(`CustomerEquipmentCreateParams`)与编辑 payload 增加 `buildingId`/`floorNo`
- [x] 2.5 `handleSaveNode`:patch 增加 `buildingId`/`floorNo`,并将变更判断条件加入 buildingId/floorNo 对比(否则修改建筑后不触发更新)
- [x] Task 3: 建筑下拉数据加载
- [x] 3.1 导入 `customerBuildingApi` 与 `CustomerBuildingInfo`;新增 `buildingOptions` ref(`{label: buildingName, value: id}`)与 `buildingLoading`
- [x] 3.2 新增 `loadBuildingOptions(customerId)`:调 `customerBuildingApi.getList({ customerId, page: 1, pageSize: 999 })`
- [x] 3.3 在 `loadOrder` 成功后与 `refreshTreeOnly` 时按 `order.value.customerId` 加载建筑选项(客户变更时刷新)
## 验证
- [x] Task 4: 编译 + 浏览器实测
- [x] 4.1 `client` 编译通过(`npm run check`,vue-tsc)
- [x] 4.2 浏览器实测:勘察明细页新增设备弹窗与右侧节点面板均显示「所属建筑」下拉(选项为该客户建筑)、「所在楼层」「具体位置」输入;新增保存成功、右侧面板编辑回显正确;设备管理台账页不受影响
# Task Dependencies
- Task 2 依赖 Task 1(表单字段先有,逻辑后挂)
- Task 3 依赖 Task 1(下拉数据源就绪后加载)
- Task 4 依赖 Task 1-3