<div class="list-template">
  <div class="list-template__content">
    <div class="list-template__top" nz-row>
      <div nz-col nzXl='17' class="list-template__searchBox">
        <div class="list-template__searchItem">
          <span class="label">申请时间</span>：
          <nz-range-picker [(ngModel)]="searchDto.dateRange"></nz-range-picker>
        </div>
        <div class="list-template__searchItem">
          <span class="label">楼栋</span>：
          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
            nzAllowClear nzPlaceHolder="请选择楼栋" [(ngModel)]="searchDto.building">
            <ng-container *ngFor="let option of buildingList">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.buildingName" [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 class="list-template__searchItem" style="width: 100%;">
          <span class="label">排除科室</span>：
          <nz-select style="min-width: 135px;" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzMode="multiple"
            (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择排除科室" [(ngModel)]="searchDto.department">
            <ng-container *ngFor="let option of alldepart">
              <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='7' class="list-template__btns">
        <button nz-button class="btn default ml8" (click)='search()'>搜索</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="cont">
      <div>
        <span>总计</span>
        <span class="rate"></span>
      </div>
      <div>
        <span>科室数</span>
        <span>{{statisticsObj[0]}}</span>
      </div>
      <div>
        <span>总检查数</span>
        <span>{{statisticsObj[1]}}</span>
      </div>
      <div>
        <span>作废取消数</span>
        <span>{{statisticsObj[2]}}</span>
      </div>
      <div>
        <span>临时急诊数</span>
        <span>{{statisticsObj[3]}}</span>
      </div>
      <div>
        <span>未预约数</span>
        <span>{{statisticsObj[4]}}</span>
      </div>
      <div>
        <span>需检查数</span>
        <span>{{statisticsObj[5]}}</span>
      </div>
      <div>
        <span>陪检数</span>
        <span>{{statisticsObj[6]}}</span>
      </div>
      <div>
        <span>检查率</span>
        <span>{{statisticsObj[7]}}</span>
      </div>
      <div>
        <span>工单数</span>
        <span>{{statisticsObj[8]}}</span>
      </div>
      <div>
        <span>转科数</span>
        <span>{{statisticsObj[9]}}</span>
      </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="9%">科室名称</th>
            <th nzWidth="9%">总检查数</th>
            <th nzWidth="9%">作废取消数</th>
            <th nzWidth="9%">临时急诊数</th>
            <th nzWidth="9%">未预约数</th>
            <th nzWidth="10%">需检查数</th>
            <th nzWidth="10%">陪检数</th>
            <th nzWidth="10%">检查率</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[0] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'total' }, 'deptInspectionStatistics')">{{ data[1] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'cancel' }, 'deptInspectionStatistics')">{{ data[2] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'priority' }, 'deptInspectionStatistics')">{{ data[3] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'noneYY' }, 'deptInspectionStatistics')">{{ data[4] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'waitCheck' }, 'deptInspectionStatistics')">{{ data[5] }}</td>
            <td class="tab_hover" (click)="viewDetail({ data: data, searchDto: searchDto, type: 'doCheck' }, 'deptInspectionStatistics')">{{ data[6] }}</td>
            <td>{{ data[7] }}</td>
            <td class="tab_hover" (click)="personDetail({ data: data, searchDto: searchDto, countRemark: '患者陪检'})">{{ data[8] }}</td>
            <td class="tab_hover" (click)="personDetail({ data: data, searchDto: searchDto, countRemark: '转科'})">{{ data[9] }}</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>
<!-- 查看详情 -->
<router-outlet></router-outlet>

<!-- 业务数据查看 -->
<app-businessData-detail-modal
  *ngIf="businessDataModalShow"
  [show]="businessDataModalShow"
  [type]="businessDataModalType"
  [dataInfo]="dataInfo"
  (closeModelHs)="closeModelBlood($event)"
></app-businessData-detail-modal>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo"></app-prompt-modal>
