|
@@ -247,12 +247,16 @@ export default {
|
|
|
const fields = Object.keys(transformFieldMap);
|
|
|
const detailInfo = paperData.map((detail) => {
|
|
|
const questionInfo = detail.questions.map((question) => {
|
|
|
+ question.id = null;
|
|
|
fields.forEach((field) => {
|
|
|
question[transformFieldMap[field]] = question[field];
|
|
|
delete question[field];
|
|
|
});
|
|
|
|
|
|
if (question.subQuestions && question.subQuestions.length) {
|
|
|
+ question.subQuestions.forEach((subq) => {
|
|
|
+ subq.id = null;
|
|
|
+ });
|
|
|
question.score = calcSum(
|
|
|
question.subQuestions.map((q) => q.score || 0)
|
|
|
);
|