liuyun ff3b6c5042 docs(openspec): 护理员 APP Flutter change 提案
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 08:42:15 +08:00

31 lines
1.9 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 — nurse-app-flutter
## 1. 工程骨架
- [ ] 1.1 pubspec.yaml 加依赖:riverpod/flutter_riverpod、dio、sqflite、shared_preferences、go_router、path_provider、image_picker(拍照)、geolocator(定位)、crypto(md5)。
- [ ] 1.2 lib/core:api(dio 封装 + 统一响应解包 + token 拦截器)、db(sqflite 离线队列表)、router(go_router)、auth(token 存储)、theme。
## 2. 登录
- [ ] 2.1 登录页(租户/账号/密码)+ `POST /auth/login` + token 落 shared_preferences + go_router 跳今日任务。
## 3. M1 今日任务 + M2 服务执行
- [ ] 3.1 今日任务页:`GET /order/today` 卡片列表(老人/时段/项目/状态),点卡片进服务执行。
- [ ] 3.2 服务执行页:签到 `POST /record/checkin`(定位 geolocator + 自动时间,不传 checkin_time)→ 项目勾选 `POST /record/item/save`(默认全勾 done,exec_result 三态)→ 拍照 `POST /record/photo/upload`(image_picker + 压缩 ≤500KB + 必拍强制 + 压疮标签 + 拒拍出路)→ 签退 `POST /record/checkout`(必拍未拍前置校验 + 3001 提示)。
## 4. 异常上报 + 扑空
- [ ] 4.1 异常上报:9 宫格分类(必选)+ 描述/语音/照片(可选),`POST /abnormal`。
- [ ] 4.2 扑空:未遇按钮 → 到访时间(自动)/定位(自动)/原因(必选下拉),`POST /abnormal`(not_met)。
## 5. 离线队列
- [ ] 5.1 sqflite 离线队列表:签到/签退/勾项目/照片/异常本地落队 + client_md5(crypto)。
- [ ] 5.2 联网检测 + 自动补传 `POST /record/offline/sync`(md5 去重);照片本地暂存补传后保留 ≥7 天。
## 6. 验证
- [ ] 6.1 `flutter analyze` + `flutter test` 通过。
- [ ] 6.2 用 nurse01/TY20261015 冒烟:登录 → 今日任务 → 签到勾项目拍照签退 → 留痕 submitted;异常/扑空;断网补传。