<!--<div class="searchBar" @fade>-->
  <!--<div class="btnLine">-->
    <button nz-button [nzType]="'primary'" class="searchBtn" [nzLoading]="isLoading" (click)="add()"><span>{{'add' | translate}}</span></button>
    <!--<button nz-button class="btnAll" [nzLoading]="isLoading" (click)="onGetAll()"><span>{{'allData' | translate}}</span></button>-->
  <!--</div>-->
<!--</div>-->
<div class="tableBar" @fade>
  <nz-table #nzTable
            [nzData]="data"
            [nzLoading]="isLoading">
    <thead nz-thead>
    <tr>
      <th nz-th><span>{{'num' | translate}}</span></th>
      <th nz-th><span>{{'roleNo' | translate}}</span></th>
      <th nz-th><span>{{'roleName' | translate}}</span></th>
      <th nz-th><span>{{'companyName' | translate}}</span></th>
      <th nz-th><span>{{'remark' | translate}}</span></th>
      <th nz-th><span>{{'oper' | 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.roleNo}}</td>
      <td nz-td>{{one.roleName}}</td>
      <td nz-td>{{one.companyName}}</td>
      <td nz-td>{{one.remark}}</td>
      <td nz-td>
        <span class="editSpan" (click)="edit(one)">{{'edit' | translate}}</span>
        <nz-divider nzType="vertical"></nz-divider>
        <span class="deleteFontColor" (click)="deleteConfirm(one.roleNo)">{{'delete' | translate}}</span>
      </td>
    </tr>
    </tbody>
  </nz-table>
</div>

<nz-modal [(nzVisible)]="isVisible" [nzTitle]="(isUpdate ? 'editRole' : 'addRole') | translate" [nzContent]="modalContent" nzWidth="500"
          [nzFooter]="modalFooter" (nzOnCancel)="cancel()" nzMaskClosable="false">
  <ng-template #modalContent>
    <app-search-item [(value)]="req.roleName" [label]="'roleName' | translate" inModal="true"></app-search-item>
    <app-search-item [(value)]="req.description" [label]="'description' | translate" inModal="true"></app-search-item>
    <div class="searchItem inModal">
      <div class="item-label">选择权限</div>
      <div class="item-input">
        <nz-tree #tree
                 [nzData]="nodes"
                 nzCheckable
                 nzMultiple
                 [nzCheckedKeys]="defaultCheckedKeys"
                 [nzExpandedKeys]="defaultExpandedKeys"
        >
        </nz-tree>
      </div>
    </div>
    <app-search-item [(value)]="req.remark" [label]="'remark' | translate" inModal="true"></app-search-item>
  </ng-template>
  <ng-template #modalFooter>
    <button nz-button nzType="default" [nzLoading]="isLoading" (click)="cancel()"><span>{{'cancel' | translate}}</span></button>
    <button nz-button nzType="primary" class="searchBtn" [nzLoading]="isLoading" (click)="save()"><span>{{'confirm' | translate}}</span></button>
  </ng-template>
</nz-modal>
