diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index ca6fa2c..059261d 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -249,6 +249,7 @@ } } + /* 超管端主区域:与教师端一致改浅色(body.teacher-light-mode 时),保留暗色作为无亮色主题时的兜底 */ .platform-admin-main { height: calc(100vh - 50px); overflow: auto !important; @@ -270,6 +271,22 @@ } } + /* @at-root 跳出 #app 并提升特异性(压过 #app .platform-admin-main 的 ID 权重深色规则) */ + @at-root body.teacher-light-mode #app .platform-admin-main { + background: + radial-gradient(circle at 12% 18%, rgba(30, 136, 229, 0.05), transparent 34%), + radial-gradient(circle at 78% 6%, rgba(66, 165, 245, 0.04), transparent 28%), + linear-gradient(135deg, #f7fafd 0%, #eef4fb 48%, #f5f8fc 100%) !important; + + &::-webkit-scrollbar-track { + background: rgba(30, 60, 100, 0.06); + } + + &::-webkit-scrollbar-thumb { + background: rgba(59, 130, 246, 0.35); + } + } + .studentLayout, .teacherLayout { background: radial-gradient(circle at 10% 20%, rgba(11, 42, 74, 0.74), transparent 34%), radial-gradient(circle at 88% 8%, rgba(0, 136, 210, 0.24), transparent 28%), linear-gradient(135deg, #02050c 0%, #07101d 52%, #02060d 100%); diff --git a/src/assets/styles/teacher-light.scss b/src/assets/styles/teacher-light.scss index 72d5aea..42c9742 100644 --- a/src/assets/styles/teacher-light.scss +++ b/src/assets/styles/teacher-light.scss @@ -2956,3 +2956,28 @@ body.student-light-mode { font-weight: 600; } } + +/* ============================================================= + * 超管工作台(views/index.vue 引入 admin-theme.scss 的暗色按钮) + * 在浅色模式下改为主题蓝实心白字;#app 前缀压过教师端 outline 规则 + * ============================================================= */ +body.teacher-light-mode #app .school-admin-workbench .el-button--primary, +body.teacher-light-mode #app .school-admin-workbench .el-button--success { + background: #2563eb !important; + border-color: #2563eb !important; + color: #ffffff !important; + box-shadow: 0 1px 2px rgba(37, 99, 235, 0.35) !important; + + &:hover, + &:focus { + background: #1d4ed8 !important; + border-color: #1d4ed8 !important; + color: #ffffff !important; + } + + &.is-disabled { + background: #93c5fd !important; + border-color: #93c5fd !important; + color: #ffffff !important; + } +} diff --git a/src/layout/index.vue b/src/layout/index.vue index 69ceb26..a1906cb 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -33,14 +33,14 @@ const fixedHeader = computed(() => settingsStore.fixedHeader); const useTopNavbarOnly = computed(() => role.value === 1 || role.value === 2); // 教师端纯白极简:顶部标题栏与内容区同一画布;学生端墨黑 -const titleBgColor = computed(() => (role.value === 3 ? "#ffffff" : role.value === 4 ? "#1f2937" : "#072048")); +const titleBgColor = computed(() => (role.value === 3 || role.value === 1 ? "#ffffff" : role.value === 4 ? "#1f2937" : "#072048")); const classObj = computed(() => ({ hideSidebar: !sidebar.value.opened, openSidebar: sidebar.value.opened, withoutAnimation: sidebar.value.withoutAnimation, mobile: device.value === "mobile", - teacherLayout: role.value === 3, + teacherLayout: role.value === 3 || role.value === 1, studentLayout: role.value !== 1 && role.value !== 2 && role.value !== 3, })); @@ -68,11 +68,12 @@ function setLayout() { settingRef.value.openSetting(); } -// 教师端亮色模式标识:挂在 body 上,使 teleport 到 body 的弹层(下拉、日期选择器、弹窗等)也能命中亮色样式 +// 亮色模式标识:挂在 body 上,使 teleport 到 body 的弹层(下拉、日期选择器、弹窗等)也能命中亮色样式 +// 平台管理员(超管端)与教师共用同一套浅色主题 const TEACHER_LIGHT_CLASS = "teacher-light-mode"; const STUDENT_LIGHT_CLASS = "student-light-mode"; watchEffect(() => { - if (role.value === 3) { + if (role.value === 3 || role.value === 1) { document.body.classList.add(TEACHER_LIGHT_CLASS); document.body.classList.remove(STUDENT_LIGHT_CLASS); } else if (role.value === 4) { diff --git a/src/views/index.vue b/src/views/index.vue index 5128a5d..b2eb471 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -7,18 +7,18 @@ - - + + - + - - + + @@ -28,7 +28,7 @@ - +
@@ -43,7 +43,7 @@
- + @@ -51,12 +51,12 @@
- +
- + @@ -68,7 +68,7 @@
- + @@ -127,7 +127,7 @@
- + @@ -138,7 +138,7 @@
- + @@ -174,7 +174,7 @@
- + @@ -215,7 +215,7 @@
- + @@ -331,8 +331,8 @@ const schoolAdminLinks = [ align-items: center; justify-content: center; border-radius: 10px; - background: rgba(0, 170, 255, 0.1); - border: 1px solid rgba(0, 170, 255, 0.2); + background: #e5e7eb; + border: 1px solid #e5e7eb; } .admin-badge { @@ -377,14 +377,14 @@ const schoolAdminLinks = [ align-items: center; justify-content: center; border-radius: 14px; - background: rgba(0, 170, 255, 0.12); - border: 1px solid rgba(0, 170, 255, 0.25); - color: #00aaff; + background: #eff6ff; + border: 1px solid #dbeafe; + color: #2563eb; &.teacher { - background: rgba(255, 107, 53, 0.12); - border-color: rgba(255, 107, 53, 0.25); - color: #ff6b35; + background: rgba(234, 88, 12, 0.08); + border-color: rgba(234, 88, 12, 0.25); + color: #ea580c; } } @@ -434,13 +434,13 @@ const schoolAdminLinks = [ gap: 14px; padding: 18px; border-radius: 12px; - background: rgba(0, 35, 55, 0.44); - border: 1px solid rgba(0, 170, 255, 0.18); + background: #ffffff; + border: 1px solid #e5e7eb; transition: all 0.2s; &:hover { - border-color: rgba(0, 170, 255, 0.4); - background: rgba(0, 35, 55, 0.6); + border-color: #3b82f6; + background: #f9fafb; } } @@ -451,22 +451,22 @@ const schoolAdminLinks = [ align-items: center; justify-content: center; border-radius: 12px; - background: rgba(0, 170, 255, 0.12); - border: 1px solid rgba(0, 170, 255, 0.2); + background: #eff6ff; + border: 1px solid #e5e7eb; &.accent { - background: rgba(255, 107, 53, 0.12); - border-color: rgba(255, 107, 53, 0.2); + background: rgba(234, 88, 12, 0.08); + border-color: rgba(234, 88, 12, 0.25); } &.success { - background: rgba(0, 255, 157, 0.1); - border-color: rgba(0, 255, 157, 0.2); + background: rgba(43, 164, 113, 0.1); + border-color: rgba(43, 164, 113, 0.3); } &.warning { - background: rgba(255, 190, 0, 0.1); - border-color: rgba(255, 190, 0, 0.2); + background: rgba(232, 163, 61, 0.12); + border-color: rgba(232, 163, 61, 0.3); } } @@ -479,14 +479,14 @@ const schoolAdminLinks = [ .stat-value { font-size: 24px; font-weight: 700; - color: #f7fbff; + color: #1f2937; line-height: 1.2; font-family: "JetBrains Mono", "SF Mono", monospace; } .stat-label { font-size: 13px; - color: rgba(221, 236, 255, 0.6); + color: #6b7280; margin-top: 2px; } @@ -500,13 +500,13 @@ const schoolAdminLinks = [ border-radius: 6px; &.up { - color: #00ff9d; - background: rgba(0, 255, 157, 0.1); + color: #2ba471; + background: rgba(43, 164, 113, 0.1); } &.down { - color: #ff6b35; - background: rgba(255, 107, 53, 0.1); + color: #ea580c; + background: rgba(234, 88, 12, 0.08); } } @@ -527,13 +527,13 @@ const schoolAdminLinks = [ gap: 14px; padding: 14px; border-radius: 10px; - background: rgba(0, 35, 55, 0.3); - border: 1px solid rgba(0, 170, 255, 0.1); + background: #ffffff; + border: 1px solid #e5e7eb; transition: all 0.2s; &:hover { - background: rgba(0, 35, 55, 0.5); - border-color: rgba(0, 170, 255, 0.2); + background: #f9fafb; + border-color: #e5e7eb; } } @@ -545,18 +545,18 @@ const schoolAdminLinks = [ flex-shrink: 0; &.school { - background: #00aaff; - box-shadow: 0 0 8px rgba(0, 170, 255, 0.5); + background: #2563eb; + box-shadow: 0 0 8px rgba(37, 99, 235, 0.35); } &.teacher { - background: #ff6b35; - box-shadow: 0 0 8px rgba(255, 107, 53, 0.5); + background: #ea580c; + box-shadow: none; } &.success { - background: #00ff9d; - box-shadow: 0 0 8px rgba(0, 255, 157, 0.5); + background: #2ba471; + box-shadow: none; } } @@ -567,17 +567,17 @@ const schoolAdminLinks = [ .activity-text { margin: 0 0 4px; font-size: 14px; - color: #dceeff; + color: #374151; line-height: 1.4; strong { - color: #00aaff; + color: #2563eb; font-weight: 600; } } .activity-time { font-size: 12px; - color: rgba(221, 236, 255, 0.5); + color: #9ca3af; } diff --git a/src/views/schoolAdmin/trainingTask/index.vue b/src/views/schoolAdmin/trainingTask/index.vue index ecb29c9..f57d665 100644 --- a/src/views/schoolAdmin/trainingTask/index.vue +++ b/src/views/schoolAdmin/trainingTask/index.vue @@ -6,23 +6,23 @@ - - - + + + - - - - + + + +
- - + +
@@ -139,16 +139,16 @@ >
- + - + - + - +
@@ -203,7 +203,7 @@