From 0f10467ebbc43a54ce277960d7beee11ed3c0b15 Mon Sep 17 00:00:00 2001 From: wanghu Date: Tue, 20 Oct 2026 16:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/module/classroom.ts | 2 +- src/types/classroom.ts | 2 +- src/views/classroom/ClassroomManage.vue | 175 +++++++++++++++++------- 3 files changed, 127 insertions(+), 52 deletions(-) diff --git a/src/api/module/classroom.ts b/src/api/module/classroom.ts index 1845607..7259de4 100644 --- a/src/api/module/classroom.ts +++ b/src/api/module/classroom.ts @@ -193,7 +193,7 @@ class ClassroomApi { floors(buildingId: number) { return get(`${CLASSROOM}/Floors`, { buildingId }); } - /** 全校教室扁平列表(空间筛选树数据源,轻量字段) */ + /** 全校教室扁平列表(楼层筛选树数据源,轻量字段) */ tree() { return get(`${CLASSROOM}/Tree`); } diff --git a/src/types/classroom.ts b/src/types/classroom.ts index b3ce7ae..5ad0ef2 100644 --- a/src/types/classroom.ts +++ b/src/types/classroom.ts @@ -114,7 +114,7 @@ export interface Classroom { headTeacher?: string | null; } -/** 空间筛选树数据行(classroom/Tree 返回的轻量教室行,前端按 校区→楼栋→楼层 组树) */ +/** 楼层筛选树数据行(classroom/Tree 返回的轻量教室行,前端按 校区→楼栋→楼层 组树) */ export interface ClassroomTreeRow { serID: number; campusId: number; diff --git a/src/views/classroom/ClassroomManage.vue b/src/views/classroom/ClassroomManage.vue index a55d13e..a3a0a72 100644 --- a/src/views/classroom/ClassroomManage.vue +++ b/src/views/classroom/ClassroomManage.vue @@ -23,7 +23,7 @@ const GRADE_LABELS: Record = { 1: "高一", 2: "高二", 3: "高 /** * 教室管理(核心页)· 三栏布局 * - * 信息层级:左侧「空间筛选」树(校区→楼栋→楼层→教室,点击节点即切换列表作用域) + * 信息层级:左侧「楼层筛选」树(校区→楼栋→楼层→教室,点击节点即切换列表作用域) * → 中间教室列表(搜索 / 筛选 / 排序 / 分页 / 多选批量操作 / 批量导出) * → 右侧选中教室的详情面板(字段 + 布局示意图 + 编辑入口)。 * @@ -911,10 +911,10 @@ onMounted(async () => { @@ -1132,41 +1150,49 @@ onMounted(async () => { - - - - -
+
+ + + + + + +
+
@@ -1241,7 +1267,7 @@ onMounted(async () => {
状态 - + {{ focusRoom.status === "open" ? "开放" : "关闭" }} @@ -1502,7 +1528,7 @@ onMounted(async () => { white-space: nowrap; } -/* ============================ 空间筛选树 ============================ */ +/* ============================ 楼层筛选树 ============================ */ .cm-tree__body { flex: 1 1 auto; overflow: auto; @@ -1605,6 +1631,12 @@ onMounted(async () => { .ivu-icon { font-size: 15px; } + + > svg { + display: block; + width: 15px; + height: 15px; + } } .tree-icon--campus { @@ -1686,19 +1718,21 @@ onMounted(async () => { } } -.tree-dot { +.tree-door { flex: none; - width: 7px; - height: 7px; - border-radius: 50%; - margin: 0 3px; + display: inline-flex; + width: 13px; + height: 13px; + color: var(--ac-success); - &.is-open { - background: var(--ac-success); + > svg { + display: block; + width: 13px; + height: 13px; } &.is-closed { - background: var(--ac-danger); + color: var(--ac-text-disabled); } } @@ -1851,6 +1885,47 @@ onMounted(async () => { padding: 0 10px; } +.cm-table-wrap { + position: relative; +} + +/* 表格加载层:v-show 直接切 display,不依赖过渡结束;pointer-events 置空, + 即使常驻也不会拦截行内按钮/状态标签的点击 */ +.cm-table-loading { + position: absolute; + inset: 0; + z-index: 8; + display: flex; + align-items: center; + justify-content: center; + gap: 8px; + background: rgba(255, 255, 255, 0.72); + color: var(--ac-text-secondary); + font-size: 13px; + pointer-events: none; +} + +.cm-table-loading__dot { + width: 8px; + height: 8px; + border-radius: 50%; + background: var(--ac-primary); + animation: cm-loading-blink 0.9s ease-in-out infinite; +} + +@keyframes cm-loading-blink { + 0%, + 100% { + opacity: 0.25; + transform: scale(0.8); + } + + 50% { + opacity: 1; + transform: scale(1); + } +} + .status-toggle { display: inline-flex; cursor: pointer;