Files
Nexus/docs/changelog/2026-06-08-schedule-server-category-picker.md
T
2026-07-08 22:31:31 +08:00

32 lines
1.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.
# 调度页目标服务器按分类选择
**日期**: 2026-06-08
## 变更摘要
调度新建/编辑表单中的「目标服务器」由 `v-select` 多选下拉,改为复用 `ServerCategoryPicker` 组件,支持按分类分组、分类全选、全选与搜索。
## 动机
与脚本页、推送等批量操作一致,2000+ 子机场景下按分类勾选比扁平下拉更易用。
## 涉及文件
- `frontend/src/pages/SchedulesPage.vue` — 接入 `ServerCategoryPicker``loadServers({ all: true })` 拉全量含 `category`
## 迁移 / 重启
- 仅前端静态资源,无需 DB 迁移或 API 重启
## 验证方式
1. `cd frontend && npm run build`
2. 打开 `#/schedules` → 新建/编辑 → 确认分组卡片、全选、分类全选、搜索可用
3. 保存后 `server_ids` JSON 与原先一致
## 2026-06-08 补充 — 保存失败无提示修复
- 目标服务器改用独立 `editorServerIds` ref(与脚本页一致),修复嵌套 `form.server_ids` v-model 不同步导致「已选 N 台」但提交为空
- 对话框内增加红色 `saveError` 提示;全局 snackbar 提高 z-index,避免被 dialog 遮挡
- `formatApiError` / `normalizeDetail` / `useSnackbar` 禁止空字符串提示