<ion-header>
    <ion-toolbar>
        <div class="searchToolBar">
            <button ion-button clear small navPop style="padding: 0;" (click)="goBack()">
                <img class="back-btn" src="./assets/imgs/back.png" />
              </button>
              <ion-title text-center>外出报备</ion-title>
        </div>
      
      </ion-toolbar>
</ion-header>

<ion-content scrollbar-y="true" direction="y">
  <ion-refresher (ionRefresh)="doRefresh($event)">
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="circles" refreshingText="正在刷新！">
    </ion-refresher-content>
  </ion-refresher>

  <ion-list>
    <ion-item *ngFor="let item of PremanagerList">
      <div class="item">
        <div class="item-header">
          <div class="item-header-style">
            <img src="./assets/imgs/bb.png" class="icon">
            <span class="item-title">{{item.title}}</span>
          </div>
          <button ion-button round class="btn btn1" *ngIf="!item.reported && !item.isOverTimeFlag">未报备</button>
          <button ion-button round class="btn btn2" *ngIf="item.reported">已报备</button>

          <button ion-button round class="btn btn1" *ngIf="!item.reported && item.isOverTimeFlag">截止未报备</button> 
        </div>

        <ion-item *ngIf="!item.isOverTimeFlag">
            <div class="content-box" (click)="goReport(item)">
                <div class="content-item-box">
                  <label class="left-title">发布科室：</label>
                  <div class="data">{{item.fbDept}}</div>
                </div>
                <div class="content-item-box">
                  <label class="left-title">报备截止：</label>
                  <div class="data">{{item.endTime}}</div>
                </div>
                <div class="content-item-box">
                  <label class="left-title">报备说明：</label>
                  <div class="data data-1">
                    {{item.managerDesc}}
                  </div>
                </div>
              </div>
        </ion-item>

        <ion-item *ngIf="item.isOverTimeFlag">
          <div class="content-box" (click)="goDetail(item)">
              <div class="content-item-box">
                <label class="left-title">发布科室：</label>
                <div class="data">{{item.fbDept}}</div>
              </div>
              <div class="content-item-box">
                <label class="left-title">报备截止：</label>
                <div class="data">{{item.endTime}}</div>
              </div>
              <div class="content-item-box">
                <label class="left-title">报备说明：</label>
                <div class="data data-1">
                  {{item.managerDesc}}
                </div>
              </div>
            </div>
      </ion-item>

        <button class="sign-up" (click)="goReport(item); $event.stopPropagation()" *ngIf="!item.reported  && !item.isOverTimeFlag">报备</button>
        <button class="sign-up" (click)="goReport(item); $event.stopPropagation()" *ngIf="item.reported  && !item.isOverTimeFlag">修改报备</button>

        <button class="sign-up" (click)="goDetail(item); $event.stopPropagation()" *ngIf="item.isOverTimeFlag">查看详情</button>

      </div>
    </ion-item>
    
  </ion-list>
</ion-content>