<page-header title="{{ 'mm.resoucemnt.i18n' | translate }}">
  <nz-card [nzBordered]="false" class>
    <form nz-form class="search__form" action="search">
      <div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
        <div nz-col nzMd="8" nzSm="24">
          <nz-form-item>
            <nz-form-label nzFor="KeyName">{{ 'i18n.columns.KeyName' | translate }}</nz-form-label>
            <nz-form-control>
              <input nz-input [(ngModel)]="q.KeyName" name="KeyName" #UserName placeholder="{{ 'i18n.l.s.t.KeyName' | translate }}" />
            </nz-form-control>
          </nz-form-item>
        </div>
        <div nz-col [nzSpan]="24" [class.text-right]="expandForm" style="text-align: right">
          <button nz-button type="submit" [nzType]="'primary'" (click)="getData()">{{ 'button.search' | translate }}</button>
          <!--<button nz-button type="submit" (click)="getData()" [nzType]="'primary'" [nzLoading]="loading">查询</button>-->
          <button nz-button type="reset" (click)="reset()" class="mx-sm">{{ 'button.reset' | translate }}</button>
        </div>
      </div>
    </form>
    <button nz-button [nzType]="'primary'" (click)="openComponent(-1)" acl [acl-ability]="63">
      <i nz-icon nzType="plus"></i>
      <span>{{ 'button.new' | translate }}</span>
    </button>
    <ng-container *ngIf="selectedRows.length > 0">
      <button nz-button>批量操作</button>
      <button nz-button nz-dropdown [nzDropdownMenu]="batchMenu" nzPlacement="bottomLeft">
        更多操作
        <i nz-icon nzType="down"></i>
      </button>
      <nz-dropdown-menu #batchMenu="nzDropdownMenu">
        <ul nz-menu>
          <!--<li nz-menu-item (click)="remove()">删除</li>
            <li nz-menu-item (click)="approval()">批量审批</li>-->
        </ul>
      </nz-dropdown-menu>
    </ng-container>

    <st #st [columns]="columns" [data]="url" ps="10" [page]="page" [req]="req" [res]="res">
      <ng-template st-row="Status" let-i>
        <nz-badge [nzStatus]="i.statusType" [nzText]="i.statusText"></nz-badge>
      </ng-template>
    </st>
  </nz-card>
  <ng-template #modalContent>
    <nz-form-item>
      <nz-form-label nzFor="no">描述</nz-form-label>
      <nz-form-control>
        <input nz-input [(ngModel)]="description" name="description" placeholder="请输入" id="no" />
      </nz-form-control>
    </nz-form-item>
  </ng-template>
</page-header>
