|
|
@@ -398,6 +398,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <SoundRecord
|
|
|
+ v-if="isEnable(data.property.is_enable_voice_answer)"
|
|
|
+ ref="record"
|
|
|
+ type="normal"
|
|
|
+ class="record-box"
|
|
|
+ :attrib="data.unified_attrib"
|
|
|
+ :answer-record-list="data.record_list"
|
|
|
+ :task-model="isJudgingRightWrong ? 'ANSWER' : ''"
|
|
|
+ @handleWav="handleWav"
|
|
|
+ />
|
|
|
<PreviewOperation @showAnswerAnalysis="showAnswerAnalysis" @retry="retry" />
|
|
|
<AnswerCorrect
|
|
|
:answer-correct="data?.answer_correct"
|
|
|
@@ -423,6 +433,7 @@ import Strockplayredline from '../newWord_template/components/Strockplayredline.
|
|
|
import Strockplayredlines from '../character_base/components/Strockplayredline.vue';
|
|
|
import Strockred from '../character_base/components/Strockred.vue';
|
|
|
import FreewriteLettle from '../character_base/components/FreewriteLettle.vue';
|
|
|
+import SoundRecord from '../../common/SoundRecord.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'CharacterPreview',
|
|
|
@@ -432,6 +443,7 @@ export default {
|
|
|
Strockred,
|
|
|
FreewriteLettle,
|
|
|
Strockplayredlines,
|
|
|
+ SoundRecord,
|
|
|
},
|
|
|
mixins: [PreviewMixin],
|
|
|
data() {
|
|
|
@@ -468,9 +480,20 @@ export default {
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
|
},
|
|
|
+ isJudgingRightWrong(val) {
|
|
|
+ if (!val) return;
|
|
|
+
|
|
|
+ this.handleWav(this.answer.record_list);
|
|
|
+ },
|
|
|
+ 'data.record_list'(val) {
|
|
|
+ this.answer.record_list = val;
|
|
|
+ },
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
+ handleWav(data) {
|
|
|
+ this.data.record_list = data;
|
|
|
+ },
|
|
|
handleData() {
|
|
|
let answer_list = [];
|
|
|
this.data.option_list.forEach((item, index) => {
|
|
|
@@ -587,6 +610,8 @@ export default {
|
|
|
// 重做
|
|
|
retry() {
|
|
|
this.handleData();
|
|
|
+ this.handleWav([]);
|
|
|
+ this.$refs.record.handleReset();
|
|
|
},
|
|
|
},
|
|
|
};
|