<!--测试页面-->
<ion-header>

    <ion-navbar>
        <ion-title>学习测试</ion-title>
    </ion-navbar>

</ion-header>


<ion-content>
    <div class="main-container">
        <ion-slides>
            <ion-slide *ngFor="let item of list;">
                <div class="learn-item">
                    <div class="learn-title">学习测试标题学习测试标题学习测试标题</div>
                    <div class="item-container">
                        <div class="item-title">
                            <!--判断题目类型-->
                            <p>
                                <span class="color-red" *ngIf="item.isAns == 1">*</span>{{index}}、
                                <span *ngIf="item.quesType == 1">(判断)</span>
                                <span *ngIf="item.quesType == 2">(单选)</span>
                                <span *ngIf="item.quesType == 3">(多选)</span>
                                <span *ngIf="item.quesType == 4">(填空)</span>
                                <span *ngIf="item.quesType == 5">(问答)</span>
                                {{item.title}}
                            </p>
                        </div>
                        <div class="item-content">
                            <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>
                                <!--问答-->
                                <ng-container *ngIf="item.quesType == 5">
                                    <textarea [(ngModel)]="item.answerdesc" class="content-textarea"></textarea>
                                </ng-container>
                            </div>
                        </div>
                    </div>
                </div>
            </ion-slide>
        </ion-slides>
    </div>
    <div class="footer-subject">
        <div (click)="prev()" class="prev">上一题</div>
        <div class="index">{{index}} / {{list.length}}</div>
        <div (click)="next()" class="next">下一题</div>
    </div>
    <div class="footer-submit">
        <div class="time">01：30：30</div>
        <div class="submit" (click)="submit()">
            <span>交卷</span>
        </div>
    </div>
</ion-content>
