<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 *ngIf="list.length > 0">
          <ng-container *ngFor="let item of list" >
            <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.status == 1" float-right class="gray">未完成</span>
                    <span *ngIf="item.status == 2" float-right class="green">测试通过</span>
                    <span *ngIf="item.status == 3" float-right class="yellow">等待评分</span>
                    <span *ngIf="item.status == 4" float-right class="red">测试未通过</span>
                  </div>
                </div>
                <div class="content-button padding-15-0">
                  <span>参与人员:</span>
                  <span *ngIf="item.groupName">{{item.groupName}}</span>
                  <span *ngIf="!item.groupName">全体人员</span>
                  <span *ngIf="item.status != 1" float-right class="look">查看</span>
                  <span *ngIf="item.status == 1"  float-right class="join">测试</span>
                </div>
              </div>
            </ion-item>
          </ng-container>
        </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 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 float-right class="green">已完成</span>
                  </div>
                </div>
                <div class="content-button padding-15-0">
                  <span>参与人员:</span>
                  <span *ngIf="item.groupName">{{item.groupName}}</span>
                  <span *ngIf="!item.groupName">全体人员</span>
                  <span float-right class="look">查看</span>
                </div>
              </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 float-right class="green">已完成</span>
                  </div>
                </div>
                <div class="content-button padding-15-0">
                  <span>参与人员:</span>
                  <span *ngIf="item.groupName">{{item.groupName}}</span>
                  <span *ngIf="!item.groupName">全体人员</span>
                  <span float-right class="look">查看</span>
                </div>
              </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 *ngIf="index == 3">
      <ion-list>
        <ng-container *ngIf="edList.length > 0">
          <ng-container *ngFor="let item of edList">
            <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 float-right class="green">已完成</span>
                  </div>
                </div>
                <div class="content-button padding-15-0">
                  <span>参与人员:</span>
                  <span *ngIf="item.groupName">{{item.groupName}}</span>
                  <span *ngIf="!item.groupName">全体人员</span>
                  <span float-right class="look">查看</span>
                </div>
              </div>
            </ion-item>
          </ng-container>
        </ng-container>
        <ng-container *ngIf="edList.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)">
    <ion-infinite-scroll-content></ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>
