|
@@ -174,6 +174,7 @@ export default {
|
|
|
// this.paperRichJson = deepCopy(paperRichTextJson);
|
|
|
this.paperRichJson = deepCopy(this.data.richText);
|
|
|
this.paperData = deepCopy(this.data.detailInfo);
|
|
|
+ this.transformRichImg();
|
|
|
this.questionKey = randomCode();
|
|
|
},
|
|
|
async getCourseProperty() {
|
|
@@ -184,6 +185,16 @@ export default {
|
|
|
JSON.stringify({ optionList, courseId: this.data.importData.courseId })
|
|
|
);
|
|
|
},
|
|
|
+ transformRichImg() {
|
|
|
+ const rate = 96 / 200;
|
|
|
+ this.paperRichJson.sections.forEach((section) => {
|
|
|
+ section.blocks.forEach((block) => {
|
|
|
+ if (block.type !== "image" || !block.param) return;
|
|
|
+ block.param.width = block.param.width * rate;
|
|
|
+ block.param.height = block.param.height * rate;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
initData() {
|
|
|
this.paperData = [];
|
|
|
this.paperRichJson = { sections: [] };
|