<ion-header>
  <ion-navbar>
    <ion-title>值班换班</ion-title>
  </ion-navbar>
</ion-header>


<ion-content class="bgc-e7e8ed">
  <div class="duty">
    <div class="dutyItem" (click)="change(1)">
      <span  class="{{changeType == 1?'duty-title':''}}">未处理</span>
    </div>
    <div class="dutyItem"  (click)="change(2)">
      <span class="{{changeType == 2?'duty-title':''}}">已处理</span>
    </div>
  </div>
    <ion-list class="margin-top-10">
      <ng-container *ngIf="changeType == 1">
        <ion-item *ngFor="let item1 of noList;" class="margin-bottom-10">
          <div (click)="goApplyDetail(item1)">
            <div class="margin-bottom-10">
              <span>{{item1.name}}</span>
              <span>{{item1.phoneNumber}}</span>
              <span float-right>{{item1.dutyDate | date:'yyyy-MM-dd'}}</span>
            </div>
            <div class="color-666">
              <!--1正常工作日，2节假日，3调休，4调班，5休息日-->
              <span>{{item1.orgName}}</span>
              <span float-right>
                 <span *ngIf="item1.dayType == 1">工作日</span>
                  <span *ngIf="item1.dayType == 2">节假日</span>
                  <span *ngIf="item1.dayType == 3">调休</span>
                  <span *ngIf="item1.dayType == 4">调班</span>
                  <span *ngIf="item1.dayType == 5">休息日</span>
              </span>
            </div>
          </div>
        </ion-item>

        <div text-center style="margin-top: 10rem" *ngIf="noList.length == 0">
          <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
          <p text-center>
            暂无数据
          </p>
        </div>
      </ng-container>
      <ng-container  *ngIf="changeType == 2">

        <ion-item *ngFor="let item2 of doneList;" class="margin-bottom-10" (click)="goToDetail(item2)">
          <div class="margin-bottom-10" >
            <span>{{item2.name}}</span>
            <span>{{item2.phoneNumber}}</span>
            <span float-right>{{item2.dutyDate | date:'yyyy-MM-dd'}}</span>
          </div>
          <div class="color-666">
            <!--1正常工作日，2节假日，3调休，4调班，5休息日-->
            <span>{{item2.orgName}}</span>
            <span float-right>
              <span *ngIf="item2.dayType == 1">工作日</span>
              <span *ngIf="item2.dayType == 2">节假日</span>
              <span *ngIf="item2.dayType == 3">调休</span>
              <span *ngIf="item2.dayType == 4">调班</span>
              <span *ngIf="item2.dayType == 5">休息日</span>
            </span>

          </div>
        </ion-item>

        <div text-center style="margin-top: 10rem" *ngIf="doneList.length == 0">
          <img style="width: 20%;" src="./assets/imgs/no-info.png" alt="">
          <p text-center>
            暂无数据
          </p>
        </div>
      </ng-container>
    </ion-list>
</ion-content>

