Skip to content
learning-list.html 11.3 KiB
Newer Older
wangqinghua's avatar
wangqinghua committed
<ion-header>
    <ion-navbar>
        <ion-title>测试列表</ion-title>
    </ion-navbar>
    <div class="tabs-parent">
        <div *ngFor="let item of tabsList;let i = index" (click)="change(i)" class="tabs-children">{{item.name}}</div>
        <span #tips id="tips"></span>
    </div>
</ion-header>


<ion-content class="bgc-e7e8ed">
    <!--下拉刷新-->
    <!--<ion-refresher (ionRefresh)="doRefresh($event)">-->
    <!--<ion-refresher-content pullingText="下拉刷新"-->
    <!--pullingIcon="arrow-dropdown"-->
    <!--refreshingSpinner="bubbles">-->
    <!--</ion-refresher-content>-->
    <!--</ion-refresher>-->

    <ng-container *ngIf="link">
        <ng-container *ngIf="index == 0">
            <ion-list>
                <ng-container *ngFor="let item of list">
                    <ion-item class="item-list margin-bottom-10">
                        <div class="item">
                            <div class="item-header padding-15-0">
                                <div class="item-header-style">
                                    <span class="item-title">{{item.title}}</span>
                                    <span *ngIf="item.testResult == 0" float-right class="gray">未完成</span>
                                    <span *ngIf="item.testResult == 1" float-right class="red">测试未通过</span>
                                    <span *ngIf="item.testResult == 2" float-right class="green">测试通过</span>
                                    <span *ngIf="item.testResult == 3" float-right class="yellow">等待评分</span>
                                </div>
                                <div class="item-header-style" style="font-size: 1.4rem;margin-top: 5px;color: #666666">
                                    <span>重复测试:</span>
                                    <span *ngIf="item.isRepeat == 1">允许</span>
                                    <span *ngIf="item.isRepeat == 0">不允许</span>
                                </div>
                            </div>
                            <div class="content-button padding-15-0 fontSize-15">
                                <span>参与人员:</span>
                                <span *ngIf="item.testObject">{{item.testObject}}</span>
                                <span *ngIf="item.testResult != 0" (click)="goToResult(item)" float-right class="look">查看结果</span>
                                <span *ngIf="item.testResult == 0" (click)="goToResult(item)" float-right class="join">开始测试</span>
                            </div>
                            <ng-container *ngIf="item.isRank == 1">
                                <div class="content-button padding-15-0 fontSize-15">
                                <span class="margin-right-10">最高分:<span
                                        *ngIf="!item?.maxNum && item?.maxNum != 0"></span>
                                    <span class="color-red">{{item.maxNum}}</span>
                                 </span>
                                    <span>排名:</span>
                                    <span *ngIf="!item?.ranking"></span>
                                    <span class="color-red">{{item.ranking}}</span>

                                    <span (click)="goToRank(item)" float-right class="look">TOP5排行榜</span>
                                </div>
                            </ng-container>
                        </div>
                    </ion-item>
                </ng-container>
                <ng-container *ngIf="list.length == 0">
                    <ion-list text-center style="margin-top: 10rem">
                        <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
                        <p text-center>
                            暂无测试
                        </p>
                    </ion-list>
                </ng-container>
            </ion-list>
        </ng-container>
        <ng-container *ngIf="index == 1">
            <ion-list>
                <ng-container *ngIf="noList.length > 0">
                    <ng-container *ngFor="let item of noList">
                        <ion-item class="item-list margin-bottom-10">
                            <div class="item" (click)="goToResult(item)">
                                <div class="item-header padding-15-0">
                                    <div class="item-header-style">
                                        <span class="item-title">{{item.title}}</span>
                                        <span *ngIf="item.testResult == 0" float-right class="gray">未完成</span>
                                        <span *ngIf="item.testResult == 1" float-right class="red">测试未通过</span>
                                        <span *ngIf="item.testResult == 2" float-right class="green">测试通过</span>
                                        <span *ngIf="item.testResult == 3" float-right class="yellow">等待评分</span>
                                    </div>
                                    <div class="item-header-style"
                                         style="font-size: 1.4rem;margin-top: 5px;color: #666666">
                                        <span>重复测试:</span>
                                        <span *ngIf="item.isRepeat == 1">允许</span>
                                        <span *ngIf="item.isRepeat == 0">不允许</span>
                                    </div>
                                </div>
                                <div class="content-button padding-15-0 fontSize-15">
                                    <span>参与人员:</span>
                                    <span *ngIf="item.testObject">{{item.testObject}}</span>
                                    <span *ngIf="item.testResult != 0" (click)="goToResult(item)" float-right
                                          class="look">查看结果</span>
                                    <span *ngIf="item.testResult == 0" (click)="goToResult(item)" float-right
                                          class="join">开始测试</span>
                                </div>
                                <ng-container *ngIf="item.isRank == 1">
                                    <div class="content-button padding-15-0 fontSize-15">
                                <span class="margin-right-10">最高分:<span
                                        *ngIf="!item?.maxNum && item?.maxNum != 0"></span>
                                    <span class="color-red">{{item.maxNum}}</span>
                                 </span>
                                        <span>排名:</span>
                                        <span *ngIf="!item?.ranking"></span>
                                        <span class="color-red">{{item.ranking}}</span>

                                        <span (click)="goToRank(item)" float-right class="look">TOP5排行榜</span>
                                    </div>
                                </ng-container>
                            </div>
                        </ion-item>
                    </ng-container>
                </ng-container>
                <ng-container *ngIf="noList.length == 0">
                    <ion-list text-center style="margin-top: 10rem">
                        <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
                        <p text-center>
                            暂无测试
                        </p>
                    </ion-list>
                </ng-container>
            </ion-list>
        </ng-container>
        <ng-container *ngIf="index == 2">
            <ion-list>
                <ng-container *ngIf="doList.length > 0">
                    <ng-container *ngFor="let item of doList">
                        <ion-item class="item-list margin-bottom-10">
                            <div class="item" (click)="goToResult(item)">
                                <div class="item-header padding-15-0">
                                    <div class="item-header-style">
                                        <span class="item-title">{{item.title}}</span>
                                        <span *ngIf="item.testResult == 0" float-right class="gray">未完成</span>
                                        <span *ngIf="item.testResult == 1" float-right class="red">测试未通过</span>
                                        <span *ngIf="item.testResult == 2" float-right class="green">测试通过</span>
                                        <span *ngIf="item.testResult == 3" float-right class="yellow">等待评分</span>
                                    </div>
                                    <div class="item-header-style"
                                         style="font-size: 1.4rem;margin-top: 5px;color: #666666">
                                        <span>重复测试:</span>
                                        <span *ngIf="item.isRepeat == 1">允许</span>
                                        <span *ngIf="item.isRepeat == 0">不允许</span>
                                    </div>
                                </div>
                                <div class="content-button padding-15-0 fontSize-15">
                                    <span>参与人员:</span>
                                    <span *ngIf="item.testObject">{{item.testObject}}</span>
                                    <span *ngIf="item.testResult != 0" (click)="goToResult(item)" float-right
                                          class="look">查看结果</span>
                                    <span *ngIf="item.testResult == 0" (click)="goToResult(item)" float-right
                                          class="join">开始测试</span>
                                </div>
                                <ng-container *ngIf="item.isRank == 1">
                                    <div class="content-button padding-15-0 fontSize-15">
                                <span class="margin-right-10">最高分:<span
                                        *ngIf="!item?.maxNum && item?.maxNum != 0"></span>
                                    <span class="color-red">{{item.maxNum}}</span>
                                 </span>
                                        <span>排名:</span>
                                        <span *ngIf="!item?.ranking"></span>
                                        <span class="color-red">{{item.ranking}}</span>

                                        <span (click)="goToRank(item)" float-right class="look">TOP5排行榜</span>
                                    </div>
                                </ng-container>
                            </div>
                        </ion-item>
                    </ng-container>
                </ng-container>
                <ng-container *ngIf="doList.length == 0">
                    <ion-list text-center style="margin-top: 10rem">
                        <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
                        <p text-center>
                            暂无测试
                        </p>
                    </ion-list>
                </ng-container>
            </ion-list>
        </ng-container>
    </ng-container>
    <!--上滑加载数据-->
    <!--<ion-infinite-scroll (ionInfinite)="doInfinite($event)">-->
wangqinghua's avatar
wangqinghua committed
    <!--<ion-infinite-scroll-content></ion-infinite-scroll-content>-->
wangqinghua's avatar
wangqinghua committed
    <!--</ion-infinite-scroll>-->
</ion-content>