|
@@ -0,0 +1,143 @@
|
|
|
+<ion-header class="header-theme2" id="main-content">
|
|
|
+ <ion-toolbar>
|
|
|
+ <ion-label class="title-center">自测练习</ion-label>
|
|
|
+ <ion-buttons slot="start">
|
|
|
+ <ion-back-button icon="ios-back2" text="" mode="md"></ion-back-button>
|
|
|
+ </ion-buttons>
|
|
|
+ </ion-toolbar>
|
|
|
+</ion-header>
|
|
|
+<ion-content>
|
|
|
+ <ion-list>
|
|
|
+ <div class="question-body" *ngFor="let ques of testQuestionList;let i = index">
|
|
|
+
|
|
|
+ <div [ngSwitch]="ques.NAME">
|
|
|
+ <div *ngSwitchCase="'单选题'">
|
|
|
+ <span class="ion-text-wrap">{{ i + 1 }}.({{ 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}}"
|
|
|
+ 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>
|
|
|
+ </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">
|
|
|
+ {{ i + 1 }}.({{ 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>
|
|
|
+ </ng-container>
|
|
|
+ </ng-container>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div *ngSwitchCase="'判断题'">
|
|
|
+ <span class="ion-text-wrap">{{ i + 1 }}.({{ 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"
|
|
|
+ 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>
|
|
|
+ <span class="isright-answer" *ngIf="ans.ISRIGHT&&ques.showAnswer">✔</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div *ngSwitchCase="'简答题'">
|
|
|
+ <span class="ion-text-wrap">{{ i + 1 }}.({{ 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"
|
|
|
+ [(ngModel)]="ans.useranswer"></ion-textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div *ngSwitchCase="'多选题'">
|
|
|
+ <span class="ion-text-wrap">{{ i + 1 }}.({{ 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"
|
|
|
+ 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>
|
|
|
+ <span class="isright-answer" *ngIf="ans.ISRIGHT&&ques.showAnswer">✔</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="isright-answer" *ngIf="ques.showAnswer">参考答案:{{ parseAnswer(ques.ANSWERS, ques.NAME) }}</div>
|
|
|
+ <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"
|
|
|
+ aria-label="Favorite"></ion-icon>
|
|
|
+ <span>已答4/100</span>
|
|
|
+ <ion-button size="small" slot="end">
|
|
|
+ <ion-icon slot="start" name="star"></ion-icon>
|
|
|
+ 上一题
|
|
|
+ </ion-button>
|
|
|
+ <ion-button size="small" slot="end">
|
|
|
+ 下一题
|
|
|
+ <ion-icon slot="end" name="heart"></ion-icon>
|
|
|
+ </ion-button>
|
|
|
+ </ion-toolbar>
|
|
|
+</ion-footer>
|