<ion-header>
    <ion-navbar>
        <ion-title text-center>外出报备</ion-title>
    </ion-navbar>
</ion-header>

<ion-content scrollbar-y="true" direction="y" class="bgc-e7e8ed">
  <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>
                <span class="data">{{item.fbDept}}</span>
                  <span float-right class="item-span color-24bafc" (click)="goReport(item); $event.stopPropagation()" *ngIf="!item.reported  && !item.isOverTimeFlag">报备</span>
                  <span float-right class="item-span color-24bafc" (click)="goReport(item); $event.stopPropagation()" *ngIf="item.reported  && !item.isOverTimeFlag">修改报备</span>
                  <span float-right class="item-span color-24bafc" (click)="goDetail(item); $event.stopPropagation()" *ngIf="item.isOverTimeFlag">查看详情 > </span>
              </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>



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