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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<ion-header>
<ion-navbar>
<ion-title>问卷回答</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<ion-item>
<ion-label class="padding-left-16">{{item?.title}}</ion-label>
</ion-item>
<ion-item>
<p>问卷说明:{{item?.explai}}</p>
</ion-item>
<div class="question-list">
<ion-item *ngFor="let item of ansArr;let i = index">
<div class="item-content">
<!--判断题目类型-->
<p><span class="color-red" *ngIf="item.isAns == 1">*</span>{{i +1}}、
<span *ngIf="item.quesType == 1">(判断)</span>
<span *ngIf="item.quesType == 2">(单选)</span>
<span *ngIf="item.quesType == 3">(多选)</span>
<span *ngIf="item.quesType == 4">(问答)</span>
{{item.title}}
</p>
<div class="padding-0-30">
<ng-container *ngIf="item.quesType == 1">
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="0" type="radio">是
<span class="input-radio"></span>
</label>
</p>
<p>
<label>
<input [(ngModel)]="item.answerdesc" name="{{item.questionQueId}}" value="1" type="radio">否
<span class="input-radio"></span>
</label>
</p>
</ng-container>
<!--单选题-->
<ng-container *ngIf="item.quesType == 2">
<ng-container *ngFor=" let option1 of item.quesDesc;let optIndex = index;">
<p>
<label>
<input [(ngModel)]="item.answerdesc" type="radio" value="{{optIndex}}" name="{{item.questionQueId}}">{{option1.option_title}}
<span class="input-radio"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--多选题-->
<ng-container *ngIf="item.quesType == 3">
<ng-container *ngFor=" let option2 of item.quesDesc;let quesIndex = index;">
<p>
<label>
<input type="checkbox" (change)="mutiSelect(i,quesIndex)" value="{{quesIndex}}">{{option2.option_title}}
<span class="input-check"></span>
</label>
</p>
</ng-container>
</ng-container>
<!--问答题-->
<ng-container *ngIf="item.quesType == 4">
<textarea [(ngModel)]="item.answerdesc" class="content-textarea"></textarea>
</ng-container>
</div>
</div>
</ion-item>
</div>
</ion-list>
<p class="text-center" *ngIf="isansName == '是'">
<label>
<input type="checkbox" [(ngModel)]="isans">
<span class="input-check"></span>
<span>匿名回答</span>
</label>
</p>
<button class="submit-btn submit" (click)="confirm()">提交</button>
</ion-content>