|
@@ -46,6 +46,7 @@ import { numberToChinese, numberToUpperCase } from "./spins/renderJSON";
|
|
import ContItem from "./spins/ContItem.vue";
|
|
import ContItem from "./spins/ContItem.vue";
|
|
import previewTem from "./spins/previewTem";
|
|
import previewTem from "./spins/previewTem";
|
|
import { randomCode } from "@/utils/utils";
|
|
import { randomCode } from "@/utils/utils";
|
|
|
|
+import { STRUCT_TYPES } from "./spins/paperSetting";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "preview-paper-dialog",
|
|
name: "preview-paper-dialog",
|
|
@@ -238,15 +239,40 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
if (question.studentAnswer) {
|
|
if (question.studentAnswer) {
|
|
- contents.push({
|
|
|
|
- cls: "topic-answer std-answer",
|
|
|
|
- type: "json",
|
|
|
|
- content: {
|
|
|
|
- answerType: "student",
|
|
|
|
- structType: question.structType,
|
|
|
|
- body: question.studentAnswer,
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
|
|
+ // 简答题的特殊处理,解决上传的大图无法分页问题。文字内容不受影响。
|
|
|
|
+ if (question.structType === STRUCT_TYPES.TEXT) {
|
|
|
|
+ // console.log(question.studentAnswer);
|
|
|
|
+ let aindex = 0;
|
|
|
|
+ question.studentAnswer.forEach((answer) => {
|
|
|
|
+ answer.sections.forEach((section) => {
|
|
|
|
+ contents.push({
|
|
|
|
+ cls: "topic-answer std-answer",
|
|
|
|
+ type: "json",
|
|
|
|
+ content: {
|
|
|
|
+ answerType: "student",
|
|
|
|
+ structType: question.structType,
|
|
|
|
+ hideTitle: aindex !== 0,
|
|
|
|
+ body: [
|
|
|
|
+ {
|
|
|
|
+ sections: [section],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ aindex++;
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ contents.push({
|
|
|
|
+ cls: "topic-answer std-answer",
|
|
|
|
+ type: "json",
|
|
|
|
+ content: {
|
|
|
|
+ answerType: "student",
|
|
|
|
+ structType: question.structType,
|
|
|
|
+ body: question.studentAnswer,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
contents.push({
|
|
contents.push({
|