|
@@ -8,18 +8,18 @@
|
|
|
</ion-header>
|
|
|
<ion-content>
|
|
|
<ion-list>
|
|
|
- <div class="question-body" *ngFor="let ques of testQuestionList;let i = index">
|
|
|
+ <div class="question-body" *ngFor="let ques of curQuestionList;let i = index">
|
|
|
|
|
|
<div [ngSwitch]="ques.NAME">
|
|
|
<div *ngSwitchCase="'单选题'">
|
|
|
- <span class="ion-text-wrap">{{ i + 1 }}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
+ <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"
|
|
|
- value="{{ans.PROVID_ANSWER_ID}}"
|
|
|
+ value="{{ans.PROVID_ANSWER_ID}}" (ngModelChange)="answer(ques)"
|
|
|
class="with-gap" id="rd_p_{{ques.row_num}}_{{$index}}"/>
|
|
|
<label for="rd_p_{{ques.row_num}}_{{$index}}">{{ options($index) }}、{{ ans.ANSWER_NAME }}</label>
|
|
|
<span class="isright-answer" *ngIf="ans.ISRIGHT&&ques.showAnswer">✔</span>
|
|
@@ -30,21 +30,21 @@
|
|
|
<ion-icon name="checkbox-outline" size="large"></ion-icon>
|
|
|
</div>
|
|
|
<div class="input-container">
|
|
|
- {{ i + 1 }}.({{ ques.NAME }})
|
|
|
+ {{ 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="请输入"></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">{{ i + 1 }}.({{ 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"
|
|
|
+ <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>
|
|
@@ -52,21 +52,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div *ngSwitchCase="'简答题'">
|
|
|
- <span class="ion-text-wrap">{{ i + 1 }}.({{ 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">
|
|
|
- <ion-textarea readonly="false" placeholder="请填写" name="remark"
|
|
|
+ <ion-textarea readonly="false" placeholder="请填写" name="remark" (ngModelChange)="answer(ques)"
|
|
|
[(ngModel)]="ans.useranswer"></ion-textarea>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div *ngSwitchCase="'多选题'">
|
|
|
- <span class="ion-text-wrap">{{ i + 1 }}.({{ ques.NAME }}){{ ques.CONTENT }}</span>
|
|
|
+ <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"
|
|
|
+ <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>
|
|
@@ -78,66 +78,18 @@
|
|
|
<div class="isright-answer" *ngIf="ques.showAnswer">题目解析<br/>{{ ques.NOTE }}</div>
|
|
|
</div>
|
|
|
</ion-list>
|
|
|
- <ion-button id="open-modal">Open Modal</ion-button>
|
|
|
-
|
|
|
- <ion-modal #modal trigger="open-modal" >
|
|
|
- <ng-template>
|
|
|
- <ion-content>
|
|
|
- <ion-searchbar placeholder="Search" ></ion-searchbar>
|
|
|
- <ion-list>
|
|
|
- <ion-item>
|
|
|
- <ion-avatar slot="start">
|
|
|
- <ion-img src="https://i.pravatar.cc/300?u=b"></ion-img>
|
|
|
- </ion-avatar>
|
|
|
- <ion-label>
|
|
|
- <h2>Connor Smith</h2>
|
|
|
- <p>Sales Rep</p>
|
|
|
- </ion-label>
|
|
|
- </ion-item>
|
|
|
- <ion-item>
|
|
|
- <ion-avatar slot="start">
|
|
|
- <ion-img src="https://i.pravatar.cc/300?u=a"></ion-img>
|
|
|
- </ion-avatar>
|
|
|
- <ion-label>
|
|
|
- <h2>Daniel Smith</h2>
|
|
|
- <p>Product Designer</p>
|
|
|
- </ion-label>
|
|
|
- </ion-item>
|
|
|
- <ion-item>
|
|
|
- <ion-avatar slot="start">
|
|
|
- <ion-img src="https://i.pravatar.cc/300?u=d"></ion-img>
|
|
|
- </ion-avatar>
|
|
|
- <ion-label>
|
|
|
- <h2>Greg Smith</h2>
|
|
|
- <p>Director of Operations</p>
|
|
|
- </ion-label>
|
|
|
- </ion-item>
|
|
|
- <ion-item>
|
|
|
- <ion-avatar slot="start">
|
|
|
- <ion-img src="https://i.pravatar.cc/300?u=e"></ion-img>
|
|
|
- </ion-avatar>
|
|
|
- <ion-label>
|
|
|
- <h2>Zoey Smith</h2>
|
|
|
- <p>CEO</p>
|
|
|
- </ion-label>
|
|
|
- </ion-item>
|
|
|
- </ion-list>
|
|
|
- </ion-content>
|
|
|
- </ng-template>
|
|
|
- </ion-modal>
|
|
|
</ion-content>
|
|
|
<ion-footer>
|
|
|
<ion-toolbar style="display: flex;align-items: center">
|
|
|
- <ion-icon name="reorder-four-outline" style="color: red;vertical-align: middle;" size="large"
|
|
|
+ <ion-icon (click)="presentModal()" name="reorder-four-outline" style="color: red;vertical-align: middle;"
|
|
|
+ size="large"
|
|
|
aria-label="Favorite"></ion-icon>
|
|
|
- <span>已答4/100</span>
|
|
|
- <ion-button size="small" slot="end">
|
|
|
- <ion-icon slot="start" name="star"></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">
|
|
|
+ <ion-button size="small" slot="end" *ngIf="questionCount>order" (click)="order=order+1;changeView();">
|
|
|
下一题
|
|
|
- <ion-icon slot="end" name="heart"></ion-icon>
|
|
|
</ion-button>
|
|
|
</ion-toolbar>
|
|
|
</ion-footer>
|