diff --git a/docs/app/schedules.md b/docs/app/schedules.md index 50047ef..66765c4 100644 --- a/docs/app/schedules.md +++ b/docs/app/schedules.md @@ -8,7 +8,7 @@ description: 日课表、共享作息、轮换、临时换课和教学周。 Web 管理端统一从「教学事务 → 课表档案」查看周课表并编辑时间表与日课表,客户端提供“今天”时间轴和“本周”视图。 上课状态、灵动岛课程提醒和紧急通知确认共用服务端的课表判定。 -编辑工作区参照 [ClassIsland 档案编辑器](https://github.com/ClassIsland/ClassIsland/blob/master/ClassIsland/Views/ProfileSettingsWindow.axaml) 的布局与交互实现,使用独立的深色全屏工作区。顶部切换课表、时间表、科目和调课;默认以周网格展示课程,右侧提供科目简称面板,底部可切换列表、周和月视图。旧管理页地址 `/schedules` 自动进入同一工作区,点击「返回管理」回到管理端。 +编辑工作区参照 [ClassIsland 档案编辑器](https://github.com/ClassIsland/ClassIsland/blob/master/ClassIsland/Views/ProfileSettingsWindow.axaml) 的课表交互实现,作为管理端内的普通页面展示,沿用全站的导航、间距、控件及浅色/深色主题。顶部切换课表、时间表、科目和调课;默认以周网格展示课程,右侧提供科目简称面板,底部可切换列表、周和月视图。旧管理页地址 `/schedules` 自动进入同一页面,侧栏和顶部导航始终可用。 点击每天列头的「新课表」选择时间表并创建日课表。点击网格中的课时后可用右侧科目按钮快速填充,支持选择是否自动移动到下一节;方向键可移动焦点,Delete 可清空选中课程。课表名称、时间表、启用星期、轮换规则、生效周次与群组在「详细信息」中维护。 diff --git a/docs/screenshots/plan-editor-integrated-dark.png b/docs/screenshots/plan-editor-integrated-dark.png new file mode 100644 index 0000000..536ffee Binary files /dev/null and b/docs/screenshots/plan-editor-integrated-dark.png differ diff --git a/docs/screenshots/plan-editor-integrated-empty.png b/docs/screenshots/plan-editor-integrated-empty.png new file mode 100644 index 0000000..cb85145 Binary files /dev/null and b/docs/screenshots/plan-editor-integrated-empty.png differ diff --git a/docs/screenshots/plan-editor-integrated-layout.png b/docs/screenshots/plan-editor-integrated-layout.png new file mode 100644 index 0000000..653d7ca Binary files /dev/null and b/docs/screenshots/plan-editor-integrated-layout.png differ diff --git a/docs/screenshots/plan-editor-integrated-mobile.png b/docs/screenshots/plan-editor-integrated-mobile.png new file mode 100644 index 0000000..d56d53c Binary files /dev/null and b/docs/screenshots/plan-editor-integrated-mobile.png differ diff --git a/docs/screenshots/plan-editor-integrated-wide.png b/docs/screenshots/plan-editor-integrated-wide.png new file mode 100644 index 0000000..06a2518 Binary files /dev/null and b/docs/screenshots/plan-editor-integrated-wide.png differ diff --git a/docs/screenshots/plan-editor-integrated.png b/docs/screenshots/plan-editor-integrated.png new file mode 100644 index 0000000..44632b5 Binary files /dev/null and b/docs/screenshots/plan-editor-integrated.png differ diff --git a/packages/web-admin/src/views/PlanEditorView.vue b/packages/web-admin/src/views/PlanEditorView.vue index e6dcc40..41071f4 100644 --- a/packages/web-admin/src/views/PlanEditorView.vue +++ b/packages/web-admin/src/views/PlanEditorView.vue @@ -2,7 +2,7 @@ import type { ActiveClassPlanWeekDto as ContractActiveClassPlanWeekDto } from '@classhelper/shared'; import { computed, onMounted, onUnmounted, ref, watch } from 'vue'; -import { onBeforeRouteLeave, useRouter } from 'vue-router'; +import { onBeforeRouteLeave } from 'vue-router'; import { ElMessage, ElMessageBox } from 'element-plus'; import { TIME_POINT_TYPES, @@ -23,7 +23,6 @@ import ArchiveIcon from '@/components/ArchiveIcon.vue'; import { useAuthStore } from '@/stores/auth'; import ClassPlanImportDialog from '@/components/ClassPlanImportDialog.vue'; const auth = useAuthStore(); -const router = useRouter(); const realtime = useRealtimeStore(); const importVisible = ref(false), search = ref(''), @@ -462,7 +461,6 @@ function dragEnd() { target = ''; } onMounted(async () => { - document.documentElement.classList.add('archive-editor-open'); window.addEventListener('beforeunload', beforeUnload); window.addEventListener('keydown', onShortcut); realtime.on(SOCKET_EVENTS.scheduleUpdated, onScheduleUpdated); @@ -480,7 +478,6 @@ onMounted(async () => { } }); onUnmounted(() => { - document.documentElement.classList.remove('archive-editor-open'); loadRequest++; window.removeEventListener('beforeunload', beforeUnload); window.removeEventListener('keydown', onShortcut); @@ -820,12 +817,6 @@ async function changeClass(value: string) { loading.value = false; } } -async function onClassSelection(event: Event) { - const input = event.target as HTMLSelectElement; - const next = input.value; - input.value = classId.value; - await changeClass(next); -} async function refresh() { if (!(await confirmDiscard())) return; clearDrafts(); @@ -869,9 +860,6 @@ function onShortcut(event: KeyboardEvent) { function onScheduleUpdated() { if (!saving.value) void load(); } -async function leaveEditor() { - await router.push('/dashboard'); -} function openDetails() { if (plan.value) detailsVisible.value = true; } @@ -881,74 +869,38 @@ function selectPlanItem(id: string) { }