|
@@ -13,9 +13,6 @@
|
|
|
<div [ngSwitch]="ques.NAME">
|
|
|
<div *ngSwitchCase="'单选题'">
|
|
|
<span class="ion-text-wrap">{{ ques.order }}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
- <div style="width: 100%;text-align: right;color:red;" (click)="ques.showAnswer=true">
|
|
|
- <ion-icon name="checkbox-outline" size="large"></ion-icon>
|
|
|
- </div>
|
|
|
<div [class]="{'isright-answer':ans.ISRIGHT&&ques.showAnswer}"
|
|
|
*ngFor="let ans of ques.ANSWERS;let $index = index">
|
|
|
<input name="rd_p_{{ques.row_num}}_{{$index}}" type="radio" [(ngModel)]="ques.useranswer"
|
|
@@ -26,25 +23,24 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div *ngSwitchCase="'填空题'">
|
|
|
- <div style="width: 100%;text-align: right;color:red;" (click)="ques.showAnswer=true">
|
|
|
- <ion-icon name="checkbox-outline" size="large"></ion-icon>
|
|
|
- </div>
|
|
|
<div class="input-container">
|
|
|
{{ ques.order }}.({{ ques.NAME }})
|
|
|
<ng-container *ngFor="let word of ques.CONTENT.split('___'); let j = index">
|
|
|
{{ word }}
|
|
|
<!-- 如果当前是句子中的最后一个词前的下划线,则不添加输入框 -->
|
|
|
<ng-container *ngIf="j < ques.CONTENT.split('___').length - 1">
|
|
|
- <ion-input [(ngModel)]="ques.ANSWERS[j].useranswer" placeholder="请输入" (ngModelChange)="answer(ques)"></ion-input>
|
|
|
+ <ion-input [(ngModel)]="ques.ANSWERS[j].useranswer" placeholder="请输入"
|
|
|
+ (ngModelChange)="answer(ques)"></ion-input>
|
|
|
</ng-container>
|
|
|
</ng-container>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div *ngSwitchCase="'判断题'">
|
|
|
- <span class="ion-text-wrap">{{ ques.order}}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
+ <span class="ion-text-wrap">{{ ques.order }}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
<div [class]="{'isright-answer':ans.ISRIGHT&&ques.showAnswer}"
|
|
|
*ngFor="let ans of ques.ANSWERS;let $index = index">
|
|
|
- <input name="rd_p_{{ques.row_num}}_{{$index}}" type="radio" [(ngModel)]="ques.useranswer" (ngModelChange)="answer(ques)"
|
|
|
+ <input name="rd_p_{{ques.row_num}}_{{$index}}" type="radio" [(ngModel)]="ques.useranswer"
|
|
|
+ (ngModelChange)="answer(ques)"
|
|
|
value="{{ans.PROVID_ANSWER_ID}}"
|
|
|
class="with-gap" id="rd_p_{{ques.row_num}}_{{$index}}"/>
|
|
|
<label for="rd_p_{{ques.row_num}}_{{$index}}">{{ options($index) }}、{{ ans.ANSWER_NAME }}</label>
|
|
@@ -61,12 +57,10 @@
|
|
|
</div>
|
|
|
<div *ngSwitchCase="'多选题'">
|
|
|
<span class="ion-text-wrap">{{ ques.order }}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
- <div style="width: 100%;text-align: right;color:red;" (click)="ques.showAnswer=true">
|
|
|
- <ion-icon name="checkbox-outline" size="large"></ion-icon>
|
|
|
- </div>
|
|
|
<div [class]="{'isright-answer':ans.ISRIGHT&&ques.showAnswer}"
|
|
|
*ngFor="let ans of ques.ANSWERS;let $index = index">
|
|
|
- <input name="ckb_{{ques.row_num}}_{{$index}}" type="checkbox" [(ngModel)]="ans.useranswer" (ngModelChange)="answer(ques)"
|
|
|
+ <input name="ckb_{{ques.row_num}}_{{$index}}" type="checkbox" [(ngModel)]="ans.useranswer"
|
|
|
+ (ngModelChange)="answer(ques)"
|
|
|
value="{{ans.PROVID_ANSWER_ID}}"
|
|
|
class="with-gap" id="ckb_{{ques.row_num}}_{{$index}}"/>
|
|
|
<label for="ckb_{{ques.row_num}}_{{$index}}">{{ options($index) }}、{{ ans.ANSWER_NAME }}</label>
|
|
@@ -81,15 +75,23 @@
|
|
|
</ion-content>
|
|
|
<ion-footer>
|
|
|
<ion-toolbar style="display: flex;align-items: center">
|
|
|
- <ion-icon (click)="presentModal()" name="reorder-four-outline" style="color: red;vertical-align: middle;"
|
|
|
- size="large"
|
|
|
- aria-label="Favorite"></ion-icon>
|
|
|
- <span>已答{{ answerCount }}/{{ questionCount }}</span>
|
|
|
- <ion-button size="small" slot="end" *ngIf="order>1" (click)="order=order-1;changeView();">
|
|
|
- 上一题
|
|
|
- </ion-button>
|
|
|
- <ion-button size="small" slot="end" *ngIf="questionCount>order" (click)="order=order+1;changeView();">
|
|
|
- 下一题
|
|
|
- </ion-button>
|
|
|
+ <ng-container *ngIf="!showErrorQuestion">
|
|
|
+ <ion-icon (click)="presentModal()" name="reorder-four-outline" style="color: red;vertical-align: middle;"
|
|
|
+ size="large"
|
|
|
+ aria-label="Favorite"></ion-icon>
|
|
|
+ <span>已答{{ answerCount }}/{{ questionCount }}</span>
|
|
|
+ <ion-icon slot="end" name="checkbox-outline" size="large" (click)="showAnswer()"></ion-icon>
|
|
|
+ <ion-button size="small" slot="end" *ngIf="order>1" (click)="order=order-1;changeView();">
|
|
|
+ 上一题
|
|
|
+ </ion-button>
|
|
|
+ <ion-button size="small" slot="end" *ngIf="questionCount>order" (click)="order=order+1;changeView();">
|
|
|
+ 下一题
|
|
|
+ </ion-button>
|
|
|
+ <ion-button size="small" slot="end" color="warning" (click)="resultModal()">结束练习</ion-button>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container *ngIf="showErrorQuestion">
|
|
|
+ <ion-icon slot="end" name="checkbox-outline" size="large" (click)="showAnswer()"></ion-icon>
|
|
|
+ <ion-button size="small" slot="end" color="warning" (click)="close()">退出练习</ion-button>
|
|
|
+ </ng-container>
|
|
|
</ion-toolbar>
|
|
|
</ion-footer>
|