<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
            [(ngModel)]="dateRange" nzShowTime
            [nzAllowClear]="false"
            (ngModelChange)="changeDate($event)"
            (nzOnCalendarChange)="onCalendarChangeDate($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"
            [nzShowSearch]="false"
            nzPlaceHolder="请选择分组"
            [ngModel]="group"
            (ngModelChange)="searchGroup($event)"
          >
            <nz-option nzLabel="全部" [nzValue]="0"></nz-option>
            <nz-option
              nzLabel="{{ data.groupName }}"
              nzValue="{{ data.id }}"
              *ngFor="let data of groupList"
            ></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)="excelExport()">
          导出
        </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(1, sortCurrentKey, sortCurrentValue)"></nz-checkbox-group>
    </div>
    <div class="list-template__bottom">
      <nz-table
        class="list-template__nzTable"
        [nzData]="listOfData"
        nzSize="middle"
        [nzShowPagination]="false"
        [nzLoading]="loading1"
      >
        <thead (nzSortChange)="sort($event)" nzSingleSort>
          <tr class="thead">
            <th nzWidth="5%">序号</th>
            <th nzWidth="8%">姓名</th>
            <th nzWidth="8%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">工单总数</th>
            <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
            <th nzWidth="16%">平均到达时长<br>平均完成时长</th>
            <th nzWidth="8%" nzShowSort nzSortKey="completionRate" [(nzSort)]="sortCurrent.completionRate">按时完成达标率</th>
            <th nzWidth="8%">楼栋分<br>陪检方式分</th>
            <th nzWidth="16%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">总积分</th>
            <th nzWidth="15%">操作</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 || 0 }}</td>
            <td>{{ data.fiveTimeNum || 0 }}<br>{{ data.specialCloseNum }}</td>
            <td>{{ data.arriveTime }}<br>{{ data.completeTime }}</td>
            <td>{{ data.avePer + "%" }}</td>
            <td>{{ data.buildingGrade }}<br>{{ data.inspectModeGrade }}</td>
            <td>{{ data.order || 0 }}</td>
            <td>
              <div class="coop">
                <span
                  *ngIf="coopBtns.look"
                  (click)="personDetail(data.workerId)"
                  >查看</span
                >
              </div>
            </td>
          </tr>
        </tbody>
      </nz-table>
      <div class="list-template__pagination">
        <nz-pagination
          [(nzPageIndex)]="pageIndex"
          [(nzTotal)]="listLength"
          nzShowSizeChanger
          [(nzPageSize)]="pageSize"
          (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"
          (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue)"
        >
        </nz-pagination>
      </div>
    </div>
  </div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal
  *ngIf="promptModalShow"
  [content]="promptContent"
  [success]="ifSuccess"
  [show]="promptModalShow"
  [info]="promptInfo"
></app-prompt-modal>
<app-excel-export
  [loading]="loading2"
  [isShow]="isShow"
  (submitFormHand)="submitExcelExport($event)"
  (hideFormHand)="hideExcelExport($event)"
  *ngIf="isShow"
></app-excel-export>

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