diff --git a/public/images/teacher/homework.png b/public/images/teacher/homework.png new file mode 100644 index 0000000..4be49e8 Binary files /dev/null and b/public/images/teacher/homework.png differ diff --git a/public/images/teacher/路径 28.png b/public/images/teacher/下载 (2).png similarity index 100% rename from public/images/teacher/路径 28.png rename to public/images/teacher/下载 (2).png diff --git a/public/images/teacher/下载.png.png b/public/images/teacher/下载-蓝.png similarity index 100% rename from public/images/teacher/下载.png.png rename to public/images/teacher/下载-蓝.png diff --git a/public/images/teacher/文件格式(1).png.png b/public/images/teacher/文件格式.png similarity index 100% rename from public/images/teacher/文件格式(1).png.png rename to public/images/teacher/文件格式.png diff --git a/public/images/teacher/路径.png b/public/images/teacher/箭头-黑.png similarity index 100% rename from public/images/teacher/路径.png rename to public/images/teacher/箭头-黑.png diff --git a/src/views/teacher/AdminDashboard.vue b/src/views/teacher/AdminDashboard.vue index 41c037d..62b49c1 100644 --- a/src/views/teacher/AdminDashboard.vue +++ b/src/views/teacher/AdminDashboard.vue @@ -78,14 +78,19 @@ @@ -159,22 +164,17 @@ const hideSidebar = computed(() => { return currentPath.includes('course-editor') || currentPath.includes('chapter-editor-teacher') }) -// 动态生成面包屑 -const breadcrumbItems = computed(() => { +// 动态生成面包屑路径项(右侧部分) +const breadcrumbPathItems = computed(() => { const currentPath = route.path; - // 如果在课程编辑器相关页面,强制添加课程管理面包屑 + // 如果在课程编辑器相关页面 if (currentPath.includes('course-editor')) { // 从路径中提取课程ID const courseIdMatch = currentPath.match(/\/course-editor\/(\d+)/); const courseId = courseIdMatch ? courseIdMatch[1] : '未知'; - let breadcrumbs = [ - { - title: '课程管理', - path: '/teacher/course-management' - } - ]; + let breadcrumbs = []; // 根据当前路径添加子页面标题 if (currentPath.includes('courseware')) { @@ -245,16 +245,40 @@ const breadcrumbItems = computed(() => { } ); } else if (currentPath.includes('homework')) { - breadcrumbs.push( - { - title: '作业管理', - path: currentPath - }, - { - title: `课程${courseId}`, - path: `/teacher/course-editor/${courseId}` - } - ); + // 检查是否是批阅作业详情页面 + if (currentPath.includes('review/') && currentPath.split('/').length > 6) { + // 批阅作业详情页面:课程管理 > 课程名称 > 批阅作业 > 批阅 + breadcrumbs.push( + { + title: '课程管理', + path: '/teacher/course-management' + }, + { + title: `课程${courseId}`, + path: `/teacher/course-editor/${courseId}` + }, + { + title: '批阅作业', + path: `/teacher/course-editor/${courseId}/homework/review` + }, + { + title: '批阅', + path: currentPath + } + ); + } else { + // 普通作业页面:作业管理 + breadcrumbs.push( + { + title: '作业管理', + path: currentPath + }, + { + title: `课程${courseId}`, + path: `/teacher/course-editor/${courseId}` + } + ); + } } else if (currentPath.includes('practice')) { breadcrumbs.push( { @@ -786,11 +810,16 @@ const updateActiveNavItem = () => { gap: 8px; } +.breadcrumb-path { + display: flex; + align-items: center; + gap: 8px; +} .breadcrumb-item { display: flex; align-items: center; font-size: 14px; - color: #666; + color: #000; cursor: pointer; transition: color 0.3s ease; } @@ -814,6 +843,7 @@ const updateActiveNavItem = () => { font-size: 16px; font-weight: 500; color: #333; + margin-right: 10px; } .breadcrumb-separator { diff --git a/src/views/teacher/course/CourseEditor.vue b/src/views/teacher/course/CourseEditor.vue index 5e9787c..54d99e5 100644 --- a/src/views/teacher/course/CourseEditor.vue +++ b/src/views/teacher/course/CourseEditor.vue @@ -145,7 +145,8 @@ const hideSidebar = computed(() => { const hideSidebarPaths = [ 'add-question', // 新增试题页面 'add-homework', // 添加作业页面 - 'template-import' + 'template-import', + 'review/' ] // 检查当前路径是否包含需要隐藏侧边栏的路径 diff --git a/src/views/teacher/course/HomeworkReview.vue b/src/views/teacher/course/HomeworkReview.vue index 53990b4..ee8e7fe 100644 --- a/src/views/teacher/course/HomeworkReview.vue +++ b/src/views/teacher/course/HomeworkReview.vue @@ -1,4 +1,4 @@ -