Files
one-pipe-system/openspec/changes/add-iot-device-operations/tasks.md
sexygoat de9753f42d
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m27s
fetch(modify):修复BUG
2026-02-03 14:39:45 +08:00

87 lines
3.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.
# Implementation Tasks
## 1. API Layer - IoT Card Operations
- [ ] 1.1 创建 `src/api/modules/iotCard.ts`
- [ ] 1.2 实现 `getGatewayFlow(iccid)` - 查询流量使用
- [ ] 1.3 实现 `getGatewayRealname(iccid)` - 查询实名状态
- [ ] 1.4 实现 `getGatewayStatus(iccid)` - 查询卡片状态
- [ ] 1.5 实现 `getRealnameLink(iccid)` - 获取实名链接
- [ ] 1.6 实现 `startCard(iccid)` - 启用卡片
- [ ] 1.7 实现 `stopCard(iccid)` - 停用卡片
## 2. API Layer - Device Operations
- [ ] 2.1 创建 `src/api/modules/device.ts`
- [ ] 2.2 实现 `rebootDevice(imei)` - 重启设备
- [ ] 2.3 实现 `resetDevice(imei)` - 重置设备
- [ ] 2.4 实现 `setSpeedLimit(imei, params)` - 设置限速
- [ ] 2.5 实现 `switchCard(imei, params)` - 切换SIM卡
- [ ] 2.6 实现 `setWifi(imei, params)` - 设置WiFi
## 3. Type Definitions - IoT Card
- [ ] 3.1 创建 `src/types/api/iotCard.ts`
- [ ] 3.2 定义流量使用响应类型 `GatewayFlowResponse`
- [ ] 3.3 定义实名状态响应类型 `GatewayRealnameResponse`
- [ ] 3.4 定义卡片状态响应类型 `GatewayStatusResponse`
- [ ] 3.5 定义实名链接响应类型 `RealnameUrlResponse`
- [ ] 3.6 定义启停操作请求类型 `StartStopCardRequest`
## 4. Type Definitions - Device
- [ ] 4.1 创建 `src/types/api/device.ts`
- [ ] 4.2 定义限速参数类型 `SpeedLimitParams`
- [ ] 4.3 定义换卡参数类型 `SwitchCardParams`
- [ ] 4.4 定义WiFi参数类型 `WifiParams`
- [ ] 4.5 定义操作响应类型 `DeviceOperationResponse`
## 5. UI - IoT Card Management Page
- [ ] 5.1 在表格操作列添加"查询流量"按钮
- [ ] 5.2 在表格操作列添加"更多操作"下拉菜单
- [ ] 5.3 创建"流量使用查询"对话框组件
- [ ] 5.4 创建"实名状态查询"对话框组件
- [ ] 5.5 创建"卡片状态查询"对话框组件
- [ ] 5.6 创建"获取实名链接"对话框组件(显示二维码)
- [ ] 5.7 实现"启用卡片"操作(带确认提示)
- [ ] 5.8 实现"停用卡片"操作(带确认提示)
## 6. UI - Device Management Page
- [ ] 6.1 在表格操作列添加"重启设备"按钮
- [ ] 6.2 在表格操作列添加"更多操作"下拉菜单
- [ ] 6.3 实现"重启设备"操作(带确认提示)
- [ ] 6.4 实现"重置设备"操作(带确认提示)
- [ ] 6.5 创建"设置限速"对话框组件(包含上下行速率输入)
- [ ] 6.6 创建"切换SIM卡"对话框组件(选择卡槽)
- [ ] 6.7 创建"设置WiFi"对话框组件SSID、密码、频段等
## 7. Error Handling & User Feedback
- [ ] 7.1 为所有API调用添加错误处理
- [ ] 7.2 添加操作成功提示消息
- [ ] 7.3 添加操作失败错误提示
- [ ] 7.4 添加加载状态指示器
## 8. Permission Control
- [ ] 8.1 检查IoT卡操作权限配置
- [ ] 8.2 检查设备操作权限配置
- [ ] 8.3 根据权限显示/隐藏操作按钮
## 9. Testing & Validation
- [ ] 9.1 测试所有IoT卡操作API调用
- [ ] 9.2 测试所有设备操作API调用
- [ ] 9.3 测试UI交互和对话框显示
- [ ] 9.4 测试错误处理场景
- [ ] 9.5 测试权限控制
- [ ] 9.6 验证响应数据格式和显示
## 10. Documentation
- [ ] 10.1 更新API文档如有需要
- [ ] 10.2 添加操作说明注释
- [ ] 10.3 更新用户手册(如有需要)