Refactor recurring investment preview and API response handling:

- Remove `executionDateTime` from the preview modal and update the display to show `nextExecutionDate` and `nextExecutionTime`.
- Adjust the API response structure for `next-execution` to align with the new fields.
- Implement loading indicators for the preview button and modal during data fetching.
- Update related documentation in `IMPACT_ANALYSIS.md` and `TASK_SUMMARY.md` for clarity on changes.
This commit is contained in:
justin
2026-10-12 09:22:00 +08:00
parent 57b026d7d0
commit cc90cc69e2
5 changed files with 80 additions and 23 deletions
+59
View File
@@ -837,3 +837,62 @@
### 5. 验证与测试
- `npm run build`;交易所切换、搜索、下拉滚动加载更多。
---
## 补充:下次执行预览移除执行时间行(2026-10-10)
### 1. 改动概览
- **背景与目标**:预览弹窗不再展示 `executionDateTime`(`recurring.previewExecutionDateTime`)。
- **涉及模块**:`RecurringInvestmentView.vue`。
- **改动类型**:界面调整。
### 2. 方法级改动分析
| 位置 | 差异 |
|------|------|
| 下次执行预览 `<dl>` | 删除 `executionDateTime` 的 `<dt>`/`<dd>`;接口数据仍可能返回该字段,仅不展示。 |
### 3. 调用方与影响范围
- 仅预览弹窗展示;**破坏性变更**:否。
### 4. 风险与回滚
- **风险级别**:低;**回滚方式是否简单**:是(恢复两行模板)。
### 5. 验证与测试
- 打开「下次执行」预览,确认无「执行时间」行,其余字段正常。
---
## 补充:下次执行预览接口字段与加载态(2026-10-12)
### 1. 改动概览
- **背景与目标**:`POST /trade/schedule-investment/plan/next-execution` 响应 `data` 调整为 `nextExecutionDate`、`nextExecutionTime`;预览弹窗同步展示;请求较慢时按钮与弹窗内展示 loading。
- **涉及模块**:`src/types/scheduleInvestment.ts`、`RecurringInvestmentView.vue`。
- **改动类型**:缺陷修复 / 界面调整。
### 2. 方法级改动分析
| 位置 | 差异 |
|------|------|
| `ScheduleInvestmentNextExecutionData` | 移除 `scheduledDate`、`executionDate`、`executionDateTime`、`deferred`、`ctOffsetMinutes`;改为 `nextExecutionDate`、`nextExecutionTime`。 |
| `openNextExecutionPreview` | 请求期间按钮 loading;数据返回后再打开弹窗。 |
| 预览弹窗模板 | 仅展示下次执行日、执行时间。 |
| 「预览下次执行」按钮 | `:loading="nextExecutionPreviewLoading"`。 |
### 3. 调用方与影响范围
- 仅创建表单预览流程;**破坏性变更**:是(依赖旧响应字段的前端逻辑已移除,与当前后端契约一致)。
### 4. 风险与回滚
- **风险级别**:低;**回滚方式是否简单**:是(恢复类型与模板)。
### 5. 验证与测试
- 填妥交易所与周期后点「预览下次执行」:按钮 loading、弹窗内 loading,成功后显示日期与时间;接口失败时弹窗关闭且已有错误提示。