<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="list-template__checkBoxes">
      <nz-checkbox-group [(ngModel)]="checkOptionsOne" (ngModelChange)="getList(true)"></nz-checkbox-group>
    </div>
    <div class="cont">
      <div>
        <span>总计</span>
        <span class="rate"></span>
      </div>
      <div>
        <span>楼栋数</span>
        <span>{{statisticsObj.count}}</span>
      </div>
      <div>
        <span>总检查数</span>
        <span>{{statisticsObj.total}}</span>
      </div>
      <div>
        <span>无需检查数</span>
        <span>{{statisticsObj.noCheckCount}}</span>
      </div>
      <div>
        <span>需检查数</span>
        <span>{{statisticsObj.checkCount}}</span>
      </div>
      <div>
        <span>陪检数</span>
        <span>{{statisticsObj.insCount}}</span>
      </div>
      <div>
        <span>检查率</span>
        <span>{{statisticsObj.inspectRate}}%</span>
      </div>
      <div>
        <span>工单数</span>
        <span>{{statisticsObj.workOrderCount}}</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="14%">楼栋名称</th>
            <th nzWidth="14%">总检查数</th>
            <th nzWidth="14%">无需检查数</th>
            <th nzWidth="14%">需检查数</th>
            <th nzWidth="13%">陪检数</th>
            <th nzWidth="13%">检查率</th>
            <th nzWidth="13%">工单数</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let index=index;">
            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
            <td>{{ data.name }}</td>
            <td>{{ data.total }}</td>
            <td>{{ data.noCheckCount }}</td>
            <td>{{ data.checkCount }}</td>
            <td>{{ data.insCount }}</td>
            <td>{{ data.inspectRate }}%</td>
            <td>{{ data.workOrderCount }}</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>
