|
@@ -2,6 +2,7 @@ import SerialNumberPosition from './SerialNumberPosition.vue';
|
|
|
import PinyinText from '@/components/PinyinText.vue';
|
|
import PinyinText from '@/components/PinyinText.vue';
|
|
|
import AnswerAnalysis from '@/views/book/courseware/preview/common/AnswerAnalysis.vue';
|
|
import AnswerAnalysis from '@/views/book/courseware/preview/common/AnswerAnalysis.vue';
|
|
|
import PreviewOperation from '@/views/book/courseware/preview/common/PreviewOperation.vue';
|
|
import PreviewOperation from '@/views/book/courseware/preview/common/PreviewOperation.vue';
|
|
|
|
|
+import AnswerCorrect from '@/views/book/courseware/preview/common/AnswerCorrect.vue';
|
|
|
|
|
|
|
|
import { isEnable } from '@/views/book/courseware/data/common';
|
|
import { isEnable } from '@/views/book/courseware/data/common';
|
|
|
import { ContentGetCoursewareComponentContent } from '@/api/book';
|
|
import { ContentGetCoursewareComponentContent } from '@/api/book';
|
|
@@ -21,6 +22,12 @@ const mixin = {
|
|
|
loader: false,
|
|
loader: false,
|
|
|
visibleAnswerAnalysis: false, // 是否显示答案解析弹窗
|
|
visibleAnswerAnalysis: false, // 是否显示答案解析弹窗
|
|
|
answerAnalysisState: null, // 答案解析弹窗前的状态快照
|
|
answerAnalysisState: null, // 答案解析弹窗前的状态快照
|
|
|
|
|
+ visibleAnswerCorrect: false, // 是否显示批改弹窗
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ provide() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ openAnswerCorrect: () => this.openAnswerCorrect(),
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
inject: ['getLang', 'getChinese', 'convertText', 'getTitleList', 'getPermissionControl'],
|
|
inject: ['getLang', 'getChinese', 'convertText', 'getTitleList', 'getPermissionControl'],
|
|
@@ -69,6 +76,7 @@ const mixin = {
|
|
|
PinyinText,
|
|
PinyinText,
|
|
|
AnswerAnalysis,
|
|
AnswerAnalysis,
|
|
|
PreviewOperation,
|
|
PreviewOperation,
|
|
|
|
|
+ AnswerCorrect,
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// 这里分为 预览 和 编辑调整位置、视频互动组件 三种情况
|
|
// 这里分为 预览 和 编辑调整位置、视频互动组件 三种情况
|
|
@@ -129,6 +137,20 @@ const mixin = {
|
|
|
if (userAnswer) this.answer = userAnswer;
|
|
if (userAnswer) this.answer = userAnswer;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 获取批改信息
|
|
|
|
|
+ * @returns {string} 批改信息
|
|
|
|
|
+ */
|
|
|
|
|
+ getAnswerCorrect() {
|
|
|
|
|
+ return this.data.answer_correct || '';
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 设置批改信息
|
|
|
|
|
+ * @param {string} correct 批改信息
|
|
|
|
|
+ */
|
|
|
|
|
+ setAnswerCorrect(correct) {
|
|
|
|
|
+ this.$set(this.data, 'answer_correct', correct);
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* 得到序号外部样式
|
|
* 得到序号外部样式
|
|
|
*/
|
|
*/
|
|
|
getAreaStyle() {
|
|
getAreaStyle() {
|
|
@@ -195,6 +217,7 @@ const mixin = {
|
|
|
...borderData,
|
|
...borderData,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ // 显示答案与解析页面
|
|
|
showAnswerAnalysis() {
|
|
showAnswerAnalysis() {
|
|
|
if (!this.answerAnalysisState) {
|
|
if (!this.answerAnalysisState) {
|
|
|
this.answerAnalysisState = {
|
|
this.answerAnalysisState = {
|
|
@@ -207,6 +230,7 @@ const mixin = {
|
|
|
this.isJudgingRightWrong = this.permissionControl.can_judge_correct;
|
|
this.isJudgingRightWrong = this.permissionControl.can_judge_correct;
|
|
|
this.isShowRightAnswer = this.permissionControl.can_show_answer;
|
|
this.isShowRightAnswer = this.permissionControl.can_show_answer;
|
|
|
},
|
|
},
|
|
|
|
|
+ // 关闭答案与解析页面
|
|
|
closeAnswerAnalysis() {
|
|
closeAnswerAnalysis() {
|
|
|
if (this.answerAnalysisState) {
|
|
if (this.answerAnalysisState) {
|
|
|
this.disabled = this.answerAnalysisState.disabled;
|
|
this.disabled = this.answerAnalysisState.disabled;
|
|
@@ -219,6 +243,18 @@ const mixin = {
|
|
|
this.isShowRightAnswer = false;
|
|
this.isShowRightAnswer = false;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 显示批改页面
|
|
|
|
|
+ openAnswerCorrect() {
|
|
|
|
|
+ this.visibleAnswerCorrect = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @description 关闭批改页面,并传递批改信息
|
|
|
|
|
+ * @param {string} correct 批改信息
|
|
|
|
|
+ */
|
|
|
|
|
+ closeAnswerCorrect(correct) {
|
|
|
|
|
+ this.visibleAnswerCorrect = false;
|
|
|
|
|
+ this.$set(this.data, 'answer_correct', correct);
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
|
|
|