Commit 392e8c4e by Chao Sun

789

parent 9901c22c
......@@ -51,16 +51,7 @@ export class Page2Component implements OnInit {
options.forEach(option => {
if (option['selected']) {
this.selectedObj = option;
const ret = {
pageId: this.curPageData['pageId'],
questions: [
{
questionId: this.curPageData['questions'][0].questionId,
options: [this.selectedObj]
}
]
}
this.getAllAnswer.emit(ret);
this.getAnswer(this.selectedObj)
}
})
}
......
......@@ -45,16 +45,7 @@ export class Page5Component implements OnInit {
options.forEach(option => {
if (option['selected']) {
this.selectedObj = option;
const ret = {
pageId: this.curPageData['pageId'],
questions: [
{
questionId: this.curPageData['questions'][0].questionId,
options: [this.selectedObj]
}
]
}
this.getAllAnswer.emit(ret);
this.getAnswer(this.selectedObj)
}
})
}
......
......@@ -53,7 +53,14 @@ export class Page7Component implements OnInit {
if (option['selected']) {
// console.log(this.selectedObj)
this.selectedObj[question['questionId']] = option
const questions = Object.keys(this.curAllQues).map(questionId => {
return { questionId, options: [this.curAllQues[questionId]] }
})
const ret = {
pageId: 7,
questions
}
this.getAllAnswer.emit(ret)
}
})
})
......
......@@ -53,6 +53,14 @@ export class Page8Component implements OnInit {
question['options'].forEach(option => {
if (option['selected']) {
this.selectedObj[question['questionId']] = option
const questions = Object.keys(this.curAllQues).map(questionId => {
return { questionId, options: [this.curAllQues[questionId]] }
})
const ret = {
pageId: 8,
questions
}
this.getAllAnswer.emit(ret)
}
})
})
......
......@@ -50,6 +50,14 @@ export class Page9Component implements OnInit {
question['options'].forEach(option => {
if (option['selected']) {
this.selectedObj[question['questionId']] = option
const questions = Object.keys(this.curAllQues).map(questionId => {
return { questionId, options: [this.curAllQues[questionId]] }
})
const ret = {
pageId: 9,
questions
}
this.getAllAnswer.emit(ret)
}
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment