From 22d5d21c1f2423fa909fabfa0cd5cf532cbb3ac8 Mon Sep 17 00:00:00 2001 From: Nexus Agent Date: Mon, 8 Jun 2026 11:49:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(schedules):=20=E5=8D=95=E6=AC=A1=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E3=80=8C=E5=BD=93=E5=A4=A9=E3=80=8D=E3=80=81=E6=94=B6?= =?UTF-8?q?=E7=AA=84=E9=87=8D=E5=A4=8D=E6=96=B9=E5=BC=8F=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 单次执行不再出现「重复方式」;「每天」改为「当天」;循环模式下拉宽度收窄。 Co-authored-by: Cursor --- ...-06-08-schedule-cycle-day-label-once-ui.md | 41 ++++++++++ ...-06-08-schedule-cycle-day-label-once-ui.md | 26 +++++++ .../schedules/ScheduleCyclePicker.vue | 78 +++++++++++++++---- frontend/src/pages/SchedulesPage.vue | 2 +- frontend/src/utils/scheduleCycle.ts | 4 +- server/utils/schedule_cycle.py | 2 +- tests/test_schedule_cycle.py | 2 +- 7 files changed, 133 insertions(+), 22 deletions(-) create mode 100644 docs/audit/2026-06-08-schedule-cycle-day-label-once-ui.md create mode 100644 docs/changelog/2026-06-08-schedule-cycle-day-label-once-ui.md diff --git a/docs/audit/2026-06-08-schedule-cycle-day-label-once-ui.md b/docs/audit/2026-06-08-schedule-cycle-day-label-once-ui.md new file mode 100644 index 00000000..3a0ca20c --- /dev/null +++ b/docs/audit/2026-06-08-schedule-cycle-day-label-once-ui.md @@ -0,0 +1,41 @@ +# 审计 — 调度周期「当天」文案与单次 UI(2026-06-08) + +**Changelog**: `docs/changelog/2026-06-08-schedule-cycle-day-label-once-ui.md` + +## 审计范围 + +| 模块 | 文件 | +|------|------| +| 周期工具 | `frontend/src/utils/scheduleCycle.ts` | +| 选择器 | `frontend/src/components/schedules/ScheduleCyclePicker.vue` | +| 调度页 | `frontend/src/pages/SchedulesPage.vue` | +| 后端镜像 | `server/utils/schedule_cycle.py` | +| 单测 | `tests/test_schedule_cycle.py` | + +## 安全 + +| 项 | 结论 | +|----|------| +| 无新 API | PASS — 仅文案与 UI 布局 | +| Cron 逻辑 | PASS — 未改 build/parse 规则 | +| 鉴权 | PASS — 无变更 | + +## Step 3 + +| H | 规则 | 结论 | +|---|------|------| +| H1 | 单次不显示「重复方式」 | PASS — singleShot 固定「当天」 | +| H2 | 循环保留下拉 | PASS — 宽度 7.5rem | +| H3 | 标签「当天」 | PASS — 前后端 + 单测一致 | + +## Closure + +| H | 判定 | +|---|------| +| H1–H3 | PASS | + +## DoD + +- [x] pytest tests/test_schedule_cycle.py +- [x] frontend vite build +- [x] changelog diff --git a/docs/changelog/2026-06-08-schedule-cycle-day-label-once-ui.md b/docs/changelog/2026-06-08-schedule-cycle-day-label-once-ui.md new file mode 100644 index 00000000..7258f8c2 --- /dev/null +++ b/docs/changelog/2026-06-08-schedule-cycle-day-label-once-ui.md @@ -0,0 +1,26 @@ +# 2026-06-08 — 调度周期:当天文案与单次 UI + +## 摘要 + +- 「每天」改为「当天」(列表预览同步) +- 单次执行:固定显示「当天 + 时:分」,不再出现「重复方式」下拉 +- 循环执行:保留「重复方式」下拉,宽度收窄(约 7.5rem) + +## 动机 + +用户反馈「每天」窗口过宽、语义应为当天;单次不应标注「重复方式」。 + +## 涉及文件 + +- `frontend/src/components/schedules/ScheduleCyclePicker.vue` +- `frontend/src/utils/scheduleCycle.ts` +- `server/utils/schedule_cycle.py` +- `tests/test_schedule_cycle.py` +- `frontend/src/pages/SchedulesPage.vue` + +## 验证 + +```bash +pytest tests/test_schedule_cycle.py -q +cd frontend && npm run build +``` diff --git a/frontend/src/components/schedules/ScheduleCyclePicker.vue b/frontend/src/components/schedules/ScheduleCyclePicker.vue index b7081f7b..3c4163e9 100644 --- a/frontend/src/components/schedules/ScheduleCyclePicker.vue +++ b/frontend/src/components/schedules/ScheduleCyclePicker.vue @@ -3,8 +3,10 @@
开始执行周期
- + + 当天 - +