题目页「编辑题目」从只给超管放宽到有权改这道题的人(含学生管理员改自己出的题); 题目、比赛、题单列表加「新建」;自学首页加「自学情况」「管理教程」,课文加「编辑这一课」; 公告加「编辑这条」「发公告」;成就加「管理成就」;智能分析加「AI 报告」,看某个学生时 带着用户名过去直接筛到他。按钮统一走 shared/components/AdminLink.vue。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e7b6e27b85
commit
0ffc405a20
12 files changed
+140
-3
No files matched your search
@@ -4,6 +4,7 @@ import type { TutorialProgress, TutorialSummary } from "@oj2/contract"
|
||||
import { getLearnProgress, getTutorials } from "../api"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import { useAuthModalStore } from "shared/store/authModal"
|
||||
import AdminLink from "shared/components/AdminLink.vue"
|
||||
import { useUserStore } from "shared/store/user"
|
||||
import {
|
||||
COURSES,
|
||||
@@ -251,6 +252,16 @@ onMounted(load)
|
||||
>
|
||||
登录后记下学到哪
|
||||
</button>
|
||||
<div v-if="isDesktop && userStore.isTeacherOrAbove" class="admin-links">
|
||||
<AdminLink to="/admin/learn" size="small">自学情况</AdminLink>
|
||||
<AdminLink
|
||||
v-if="userStore.isSuperAdmin"
|
||||
:to="{ path: '/admin/tutorial/list', query: { type: tab } }"
|
||||
size="small"
|
||||
>
|
||||
管理教程
|
||||
</AdminLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="current && isDesktop" class="map">
|
||||
@@ -483,6 +494,11 @@ onMounted(load)
|
||||
font-weight: 400;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.admin-links {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.login {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
|
||||
@@ -8,6 +8,7 @@ import { parseLesson } from "./composables/useLessonParse"
|
||||
import { useLearnTrace } from "./composables/useLearnTrace"
|
||||
import { useBackClose } from "shared/composables/backClose"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import AdminLink from "shared/components/AdminLink.vue"
|
||||
import { useUserStore } from "shared/store/user"
|
||||
import {
|
||||
COURSES,
|
||||
@@ -293,6 +294,15 @@ function jumpExercise(id: number) {
|
||||
<span v-if="tutorial.project">{{ tutorial.project }}</span>
|
||||
<span v-if="tutorial.project">·</span>
|
||||
<span class="num">第 {{ step }} / {{ titles.length }} 课</span>
|
||||
<template v-if="userStore.isSuperAdmin">
|
||||
<span class="grow" />
|
||||
<AdminLink
|
||||
:to="{ name: 'admin tutorial edit', params: { tutorialID: tutorial.id } }"
|
||||
size="tiny"
|
||||
>
|
||||
编辑这一课
|
||||
</AdminLink>
|
||||
</template>
|
||||
</div>
|
||||
<h1 class="h1">{{ parts.kp }}</h1>
|
||||
<div v-if="parts.scene" class="scene">{{ parts.scene }}</div>
|
||||
@@ -546,6 +556,7 @@ function jumpExercise(id: number) {
|
||||
}
|
||||
.crumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 6px;
|
||||
|
||||
Reference in new issue
Block a user