|
@@ -14,15 +14,78 @@
|
|
|
@click="getTaskStudentExecuteInfo(item.student_id)"
|
|
|
>
|
|
|
<span>{{ item.student_name }}</span>
|
|
|
- <svg-icon v-if="item.is_finished === 'true'" icon-class="check-mark" />
|
|
|
+ <svg-icon v-if="!isExercises && item.is_finished === 'true'" icon-class="check-mark" />
|
|
|
+ <span v-if="isExercises && item.exercise_info.is_finish === 'true'" class="submitted">已提交</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="finish-detail">
|
|
|
<template v-if="isExercises">
|
|
|
- <div ref="situation" class="exercise"></div>
|
|
|
+ <div ref="situation" class="exercise">
|
|
|
+ <div class="title">测试报告</div>
|
|
|
+ <div class="color-list">
|
|
|
+ <div v-for="{ label, color } in questionColorList" :key="label" class="color-item">
|
|
|
+ <span class="color" :style="{ backgroundColor: color }"></span>
|
|
|
+ <span>{{ label }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="exercise-details">
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="label">完成时间</span>
|
|
|
+ <span class="exercise-info">{{ exercise_info.answer_record?.finish_time }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="label">耗时</span>
|
|
|
+ <span class="exercise-info">{{
|
|
|
+ secondFormatConversion(exercise_info.answer_record?.answer_duration, 'chinese')
|
|
|
+ }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="label">正确</span>
|
|
|
+ <span class="exercise-info">{{ exercise_info.answer_record?.right_count }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="label">错误</span>
|
|
|
+ <span class="exercise-info">{{ exercise_info.answer_record?.error_count }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="info-item">
|
|
|
+ <span class="label">正确率</span>
|
|
|
+ <span class="exercise-info">{{ exercise_info.answer_record?.right_percent }}%</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 问题列表 -->
|
|
|
+ <div class="question-list">
|
|
|
+ <span
|
|
|
+ v-for="({ question_id, is_objective, answer_status }, i) in exercise_info.question_list"
|
|
|
+ :key="question_id"
|
|
|
+ :class="['question-list-item', { subjectivity: is_objective === 'false', error: answer_status === 2 }]"
|
|
|
+ @click="
|
|
|
+ exerciseLink(
|
|
|
+ exercise_info.answer_record.exercise_share_record_id,
|
|
|
+ exercise_info.answer_record.exercise_answer_record_id,
|
|
|
+ i
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{ i + 1 }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="total-score">
|
|
|
+ <div>总得分</div>
|
|
|
+ <div>{{ exercise_info.answer_record?.total_score }}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="primary" @click="remarkTaskStudentExecuteInfo_Teacher">批改完成</el-button>
|
|
|
+ <el-button>重发</el-button>
|
|
|
+ <el-button v-if="student_list.length > 1" @click="next">
|
|
|
+ {{ buttonName }} <i class="el-icon-right"></i>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
+
|
|
|
<template v-else>
|
|
|
<div class="student-info">
|
|
|
<div>
|
|
@@ -138,6 +201,8 @@ import { GetTaskInfo, GetTaskStudentExecuteInfo, RemarkTaskStudentExecuteInfo_Te
|
|
|
import { useRoute } from 'vue-router/composables';
|
|
|
import { Message } from 'element-ui';
|
|
|
import { useShowFile } from '@/common/show_file/index';
|
|
|
+import { useExerciseTeacher, questionColorList } from './exercise';
|
|
|
+import { secondFormatConversion } from '@/utils';
|
|
|
|
|
|
import CompletionView from '@/components/course/CompletionView.vue';
|
|
|
import ShowFile from '@/common/show_file/index.vue';
|
|
@@ -147,6 +212,8 @@ const $t = inject('$t');
|
|
|
const route = useRoute();
|
|
|
let id = route.params.id;
|
|
|
|
|
|
+const { exerciseLink } = useExerciseTeacher();
|
|
|
+
|
|
|
// 任务详情
|
|
|
let itemInfo = ref({});
|
|
|
let teachingType = ref('');
|
|
@@ -177,8 +244,6 @@ GetTaskInfo({
|
|
|
cs_item_learning_material_list,
|
|
|
time_space_view_txt,
|
|
|
student_list: stuList,
|
|
|
- is_custom_student,
|
|
|
- custom_student_list,
|
|
|
is_enable_KHPJ: isKHPJ,
|
|
|
is_enable_homework: isHomework,
|
|
|
is_enable_message: isMessage,
|
|
@@ -201,7 +266,7 @@ GetTaskInfo({
|
|
|
is_enable_KHPJ.value = isKHPJ === 'true';
|
|
|
is_enable_homework.value = isHomework === 'true';
|
|
|
is_enable_message.value = isMessage === 'true';
|
|
|
- student_list.value = is_custom_student === 'true' ? custom_student_list : stuList;
|
|
|
+ student_list.value = stuList;
|
|
|
if (student_list.value.length > 0) getTaskStudentExecuteInfo(student_list.value[0].student_id);
|
|
|
}
|
|
|
)
|
|
@@ -225,6 +290,7 @@ let teacher_score = ref(0);
|
|
|
let student_remark = ref('');
|
|
|
let student_score = ref(0);
|
|
|
let student_list_height = ref(490);
|
|
|
+let exercise_info = ref({}); // 练习题信息
|
|
|
function getTaskStudentExecuteInfo(student_id) {
|
|
|
GetTaskStudentExecuteInfo({
|
|
|
task_id: id,
|
|
@@ -241,7 +307,7 @@ function getTaskStudentExecuteInfo(student_id) {
|
|
|
teacher_score: tScore,
|
|
|
student_remark: sRemake,
|
|
|
student_score: stuScore,
|
|
|
- exercise_info
|
|
|
+ exercise_info: exerciseInfo
|
|
|
}) => {
|
|
|
curStudentId.value = student_id;
|
|
|
teacher_remark.value = tRemake;
|
|
@@ -256,7 +322,7 @@ function getTaskStudentExecuteInfo(student_id) {
|
|
|
student_image_url,
|
|
|
finish_time_view_txt
|
|
|
};
|
|
|
- console.log(exercise_info);
|
|
|
+ exercise_info.value = exerciseInfo;
|
|
|
nextTick(() => {
|
|
|
student_list_height.value = situation.value.clientHeight;
|
|
|
});
|
|
@@ -288,7 +354,7 @@ function remarkTaskStudentExecuteInfo_Teacher() {
|
|
|
teacher_score: teacher_score.value,
|
|
|
teacher_remark: teacher_remark.value
|
|
|
}).then(() => {
|
|
|
- Message.success($t('Key324'));
|
|
|
+ Message.success(isExercises.value ? '批改成功' : $t('Key324'));
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -363,6 +429,12 @@ $bor-color: #d9d9d9;
|
|
|
&.active {
|
|
|
background-color: #f2f2f2;
|
|
|
}
|
|
|
+
|
|
|
+ .submitted {
|
|
|
+ position: relative;
|
|
|
+ left: 16px;
|
|
|
+ color: #00c264;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -373,6 +445,108 @@ $bor-color: #d9d9d9;
|
|
|
flex: 7;
|
|
|
border-left: 1px solid #dbdbdb;
|
|
|
|
|
|
+ // 练习题
|
|
|
+ .exercise {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ row-gap: 24px;
|
|
|
+ padding: 24px 40px;
|
|
|
+
|
|
|
+ .color-list {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 24px;
|
|
|
+
|
|
|
+ .color-item {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 8px;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .color {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 练习题详情
|
|
|
+ .exercise-details {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 80px;
|
|
|
+ padding: 16px 40px;
|
|
|
+ background-color: #f7f7f7;
|
|
|
+
|
|
|
+ .info-item {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ row-gap: 12px;
|
|
|
+
|
|
|
+ .label {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #949494;
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
+
|
|
|
+ .exercise-info {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 题目列表
|
|
|
+ .question-list {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 24px;
|
|
|
+ width: 770px;
|
|
|
+ margin-bottom: 40px;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ width: 56px;
|
|
|
+ height: 40px;
|
|
|
+ padding: 8px;
|
|
|
+ line-height: 24px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ background-color: #f0f0f0;
|
|
|
+ border-radius: 20px;
|
|
|
+
|
|
|
+ &.error {
|
|
|
+ color: #fff;
|
|
|
+ background-color: #f2555a;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.subjectivity {
|
|
|
+ background-color: #fef2a4;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .total-score {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ row-gap: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+
|
|
|
+ :first-child {
|
|
|
+ color: #949494;
|
|
|
+ }
|
|
|
+
|
|
|
+ :last-child {
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .footer {
|
|
|
+ .el-button {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.student-info {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|