|
@@ -154,7 +154,15 @@ export default {
|
|
|
toExcel() {
|
|
|
const { export_json_to_excel } = require('@frame/excel/Export2Excel');
|
|
|
let duplicate = _.cloneDeep(this.cdata);
|
|
|
- console.log(duplicate);
|
|
|
+ const data = [];
|
|
|
+ for (const dup of duplicate) {
|
|
|
+ const elm = { studentname: dup.studentname };
|
|
|
+ for (const answer of dup.answers) {
|
|
|
+ elm[answer.questionid] = answer.answer;
|
|
|
+ }
|
|
|
+ data.push(elm);
|
|
|
+ }
|
|
|
+ console.log(data);
|
|
|
},
|
|
|
},
|
|
|
computed: {
|