Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Component } from '@angular/core';
import {IonicPage, ModalController, NavController, NavParams} from 'ionic-angular';
import { AppService } from "../../../../service/http.service";
import { message } from "../../../../app/main";
import { PersonListPage } from "../../../contact/person-list/person-list";
import {QuestionDetailPage} from "../question-detail/question-detail";
@IonicPage()
@Component({
selector: 'page-survey-result',
templateUrl: 'survey-result.html',
})
export class SurveyResultPage {
item;
userId;
survey;
contentList;
constructor(public navCtrl: NavController, public navParams: NavParams,
public appService: AppService,public modalCtrl: ModalController) {
}
ionViewDidLoad() {
this.item = this.navParams.get('item');
this.getResult();
}
getResult(){
this.appService.ObserverHttpGetAdd('/wisdomgroup/modules/question/show/',this.item.id)
.subscribe((res)=>{
this.survey = res.json().data;
this.contentList = res.json().data.ques.datalist;
this.contentList.forEach(res=>{
res.quesDesc = JSON.parse(res.quesDesc);
});
})
}
look(item){
let peoModal = this.modalCtrl.create(QuestionDetailPage,{item:item});
peoModal.onDidDismiss( res=>{
const data = {
};
} );
peoModal.present();
}
}