feat(后台): 侧栏分组带图标、可收起,加顶栏;所有后台页面统一页头
Deploy / deploy (push) Canceled after 0s

- 侧栏按 概览 / 教学内容 / 学情分析 / 站点管理 分组,去掉超管菜单里的重复项;
  菜单项的角色与路由守卫一一对应,没有题目权限的教师不再看到点了就被踢回首页的「题目」
- 顶栏:面包屑、回到前台、明暗切换、用户菜单(退出登录);窄屏侧栏自动收起
- 新增 PageHeader:标题 + 右侧主操作 + 下方筛选栏,编辑页带返回按钮
- 卡点分析 / 年度趋势 / 标签管理从题目列表的按钮挪进侧栏
- 首页改成统计卡片 + 班级排名卡片;设置页按钮移到卡片右上角
- 题目、比赛、题单、用户列表的「选项」列固定在右侧,不再被挤出屏幕

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-09-27 19:54:42 +08:00
1 parent d25b5dbe6d
commit d3823430f9
25 files changed
+764 -587

No files matched your search

+25 -26
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
import PageHeader from "admin/components/PageHeader.vue"
import { TUTORIAL_READ_SECONDS } from "@oj2/contract"
import { NProgress, NTag, NText } from "naive-ui"
import { getLearnStudents, getLearnTutorials, getLearnExercises } from "admin/api"
@@ -357,33 +358,31 @@ onMounted(load)
</script>
<template>
<h2 style="margin-top: 0">自学情况</h2>
<n-flex align="center" style="margin-bottom: 16px">
<n-radio-group v-model:value="type" size="small">
<n-radio-button
v-for="item in typeOptions"
:key="item.value"
:value="item.value"
:label="item.label"
<!-- 口径写在表上方,免得老师对着「已读 0 课 / 累计 25 分钟」猜是不是坏了 -->
<PageHeader
title="自学情况"
:description="`「已读」按累计停留满 ${TUTORIAL_READ_SECONDS / 60} 分钟算,不足的只计时长`"
>
<template #filters>
<n-radio-group v-model:value="type" size="small">
<n-radio-button
v-for="item in typeOptions"
:key="item.value"
:value="item.value"
:label="item.label"
/>
</n-radio-group>
<n-input
v-model:value="className"
placeholder="班级或年级,如 241 / 24"
clearable
style="width: 200px"
@keyup.enter="load"
@clear="load"
/>
</n-radio-group>
<n-input
v-model:value="className"
placeholder="班级或年级,如 241 / 24"
clearable
style="width: 200px"
@keyup.enter="load"
@clear="load"
/>
<n-button type="primary" secondary @click="load">查询</n-button>
<n-text depth="3"> {{ studentCount }} 名学生,{{ startedCount }} 人已经开始学 </n-text>
<!-- 口径写在表上方,免得老师对着「已读 0 课 / 累计 25 分钟」猜是不是坏了 -->
<n-text depth="3" style="font-size: 12px">
「已读」按累计停留满
{{ TUTORIAL_READ_SECONDS / 60 }} 分钟算,不足的只计时长
</n-text>
</n-flex>
<n-button type="primary" secondary @click="load">查询</n-button>
</template>
</PageHeader>
<n-grid cols="2 s:3 m:5" :x-gap="12" :y-gap="12" responsive="screen" style="margin-bottom: 16px">
<n-gi>