|
@@ -68,6 +68,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import json5 from "json5";
|
|
|
import { mapState, mapMutations, mapActions } from "vuex";
|
|
|
import { saveCard, cardConfigInfos } from "../api";
|
|
|
import { tikuPaperDetail } from "../../exam/api";
|
|
@@ -78,7 +79,7 @@ import { getCardHeadModel } from "../../../../card/elementModel";
|
|
|
import TopicElementPreview from "../../../../card/components/TopicElementPreview";
|
|
|
import CardView from "../../../../card/components/CardView.vue";
|
|
|
import CardHeadSample from "../../../../card/elements/card-head/CardHead";
|
|
|
-import { deepCopy, objTypeOf, removeRichTextValue } from "@/plugins/utils";
|
|
|
+import { deepCopy, objTypeOf } from "@/plugins/utils";
|
|
|
// ceshi
|
|
|
// import paperData from "./paper.json";
|
|
|
|
|
@@ -153,12 +154,14 @@ export default {
|
|
|
uuid: this.presetData.uuid,
|
|
|
attachmentId: res.attachmentId,
|
|
|
};
|
|
|
+
|
|
|
const answerJson = res.answerJson
|
|
|
- ? JSON.parse(removeRichTextValue(res.answerJson))
|
|
|
+ ? json5.parse(res.answerJson)
|
|
|
: { details: [] };
|
|
|
const paperJson = res.paperJson
|
|
|
- ? JSON.parse(removeRichTextValue(res.paperJson))
|
|
|
- : {};
|
|
|
+ ? json5.parse(res.paperJson)
|
|
|
+ : { details: [] };
|
|
|
+
|
|
|
this.rebuildPaperQuestionNumber(answerJson);
|
|
|
this.rebuildPaperQuestionNumber(paperJson);
|
|
|
this.parsePaperAnswers(paperJson, answerJson);
|