hookehuyr

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

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