<!--面包屑-->
<nz-breadcrumb>
  <nz-breadcrumb-item>
    系统管理
  </nz-breadcrumb-item>
  <nz-breadcrumb-item>
    权限管理
  </nz-breadcrumb-item>
</nz-breadcrumb>

<!--条件搜索-->
<div class="inner-content">
  <form nz-form [formGroup]="validateForm"  class="search-result-list">
    <div nz-row>
      <div nz-col nzSpan="6">
        <nz-form-item>
          <nz-form-label>名称</nz-form-label>
          <nz-form-control>
            <input class="width_input" nz-input  formControlName="queryString" placeholder="请输入权限名称"  />
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col nzSpan="6">
        <nz-form-item>
          <nz-form-label [nzSpan]="8">类型</nz-form-label>
          <nz-form-control [nzSpan]="16">
            <nz-select formControlName="queryType" nzAllowClear nzPlaceHolder="选择类型">
              <nz-option nzValue=1 nzLabel="菜单"></nz-option>
              <nz-option nzValue=2 nzLabel="按钮"></nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>

    <div nz-row>
      <div nz-col [nzSpan]="24" class="search-area">
        <button style="margin-left: 10px;" nz-button nzType="primary" (click)="getSearch()" [nzLoading]="isLoadingSearch">搜索</button>
        <button nz-button (click)="resetForm()">重置</button>
      </div>
    </div>
  </form>
</div>

<div class="inner-content">
  <nz-sider style="background: #ffffff;"><div class="gaopin-data-toalt" style="width: 300px;">共搜索到 {{total}} 条数据</div></nz-sider>

  <!--数组表格 -->
  <nz-table
    style="margin-top: 20px;"
    #ajaxTable
    nzShowSizeChanger
    [nzFrontPagination]="false"
    [nzData]="requestData"
    [nzLoading]="loading"
    [nzTotal]="total"
    [(nzPageIndex)]="pageNum"
    [(nzPageSize)]="pageSize"
    [nzScroll]="{ x: '1400px' }"
    (nzPageIndexChange)="getRequest()"
    (nzPageSizeChange)="getRequest(true)">
    <thead  nzSingleSort>
    <tr>
      <th width="10px">序号</th>
      <th width="30px">权限名称</th>
      <th width="20px">权限编码</th>
      <th width="20px">菜单ID</th>
      <th width="20px">顺序</th>
      <th width="60px">描述</th>
      <!--<th nzRight="0px" nzAlign="left" nzWidth="20px">操作</th>-->
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of ajaxTable.data; let i = index;">
      <td>{{i+ 1}}</td>
      <td>{{data.permissionName}}</td>
      <td>{{data.permissionCode}}</td>
      <td>{{data.menuId}}</td>
      <td>{{data.sort}}</td>
      <td>{{data.permissionDesc}}</td>
      <!--<td style="font-size: 18px;" nzRight="0px" class="table-td-operation">
        <a><span nz-tooltip nzTitle="详情" (click)='getDetail(data.id)'><i nz-icon [nzIconfont]="'haj-biaoqing'"></i></span></a>
      </td>-->
    </tr>
    </tbody>
  </nz-table>
</div>
