<div nz-row class="breadcrumbs">
  <div nz-col nzSpan="16">
    <nz-breadcrumb class="padding-8-0">
      <nz-breadcrumb-item>
        首页
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        <a>系统管理</a>
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        审核管理
      </nz-breadcrumb-item>
    </nz-breadcrumb>
  </div>
  <div nz-col nzSpan="8" class="text-right">
    <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
    <smart-full-screen></smart-full-screen>
  </div>
</div>

<div nz-row class="search-form">
  <div nz-col nzSpan="16">
    <ng-container *ngIf="roleType == 2 || roleType == 3">
      <button (click)="approvalPass()" nz-button nzType="default"><i class="anticon anticon-check-circle-o"></i>通过</button>
      <button (click)="approvalUnPass()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>退回</button>
    </ng-container>
    <!--系统管理员-->
    <ng-container *ngIf="roleType == 1 || roleType == 3">
      <button (click)="approvalCancle()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>撤回</button>
    </ng-container>
  </div>
  <div nz-col nzSpan="8" class="text-right">
    <input  style="width: 50%;" nz-input placeholder="操作用户" [(ngModel)]="name">
    <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
  </div>
</div>
<nz-tabset (nzSelectedIndexChange)="changeIndex($event)" [nzTabPosition]="'top'" [nzType]="'card'">
  <nz-tab nzTitle="待审批">
    <nz-table #basicTable1 [nzData]="noList" [nzFrontPagination]="false" [nzTotal]="totalNumNo" [nzPageIndex]="pageNoNo" [nzPageSize]="pageSize" (nzCurrentPageDataChange)="currentPageDataChange($event)" (nzPageIndexChange)="changeNoPage($event)">
      <thead>
      <tr>
        <th nzShowCheckbox [(nzChecked)]="allChecked" [nzIndeterminate]="indeterminate" (nzCheckedChange)="checkAll($event)"></th>
        <th>操作用户</th>
        <th>操作内容</th>
        <th>提交时间</th>
        <th>审核状态</th>
        <th>审核人</th>
        <th>审核时间</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable1.data">
        <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td>
        <td>{{data.createUserName}}</td>
        <td>{{data.comment}}</td>
        <td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
        <td>
          <!--<span *ngIf="data.status == 0">审批通过</span>-->
          <span *ngIf="data.status == 0">未审核</span>
          <span *ngIf="data.status == 1">撤回</span>
          <span *ngIf="data.status == 2">通过</span>
          <span *ngIf="data.status == 2">失败</span>
          <!--<span *ngIf="data.status == 3">修改用户待审批</span>-->
          <!--<span *ngIf="data.status == 4">注销用户待审批</span>-->
          <!--<span *ngIf="data.status == 5">提交人主动撤回，进行重新提交或者删除当前提交</span>-->
          <!--<span *ngIf="data.status == 6">兼职待审批</span>-->
          <!--<span *ngIf="data.status == 7">撤销兼职待审批</span>-->
          <!--<span *ngIf="data.status == 8">改变组织待审批</span>-->
          <!--<span *ngIf="data.status == 9">改变组织退回</span>-->
          <!--<span *ngIf="data.status == 10">授予角色待审批</span>-->
          <!--<span *ngIf="data.status == 11">授予用户待审批</span>-->
          <!--<span *ngIf="data.status == 12">撤销角色待审批</span>-->
          <!--<span *ngIf="data.status == 13">撤销用户待审批</span>-->
          <!--<span *ngIf="data.status == 14">绑定组织待审批</span>-->
          <!--<span *ngIf="data.status == 15">冻结用户待审批</span>-->
          <!--<span *ngIf="data.status == 16">删除绑定组织待审批</span>-->
          <!--<span *ngIf="data.status == 17">恢复用户待审批</span>-->
          <!--<span *ngIf="data.status == 18">初始化密码待审批</span>-->
          <!--<span *ngIf="data.status == 19">复制用户待审批</span>-->
          <!--<span *ngIf="data.status == 20">置为临时角色待审批</span>-->
          <!--<span *ngIf="data.status == 21">置为永久角色待审批</span>-->
        </td>
        <td>{{data.checkUserName}}</td>
        <td>{{data.chechTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
      </tr>
      </tbody>
    </nz-table>
  </nz-tab>
  <nz-tab nzTitle="已审批">
    <nz-table #basicTable2 [nzData]="areadyList" [nzFrontPagination]="false" [nzTotal]="totalNumAlready" [nzPageIndex]="pageNoAlready" [nzPageSize]="pageSize" (nzPageIndexChange)="changeAlreadyPage($event)">
      <thead>
      <tr>
        <th>操作用户</th>
        <th>操作内容</th>
        <th>提交时间</th>
        <th>审核状态</th>
        <th>审核人</th>
        <th>审核时间</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable2.data">
        <td>{{data.createUserName}}</td>
        <td>{{data.comment}}</td>
        <td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
        <td>
          <span *ngIf="data.status == 0">未审核</span>
          <span *ngIf="data.status == 1">撤回</span>
          <span *ngIf="data.status == 2">通过</span>
          <span *ngIf="data.status == 3">失败</span>
        </td>
        <td>{{data.checkUserName}}</td>
        <td>{{data.chechTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
      </tr>
      </tbody>
    </nz-table>
  </nz-tab>
</nz-tabset>

