feat(教师端): 添加路由标题和作业记录提示
在studentRecordPage.vue中添加vue-router和useTitle以设置页面标题 在taskHomePage.vue中添加点击查看作业记录的提示文本
Showing
2 changed files
with
8 additions
and
1 deletions
| ... | @@ -115,12 +115,18 @@ | ... | @@ -115,12 +115,18 @@ |
| 115 | 115 | ||
| 116 | <script setup> | 116 | <script setup> |
| 117 | import { ref, onMounted, onBeforeUnmount } from 'vue' | 117 | import { ref, onMounted, onBeforeUnmount } from 'vue' |
| 118 | +import { useRoute, useRouter } from 'vue-router' | ||
| 119 | +import { useTitle } from '@vueuse/core' | ||
| 118 | import { showSuccessToast, showFailToast, showLoadingToast } from 'vant' | 120 | import { showSuccessToast, showFailToast, showLoadingToast } from 'vant' |
| 119 | import VideoPlayer from '@/components/ui/VideoPlayer.vue' | 121 | import VideoPlayer from '@/components/ui/VideoPlayer.vue' |
| 120 | import AudioPlayer from '@/components/ui/AudioPlayer.vue' | 122 | import AudioPlayer from '@/components/ui/AudioPlayer.vue' |
| 121 | import { getStudentUploadListAPI, addCheckinFeedbackAPI } from '@/api/teacher' | 123 | import { getStudentUploadListAPI, addCheckinFeedbackAPI } from '@/api/teacher' |
| 122 | import { likeUploadTaskInfoAPI, dislikeUploadTaskInfoAPI } from '@/api/checkin' | 124 | import { likeUploadTaskInfoAPI, dislikeUploadTaskInfoAPI } from '@/api/checkin' |
| 123 | 125 | ||
| 126 | +const $route = useRoute() | ||
| 127 | +const $router = useRouter() | ||
| 128 | +useTitle($route.meta.title) | ||
| 129 | + | ||
| 124 | // 固定的用户与班级ID | 130 | // 固定的用户与班级ID |
| 125 | const fixedUserId = 817017 | 131 | const fixedUserId = 817017 |
| 126 | const fixedGroupId = 816653 | 132 | const fixedGroupId = 816653 | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-11-19 21:00:00 | 2 | * @Date: 2025-11-19 21:00:00 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-11-20 21:30:48 | 4 | + * @LastEditTime: 2025-11-21 16:19:23 |
| 5 | * @FilePath: /mlaj/src/views/teacher/taskHomePage.vue | 5 | * @FilePath: /mlaj/src/views/teacher/taskHomePage.vue |
| 6 | * @Description: 教师端作业主页(头部介绍、统计、日历与学生完成情况;数据Mock) | 6 | * @Description: 教师端作业主页(头部介绍、统计、日历与学生完成情况;数据Mock) |
| 7 | --> | 7 | --> |
| ... | @@ -87,6 +87,7 @@ | ... | @@ -87,6 +87,7 @@ |
| 87 | <div class="text-base font-semibold text-gray-800">完成情况({{ completed_count }}/{{ students.length }}) | 87 | <div class="text-base font-semibold text-gray-800">完成情况({{ completed_count }}/{{ students.length }}) |
| 88 | </div> | 88 | </div> |
| 89 | <!-- <div class="text-xs text-gray-500">当前日期:{{ current_date_text }}</div> --> | 89 | <!-- <div class="text-xs text-gray-500">当前日期:{{ current_date_text }}</div> --> |
| 90 | + <div class="text-xs text-gray-500">点击查看作业记录</div> | ||
| 90 | </div> | 91 | </div> |
| 91 | <div class="grid grid-cols-5 gap-3 StudentsGrid"> | 92 | <div class="grid grid-cols-5 gap-3 StudentsGrid"> |
| 92 | <div v-for="(stu, idx) in students_status" :key="stu.id" | 93 | <div v-for="(stu, idx) in students_status" :key="stu.id" | ... | ... |
-
Please register or login to post a comment