<div class="list-template">
  <div class="list-template__content">
    <div class="list-template__top" nz-row>
      <div nz-col nzXl='18' class="list-template__searchBox">
        <div class="list-template__searchItem">
          <span class="label">发起时间</span>：
          <nz-range-picker [nzDisabledDate]="disabledDate" [(ngModel)]="dateRange" [nzAllowClear]='false'
            (ngModelChange)="changeDate($event)">
          </nz-range-picker>
          <br />
        </div>
        <div class="list-template__searchItem ml8">
          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzPlaceHolder="请选择时间"
            [(ngModel)]="defRange" (ngModelChange)="changeDateRange($event)">
            <nz-option nzLabel="{{data.label}}" nzValue="{{data.id}}" *ngFor="let data of defRanges"></nz-option>
          </nz-select>
        </div>
        <div class="list-template__searchItem">
          <span class="label">临床科室</span>：
          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
            (nzOnSearch)="changeDept($event)" nzPlaceHolder="请选择临床科室" [(ngModel)]="dept"
            (ngModelChange)="searchDept($event)">
            <nz-option *ngIf="!isLoading" nzLabel="全部" [nzValue]="0"></nz-option>
            <ng-container *ngFor="let option of depts">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
            </ng-container>
            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
            </nz-option>
          </nz-select>
        </div>
      </div>
      <div nz-col nzXl='6' class="list-template__btns">
        <button nz-button class="btn default" (click)='search(1)'>搜索</button>
        <button nz-button class="btn default ml8" (click)='export()' [nzLoading]="loading2">导出</button>
        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
      </div>
    </div>
    <div class="list-template__bottom">
      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
        [nzLoading]="loading1">
        <thead>
          <tr class="thead">
            <th nzWidth="5%">序号</th>
            <th nzWidth="15%">临床科室</th>
            <th nzWidth="15%">可预约检查总数</th>
            <th nzWidth="15%">系统自动建单数</th>
            <th nzWidth="15%">主动建单数</th>
            <th nzWidth="15%">科室派单数</th>
            <th nzWidth="10%">未建单</th>
            <th nzWidth="10%">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let index=index;">
            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
            <td>{{data.deptName}}</td>
            <td>{{data.count5}}</td>
            <td>{{data.count1}}</td>
            <td>{{data.count2}}</td>
            <td>{{data.count3}}</td>
            <td>{{data.count4}}</td>
            <td>
              <div class="coop">
                <span *ngIf="coopBtns.look" (click)="personDetail(data.deptId)">查看</span>
              </div>
            </td>
          </tr>
        </tbody>
      </nz-table>
      <div class="list-template__pagination">
        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
        </nz-pagination>
      </div>
    </div>
  </div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo"></app-prompt-modal>

<!-- 查看详情 -->
<router-outlet></router-outlet>
