|
@@ -73,6 +73,7 @@
|
|
|
|
|
|
<footer class="footer" :style="{ justifyContent: isAnnotations ? 'space-between' : 'center' }">
|
|
|
<el-popover v-model="isPopover" placement="top-start" trigger="click">
|
|
|
+ <!-- 学生查看批注 -->
|
|
|
<div v-if="isEnable(remark.is_remarked) && !isTeacher" class="remark-container">
|
|
|
<div class="remark-info">
|
|
|
<el-avatar :size="24" :src="remark.remark_person_image_url" />
|
|
@@ -87,14 +88,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <!-- 教师填写批注 -->
|
|
|
<div v-else class="annotations-container">
|
|
|
<div class="title">增加批注</div>
|
|
|
- <div class="score">
|
|
|
+ <div v-if="currentQuestion.type === 'read'" class="read-score">
|
|
|
+ <div v-for="(item, i) in remark.child_question_remark_list" :key="i">
|
|
|
+ <span>小题 {{ i + 1 }} 分数:</span>
|
|
|
+ <span v-if="isEnable(item.is_objective)">得分 {{ item.score }}</span>
|
|
|
+ <el-input-number v-else v-model="item.score" :min="0" :max="item.score_question" :step="1" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="!is_objective" class="score">
|
|
|
<span>分数</span>
|
|
|
<el-input-number
|
|
|
v-model="remark.score"
|
|
|
:min="0"
|
|
|
- :disabled="is_objective"
|
|
|
:max="question.score"
|
|
|
:step="question.score_type === scoreTypeList[0].value ? 1 : 0.1"
|
|
|
/>
|
|
@@ -177,6 +185,9 @@
|
|
|
? `总分${question.score}分`
|
|
|
: `总分${question.score}分 每小题${question.score_item}分`
|
|
|
}}
|
|
|
+ <template v-if="is_objective">
|
|
|
+ <span>得分{{ remark.score }}分</span>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</footer>
|
|
|
</div>
|
|
@@ -262,6 +273,7 @@ export default {
|
|
|
remark_person_name: '',
|
|
|
remark_time: '',
|
|
|
file_list: [],
|
|
|
+ child_question_remark_list: [], // 子题批注列表
|
|
|
}, // 批注
|
|
|
isPopover: false,
|
|
|
recordReport: {
|
|
@@ -521,6 +533,13 @@ export default {
|
|
|
answer_record_id: this.answer_record_id,
|
|
|
question_id: this.questionList[this.curQuestionIndex].id,
|
|
|
}).then(({ question, user_answer: { is_fill_answer, content, is_objective, answer_status }, remark }) => {
|
|
|
+ if (question.type === 'read') {
|
|
|
+ let question_list = JSON.parse(question.content)?.question_list ?? [];
|
|
|
+ let child_question_remark_list = question_list.map(({ id }) => {
|
|
|
+ return remark.child_question_remark_list.find((item) => item.question_id === id);
|
|
|
+ });
|
|
|
+ remark.child_question_remark_list = child_question_remark_list;
|
|
|
+ }
|
|
|
// 批注
|
|
|
this.remark = remark;
|
|
|
|
|
@@ -656,6 +675,7 @@ export default {
|
|
|
answer_record_id: this.answer_record_id,
|
|
|
question_id: this.questionList[this.curQuestionIndex].id,
|
|
|
file_id_list: this.remark.file_list.map(({ file_id }) => file_id),
|
|
|
+ child_question_remark_list: this.remark.child_question_remark_list,
|
|
|
score: this.remark.score,
|
|
|
remark: this.remark.remark,
|
|
|
}).then(() => {
|
|
@@ -837,6 +857,27 @@ export default {
|
|
|
color: #000;
|
|
|
}
|
|
|
|
|
|
+ .read-score {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ row-gap: 8px;
|
|
|
+
|
|
|
+ > div {
|
|
|
+ display: flex;
|
|
|
+ column-gap: 8px;
|
|
|
+ align-items: center;
|
|
|
+ color: #000;
|
|
|
+
|
|
|
+ :first-child {
|
|
|
+ color: #999;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-input-number {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.score {
|
|
|
display: flex;
|
|
|
column-gap: 8px;
|