<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-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
            (nzOnSearch)="changeInp('search', 'inspectionPlan', $event)" nzAllowClear nzPlaceHolder="请选择计划主题" [(ngModel)]="searchDto.inspectionId">
            <ng-container *ngFor="let option of inspectionPlanSearchList">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [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">
          <span class="label">时间范围</span>：
          <nz-range-picker nzShowTime [(ngModel)]="dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)" (ngModelChange)="changeDate($event)"></nz-range-picker>
        </div>
        <div class="list-template__searchItem">
          <span class="label">状态</span>：
          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchDto.statusId">
            <ng-container *ngFor="let option of statusSearchList">
              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [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)='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="14%">计划主题</th>
            <th nzWidth="14%">批次号</th>
            <th nzWidth="14%">创建时间</th>
            <th nzWidth="14%">生成人</th>
            <th nzWidth="14%">状态</th>
            <th nzWidth="14%">完成百分比</th>
            <th nzWidth="16%">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let i = index">
            <td>{{data.inspectionDTO?.name}}</td>
            <td>{{data.batchNo}}</td>
            <td>{{data.addTime | date:'yyyy-MM-dd HH:mm'}}</td>
            <td>{{data.addUserDTO?.name}}</td>
            <td>{{data.status?.name}}</td>
            <td><nz-progress [nzPercent]="data.percent" nzStatus="active" nzStrokeColor="#49b856"></nz-progress></td>
            <td>
              <div class="coop">
                <span *ngIf="coopBtns.del" (click)="showDelModal(data,'删除批次同时会删除相关巡检任务，您确认要删除吗？','删除','del')">删除</span>
              </div>
            </td>
          </tr>
        </tbody>
      </nz-table>
      <div class="list-template__pagination">
        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" nzShowSizeChanger
          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
        </nz-pagination>
      </div>
    </div>
  </div>
</div>
<!-- 模态框 -->
<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>

<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>
