<div class="searchBar" @fade>
  <app-search-date [label]="'startTime' | translate" [(value)]="req.startTime" showTime="true"></app-search-date>
  <app-search-date [label]="'endTime' | translate" [(value)]="req.endTime" showTime="true"></app-search-date>
  <div class="btnLine">
    <button nz-button class="searchBtn" [nzType]="'primary'" [nzLoading]="isLoading" (click)="onSearch()"><span>{{'search' | translate}}</span></button>
    <button nz-button class="searchBtn" [nzLoading]="isLoading" (click)="onGetAll()"><span>{{'allData' | translate}}</span></button>
  </div>
</div>
<div class="tableBar" @fade>
  <nz-table #nzTable
            [nzData]="data"
            [nzSize]="'middle'"
            nzShowSizeChanger
            [nzShowPagination]="true"
            [nzLoading]="isLoading"
            [nzFrontPagination]="false"
            [nzTotal]="total"
            [(nzPageIndex)]="page"
            [(nzPageSize)]="rows"
            (nzPageIndexChange)="searchData()"
            (nzPageSizeChange)="searchData()">
    <thead nz-thead>
    <tr>
      <th nz-th><span>{{'num' | translate}}</span></th>
      <th nz-th><span>{{'loginName' | translate}}</span></th>
      <th nz-th><span>{{'userRealName' | translate}}</span></th>
      <th nz-th><span>{{'loginTime' | translate}}</span></th>
      <th nz-th><span>{{'loginWay' | translate}}</span></th>
      <th nz-th><span>{{'loginInfo' | translate}}</span></th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr *ngFor="let one of nzTable.data, let i = index">
      <td nz-td>{{i + 1}}</td>
      <td nz-td>{{one.userName}}</td>
      <td nz-td>{{one.realName}}</td>
      <td nz-td>{{one.loginTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
      <td nz-td>{{'webPlatform' | translate}}</td>
      <td nz-td>{{one.ipAddress}}</td>
    </tr>
    </tbody>
  </nz-table>
</div>
