Commit 09cb8c21 by Sweet Zhang

修改

parent b0496b94
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -58,7 +58,7 @@ export class AskComponent implements OnInit {
return
}
}
if (this.curPage == 13) {
if (optionId == 1) {
this.curPage = this.curPage - 3
......@@ -79,7 +79,7 @@ export class AskComponent implements OnInit {
}
}
}
this.curPage--;
this.setCurPageData()
} else {
......@@ -109,13 +109,13 @@ export class AskComponent implements OnInit {
) {
this.curPage++
this.setCurPageData()
}
} else {
this.curPage = 0
return
}
const answerParam = {
survey: {
customerId: this.commonService.getQueryString('customerId'),
......@@ -139,7 +139,7 @@ export class AskComponent implements OnInit {
if(optionId==1 || optionId==3){
if(e['questions'].length>0){
this.nextBtn = true
}
}
}
}
if(this.curPageData['questions'].length == e['questions'].length){
......@@ -148,7 +148,7 @@ export class AskComponent implements OnInit {
}
setCurPageData() {
const thePateData = this.allQues[this.curPage]
this.curPageData = thePateData
const page2Answer = this.allAnswers[1]
if (this.curPage == 2) {
......
......@@ -26,7 +26,7 @@ export class Page11Component implements OnInit {
let index = this.allOptions.indexOf(this.allOptions[i])
if (index > -1) {
this.allOptions.splice(index, 1)
}
}
}
}
this.allOptions.push(options)
......@@ -73,7 +73,19 @@ export class Page11Component implements OnInit {
}
questions[0]['options'].forEach(option => {
if(option['selected']){
this.allOptions.push(option)
this.allOptions.push(option);
const ret = {
// ...this.curPageData,
pageId: this.curPageData['pageId'],
questions: [
{
...this.curPageData['questions'][0],
questionId: this.curPageData['questions'][0].questionId,
options: this.filterItems()
}
]
}
this.getAllAnswer.emit(ret)
}
});
}
......
......@@ -23,7 +23,7 @@ export class Page12Component implements OnInit {
let index = this.allOptions.indexOf(this.allOptions[i])
if (index > -1) {
this.allOptions.splice(index, 1)
}
}
}
}
this.allOptions.push(options)
......@@ -70,7 +70,19 @@ export class Page12Component implements OnInit {
}
questions[0]['options'].forEach(option => {
if(option['selected']){
this.allOptions.push(option)
this.allOptions.push(option);
const ret = {
// ...this.curPageData,
pageId: this.curPageData['pageId'],
questions: [
{
...this.curPageData['questions'][0],
questionId: this.curPageData['questions'][0].questionId,
options: this.filterItems()
}
]
}
this.getAllAnswer.emit(ret)
}
});
}
......
......@@ -22,7 +22,7 @@ export class Page13Component implements OnInit {
let index = this.allOptions.indexOf(this.allOptions[i])
if (index > -1) {
this.allOptions.splice(index, 1)
}
}
}
}
this.allOptions.push(options)
......@@ -67,7 +67,19 @@ export class Page13Component implements OnInit {
}
questions[0]['options'].forEach(option => {
if(option['selected']){
this.allOptions.push(option)
this.allOptions.push(option);
const ret = {
// ...this.curPageData,
pageId: this.curPageData['pageId'],
questions: [
{
...this.curPageData['questions'][0],
questionId: this.curPageData['questions'][0].questionId,
options: this.filterItems()
}
]
}
this.getAllAnswer.emit(ret)
}
});
}
......
......@@ -37,7 +37,7 @@ export class Page14Component implements OnInit {
let index = this.allOptions.indexOf(this.allOptions[i])
if (index > -1) {
this.allOptions.splice(index, 1)
}
}
}
}
this.allOptions.push(options)
......@@ -108,7 +108,8 @@ export class Page14Component implements OnInit {
}
options.forEach(option => {
if (option['selected']) {
this.selectedObj = option
this.selectedObj = option;
this.getAnswer(this.selectedObj);
}
})
}
......
......@@ -39,7 +39,7 @@ export class Page15Component implements OnInit {
let index = this.allOptions.indexOf(this.allOptions[i])
if (index > -1) {
this.allOptions.splice(index, 1)
}
}
}
}
this.allOptions.push(options)
......@@ -111,7 +111,8 @@ export class Page15Component implements OnInit {
}
options.forEach(option => {
if (option['selected']) {
this.selectedObj = option
this.selectedObj = option;
this.getAnswer(this.selectedObj);
}
})
}
......@@ -137,5 +138,5 @@ export class Page15Component implements OnInit {
}
});
}
}
......@@ -107,10 +107,11 @@ export class Page16Component implements OnInit {
}
options.forEach(option => {
if (option['selected']) {
this.selectedProvinceObj = option
this.selectedProvinceObj = option;
this.getAnswer(this.selectedProvinceObj);
}
})
console.log(this.selectedProvinceObj)
}
}
......@@ -50,7 +50,17 @@ export class Page2Component implements OnInit {
}
options.forEach(option => {
if (option['selected']) {
this.selectedObj = option
this.selectedObj = option;
const ret = {
pageId: this.curPageData['pageId'],
questions: [
{
questionId: this.curPageData['questions'][0].questionId,
options: [this.selectedObj]
}
]
}
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