|
@@ -145,6 +145,7 @@ export default {
|
|
|
detailInfo: [],
|
|
|
importData: {
|
|
|
courseId: "",
|
|
|
+ courseName: "",
|
|
|
name: "",
|
|
|
checkTotalScore: false,
|
|
|
useOriginalPaper: false,
|
|
@@ -285,9 +286,14 @@ export default {
|
|
|
let paperData = deepCopy(this.$refs.QuestionImportPaperEdit.getData());
|
|
|
const transformFieldMap = { body: "quesBody", options: "quesOptions" };
|
|
|
const fields = Object.keys(transformFieldMap);
|
|
|
+ const course = {
|
|
|
+ id: this.data.importData.courseId,
|
|
|
+ name: this.data.importData.courseName,
|
|
|
+ };
|
|
|
|
|
|
const transformQuestion = (question) => {
|
|
|
question.id = null;
|
|
|
+ question.course = course;
|
|
|
fields.forEach((field) => {
|
|
|
question[transformFieldMap[field]] = question[field];
|
|
|
delete question[field];
|