|
@@ -22,10 +22,12 @@
|
|
<div v-show="!isCurMaterial && material_type === 'COURSEWARE'" class="answer-data">
|
|
<div v-show="!isCurMaterial && material_type === 'COURSEWARE'" class="answer-data">
|
|
<span>{{ $t('Key320') }}</span>
|
|
<span>{{ $t('Key320') }}</span>
|
|
<span class="answer-data-duration">{{ answerData.duration }}{{ $t('Key321') }}</span>
|
|
<span class="answer-data-duration">{{ answerData.duration }}{{ $t('Key321') }}</span>
|
|
- <span class="answer-data-label">{{ $t('Key194') }}</span>
|
|
|
|
- <span class="answer-data-count-right">{{ answerData.count_right }}</span>
|
|
|
|
- <span class="answer-data-label">{{ $t('Key195') }}</span>
|
|
|
|
- <span class="answer-data-count-error">{{ answerData.count_error }}</span>
|
|
|
|
|
|
+ <template v-if="category !== 'NPC'">
|
|
|
|
+ <span class="answer-data-label">{{ $t('Key194') }}</span>
|
|
|
|
+ <span class="answer-data-count-right">{{ answerData.count_right }}</span>
|
|
|
|
+ <span class="answer-data-label">{{ $t('Key195') }}</span>
|
|
|
|
+ <span class="answer-data-count-error">{{ answerData.count_error }}</span>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<template v-if="material_type === 'COURSEWARE' && visible">
|
|
<template v-if="material_type === 'COURSEWARE' && visible">
|
|
@@ -50,6 +52,7 @@
|
|
<template v-else-if="category === 'NPC'">
|
|
<template v-else-if="category === 'NPC'">
|
|
<booknpc
|
|
<booknpc
|
|
v-if="context && refresh"
|
|
v-if="context && refresh"
|
|
|
|
+ ref="booknpc"
|
|
:task-model="isFinished ? 'ANSWER' : ''"
|
|
:task-model="isFinished ? 'ANSWER' : ''"
|
|
:is-show-save="!isFinished"
|
|
:is-show-save="!isFinished"
|
|
:book-answer-content="bookAnswerContent"
|
|
:book-answer-content="bookAnswerContent"
|
|
@@ -293,6 +296,9 @@ export default {
|
|
if (category === 'NPC') {
|
|
if (category === 'NPC') {
|
|
this.themeColor = book_theme_color;
|
|
this.themeColor = book_theme_color;
|
|
this.context = JSON.parse(content);
|
|
this.context = JSON.parse(content);
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.booknpc.handleAnswerTimeStart();
|
|
|
|
+ });
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (category === 'NNPE') {
|
|
if (category === 'NNPE') {
|
|
@@ -362,13 +368,14 @@ export default {
|
|
this.exam_answer = data;
|
|
this.exam_answer = data;
|
|
},
|
|
},
|
|
|
|
|
|
- saveNPCAnswer(content) {
|
|
|
|
|
|
+ saveNPCAnswer(content, duration) {
|
|
const loading = this.$loading();
|
|
const loading = this.$loading();
|
|
FinishMyMaterial({
|
|
FinishMyMaterial({
|
|
task_id: this.taskId,
|
|
task_id: this.taskId,
|
|
material_id: this.material_id,
|
|
material_id: this.material_id,
|
|
material_type: this.material_type,
|
|
material_type: this.material_type,
|
|
exam_answer: {
|
|
exam_answer: {
|
|
|
|
+ duration,
|
|
content
|
|
content
|
|
}
|
|
}
|
|
})
|
|
})
|