<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 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" nzServerSearch nzShowSearch
            (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择操作人" [(ngModel)]="operationUser">
            <ng-container *ngFor="let option of allWorker">
              <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-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
				    nzAllowClear nzPlaceHolder="请选择类型" [(ngModel)]="logType">
				    <ng-container *ngFor="let option of typeData">
				      <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
				    </ng-container>
				  </nz-select>
				</div>
      </div>
      <div nz-col nzLg="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="20%">操作人</th>
            <th nzWidth="20%">类型</th>
            <th nzWidth="20%">动作</th>
            <th nzWidth="20%">备注</th>
            <th nzWidth="20%">操作时间</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let i = index">
            <td>{{data.operationUserDTO?.name}}</td>
            <td>{{data.logType?.name}}</td>
            <td>{{data.operationType?.name}}</td>
            <td>{{data.logRemarks}}</td>
            <td>{{data.operationTime | date: "yyyy-MM-dd HH:mm:ss"}}</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-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>
