Files
smart_grid_iot/.trae/specs/survey-complete-to-tech-review/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

30 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.
# Tasks
## 后端状态流转接口
- [x] Task 1: 新增「勘察完成」接口
- [x] 1.1 `server/src/service/survey_order.service.ts` 新增 `complete(id, ctx)`:查工单 → 可见性校验(沿用 `isOrderVisible`)→ 仅 `STATUS.SURVEYING(1)` 可流转,将 `status` 更新为 `STATUS.PENDING_REVIEW(2)` → 返回 VO(`toVO` + `decorate`)→ 写审计日志(`logAction`,操作名「勘察派单」、动作「勘察完成」)
- [x] 1.2 `server/src/controller/survey_order.controller.ts` 新增 `@Put("/:id/complete")` 路由(须在 `@Get("/:id")` 等动态路由声明之后追加,放在 review 旁即可)
- [x] 1.3 `client/src/api/surveyOrder.ts` 新增 `complete(id: number) => request.put('/survey-orders/' + id + '/complete')`
## 勘察明细页按钮
- [x] Task 2: detail.vue 新增「勘察完成」按钮
- [x] 2.1 头部操作区(「保存勘察明细」旁)新增「勘察完成」按钮,仅 `order.status === SURVEY_STATUS.SURVEYING` 时显示,样式与「保存勘察明细」区分(如 dashed/带图标)
- [x] 2.2 点击弹 `Modal.confirm`(标题如「确认勘察完成?」、说明「将保存当前勘察明细并提交技术复核」)→ 确认后先执行现有保存明细逻辑(复用 `handleSaveAll`)→ 保存成功后调用 `surveyOrderApi.complete(order.id)` → 成功 `message.success` 并 `router.push('/dispatch/survey')` 跳回台账页
- [x] 2.3 校验:非「现场勘察中」状态不渲染该按钮;按钮加载态防重复提交
## 台账复核按钮改名
- [x] Task 3: 「审核测绘成果」→「技术复核」
- [x] 3.1 `index.vue` `primaryAction` 中 `{ label: '审核测绘成果' }` 改为 `{ label: '技术复核' }`
- [x] 3.2 复核弹窗标题 `title="审核测绘成果"` 改为 `title="技术复核"`;`handlePrimary` 中 `action.label === '审核测绘成果'` 判断同步改为 `'技术复核'`
## 验证
- [x] Task 4: 编译 + 接口/浏览器验证
- [x] 4.1 `server` TypeScript 编译通过(npm run build 或 tsc,视项目脚本而定)
- [x] 4.2 `client` 编译通过(`npm run check`,vue-tsc)
- [x] 4.3 浏览器实测(可选,用现有数据不写库):勘察明细页「勘察完成」按钮仅勘察中状态显示、点击出现确认框;台账页「技术复核」按钮文字与弹窗标题正确
# Task Dependencies
- Task 2 依赖 Task 1(complete 接口)
- Task 3 独立于 Task 1/2
- Task 4 依赖 Task 1、2、3