hookehuyr

feat(教师页面): 添加任务标题显示并优化统计页过滤逻辑

在checkinPage和studentPage中添加任务标题显示,使用绿色分隔符区分任务和子任务标题
优化studentPage统计页的加载逻辑,移除不必要的过滤参数
1 <!-- 1 <!--
2 * @Date: 2025-05-29 15:34:17 2 * @Date: 2025-05-29 15:34:17
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-12-14 22:38:22 4 + * @LastEditTime: 2025-12-15 15:27:35
5 * @FilePath: /mlaj/src/views/teacher/checkinPage.vue 5 * @FilePath: /mlaj/src/views/teacher/checkinPage.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -106,7 +106,9 @@ ...@@ -106,7 +106,9 @@
106 @audio-play="handleAudioPlay" 106 @audio-play="handleAudioPlay"
107 > 107 >
108 <template #content-top> 108 <template #content-top>
109 - <div class="text-gray-500 font-bold text-sm mb-4">{{ post.subtask_title }}</div> 109 + <div class="text-gray-500 font-bold text-sm mb-4">
110 + {{ post.task_title || '' }} <span v-if="post.task_title && post.subtask_title" style="color: #4caf50;">|</span> {{ post.subtask_title || '' }}
111 + </div>
110 </template> 112 </template>
111 <template #footer-right> 113 <template #footer-right>
112 <div class="flex items-center cursor-pointer" @click="openAuditDialog(post)"> 114 <div class="flex items-center cursor-pointer" @click="openAuditDialog(post)">
...@@ -710,6 +712,9 @@ const formatData = (data) => { ...@@ -710,6 +712,9 @@ const formatData = (data) => {
710 is_my: item.is_my, 712 is_my: item.is_my,
711 file_type: item.file_type, 713 file_type: item.file_type,
712 is_audit: item.status === 5 ? true : false, // 5=审批通过,7=审批不通过 714 is_audit: item.status === 5 ? true : false, // 5=审批通过,7=审批不通过
715 + task_title: item.task_title || '',
716 + subtask_title: item.subtask_title || '',
717 + subtask_id: item.subtask_id,
713 } 718 }
714 }) 719 })
715 return formattedData; 720 return formattedData;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 * @Author: hookehuyr hookehuyr@gmail.com 2 * @Author: hookehuyr hookehuyr@gmail.com
3 * @Date: 2025-06-19 17:12:19 3 * @Date: 2025-06-19 17:12:19
4 * @LastEditors: hookehuyr hookehuyr@gmail.com 4 * @LastEditors: hookehuyr hookehuyr@gmail.com
5 - * @LastEditTime: 2025-12-15 13:45:56 5 + * @LastEditTime: 2025-12-15 17:47:10
6 * @FilePath: /mlaj/src/views/teacher/studentPage.vue 6 * @FilePath: /mlaj/src/views/teacher/studentPage.vue
7 * @Description: 学生详情页面 7 * @Description: 学生详情页面
8 --> 8 -->
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
95 <!-- 使用van-sticky包裹van-tabs实现粘性布局 --> 95 <!-- 使用van-sticky包裹van-tabs实现粘性布局 -->
96 <div class="bg-white" style="margin: 1rem;"> 96 <div class="bg-white" style="margin: 1rem;">
97 <van-sticky :offset-top="0"> 97 <van-sticky :offset-top="0">
98 - <div class="bg-white px-4 py-2"> 98 + <div v-if="activeTab !== 'statistics'" class="bg-white px-4 py-2">
99 <TaskFilter 99 <TaskFilter
100 :key="currentGroupId" 100 :key="currentGroupId"
101 :group-id="currentGroupId" 101 :group-id="currentGroupId"
...@@ -206,7 +206,9 @@ ...@@ -206,7 +206,9 @@
206 @audio-play="handleAudioPlay" 206 @audio-play="handleAudioPlay"
207 > 207 >
208 <template #content-top> 208 <template #content-top>
209 - <div class="text-gray-500 font-bold text-sm mb-4">{{ post.subtask_title }}</div> 209 + <div class="text-gray-500 font-bold text-sm mb-4">
210 + {{ post.task_title || '' }} <span v-if="post.task_title && post.subtask_title" style="color: #4caf50;">|</span> {{ post.subtask_title || '' }}
211 + </div>
210 </template> 212 </template>
211 <template #footer-right> 213 <template #footer-right>
212 <div class="flex items-center cursor-pointer" @click="openCommentPopup(post)"> 214 <div class="flex items-center cursor-pointer" @click="openCommentPopup(post)">
...@@ -383,7 +385,7 @@ const handleTaskFilterChange = ({ task_id, subtask_id }) => { ...@@ -383,7 +385,7 @@ const handleTaskFilterChange = ({ task_id, subtask_id }) => {
383 onLoad(); 385 onLoad();
384 } else if (activeTab.value === 'statistics') { 386 } else if (activeTab.value === 'statistics') {
385 recordLoading.value = true; 387 recordLoading.value = true;
386 - onRecordLoad(); 388 + // onRecordLoad();
387 } else if (activeTab.value === 'evaluation') { 389 } else if (activeTab.value === 'evaluation') {
388 evaluationLoading.value = true; 390 evaluationLoading.value = true;
389 onEvaluationLoad(); 391 onEvaluationLoad();
...@@ -600,8 +602,8 @@ const onRecordLoad = async () => { ...@@ -600,8 +602,8 @@ const onRecordLoad = async () => {
600 page: nextPage, 602 page: nextPage,
601 user_id: route.params.id, 603 user_id: route.params.id,
602 group_id: selectedCourses.value.length ? selectedCourses.value[0]['id'] : '', 604 group_id: selectedCourses.value.length ? selectedCourses.value[0]['id'] : '',
603 - task_id: filterTaskId.value, 605 + // task_id: filterTaskId.value,
604 - subtask_id: filterSubtaskId.value 606 + // subtask_id: filterSubtaskId.value
605 }); 607 });
606 if (res.code) { 608 if (res.code) {
607 // 整理数据结构 609 // 整理数据结构
...@@ -874,6 +876,9 @@ const formatData = (data) => { ...@@ -874,6 +876,9 @@ const formatData = (data) => {
874 feedback_id : item.feedback_id || '', 876 feedback_id : item.feedback_id || '',
875 feedback_score : item.feedback_score || 0, 877 feedback_score : item.feedback_score || 0,
876 comment: item.comment || null, // 点评内容 878 comment: item.comment || null, // 点评内容
879 + task_title: item.task_title || '',
880 + subtask_title: item.subtask_title || '',
881 + subtask_id: item.subtask_id || '',
877 } 882 }
878 }) 883 })
879 return formattedData; 884 return formattedData;
......