<ion-header>

  <ion-navbar>
    <ion-title>值班换班</ion-title>
  </ion-navbar>
  <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-header>


<ion-content>
    <ion-list>
      <ng-container *ngIf="changeType == 1">
        <ion-item *ngFor="let item1 of noList;" >
          <div (click)="goApplyDetail(item1)">
            <div >
              <span>{{item1.name}}</span>
              <span>{{item1.phoneNumber}}</span>
              <span>{{item1.dutyDate | date:'yyyy-MM-dd'}}</span>
            </div>
            <div>
              <!--1正常工作日，2节假日，3调休，4调班，5休息日-->
              <span>{{item1.orgName}}</span>
              <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>
            </div>
          </div>

        </ion-item>
      </ng-container>
      <ng-container  *ngIf="changeType == 2">
        <ion-item *ngFor="let item2 of doneList;">
          <div >
            <span>{{item1.name}}</span>
            <span>{{item1.phoneNumber}}</span>
            <span>{{item1.dutyDate | date:'yyyy-MM-dd'}}</span>
          </div>
          <div>
            <!--1正常工作日，2节假日，3调休，4调班，5休息日-->
            <span>{{item1.orgName}}</span>
            <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>
          </div>
        </ion-item>
      </ng-container>
    </ion-list>
</ion-content>

