|
@@ -11,6 +11,8 @@
|
|
|
<div class="group">
|
|
|
<el-checkbox v-model="isShowGroup">显示分组</el-checkbox>
|
|
|
<el-checkbox v-model="groupShowAll">分组显示全部</el-checkbox>
|
|
|
+ <el-checkbox v-model="isJudgeCorrect">判断对错</el-checkbox>
|
|
|
+ <el-checkbox v-model="isShowAnswer" :disabled="!isJudgeCorrect">显示答案</el-checkbox>
|
|
|
</div>
|
|
|
<span class="link">
|
|
|
<el-select v-model="lang" placeholder="请选择语言" size="mini" class="lang-select">
|
|
@@ -285,6 +287,8 @@ export default {
|
|
|
langList: [],
|
|
|
lang: 'ZH',
|
|
|
chinese: 'zh-Hans',
|
|
|
+ isJudgeCorrect: false,
|
|
|
+ isShowAnswer: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -295,6 +299,17 @@ export default {
|
|
|
return this.file_list.length >= this.total_count && this.total_count > 0;
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ isJudgeCorrect(newVal) {
|
|
|
+ if (!newVal) {
|
|
|
+ this.isShowAnswer = false;
|
|
|
+ }
|
|
|
+ this.simulateAnswer(newVal);
|
|
|
+ },
|
|
|
+ isShowAnswer() {
|
|
|
+ this.simulateAnswer();
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
if (this.id) {
|
|
|
this.getBookCoursewareInfo(this.id);
|
|
@@ -582,8 +597,8 @@ export default {
|
|
|
return text;
|
|
|
},
|
|
|
|
|
|
- simulateAnswer() {
|
|
|
- this.$refs.courserware.simulateAnswer();
|
|
|
+ simulateAnswer(disabled = true) {
|
|
|
+ this.$refs.courserware.simulateAnswer(this.isJudgeCorrect, this.isShowAnswer, disabled);
|
|
|
},
|
|
|
},
|
|
|
};
|