沈斌
2017-12-19 1f098d69fd6d67da3a688b9d598f486e56b7eecd
src/app/routes/users/installer/installer.component.html
@@ -1,6 +1,6 @@
<pro-header [title]="'安装用户列表'"></pro-header>
<nz-card [nzBordered]="false">
  <form nz-form (ngSubmit)="getData()" [nzLayout]="'inline'">
  <form nz-form (ngSubmit)="load(true)" [nzLayout]="'inline'">
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="8" class="mb-md">
        <div nz-form-item class="d-flex">
@@ -29,28 +29,24 @@
      <i class="anticon anticon-plus"></i><span>新建</span>
    </button>
    <ng-container *ngIf="selectedRows.length > 0">
      <button nz-button [nzSize]="'large'">批量操作</button>
      <nz-dropdown [nzPlacement]="'bottomLeft'">
        <button nz-button nz-dropdown [nzSize]="'large'">
          更多操作 <i class="anticon anticon-down"></i>
        </button>
        <ul nz-menu>
          <li nz-menu-item (click)="remove()">删除</li>
          <li nz-menu-item (click)="approval()">批量审批</li>
        </ul>
      </nz-dropdown>
      &nbsp;<button nz-button [nzSize]="'large'" (click)="remove()">批量删除</button>
    </ng-container>
  </div>
  <div class="mb-md">
    <nz-alert [nzType]="'info'" [nzShowIcon]="true">
        <span alert-body>
            已选择 <strong class="text-primary">{{selectedRows.length}}</strong> 项&nbsp;&nbsp;
            服务调用总计 <strong>{{totalCallNo}}</strong> 万
            <a *ngIf="totalCallNo > 0" (click)="clear()" class="ml-lg">清空</a>
            已选择 <strong class="text-primary">{{selectedRows.length}}</strong> 项
        </span>
    </nz-alert>
  </div>
  <nz-table #nzTable [nzDataSource]="data" [nzPageSize]="q.ps" [nzLoading]="loading" (nzDataChange)="dataChange($event)" (nzPageIndexChange)="pageChange($event)">
  <nz-table #nzTable
            [nzAjaxData]="data"
            [nzLoading]="http.loading"
            [nzTotal]="total"
            [(nzPageIndex)]="q.pi"
            [nzPageSize]="q.ps"
            [nzShowTotal]="true"
            (nzPageIndexChange)="load()">
    <thead nz-thead>
    <tr>
      <th nz-th [nzCheckbox]="true">
@@ -74,7 +70,7 @@
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let i of nzTable.data">
      <td nz-td [nzCheckbox]="true">
        <label nz-checkbox [nzDisabled]="i.disabled" [(ngModel)]="i.checked" (ngModelChange)="refreshStatus($event)">
        <label nz-checkbox [(ngModel)]="i.checked" (ngModelChange)="refreshStatus($event)">
        </label>
      </td>
      <td nz-td>{{i.name}}</td>
@@ -87,21 +83,13 @@
      <td nz-td>{{i.nickname}}</td>
      <td nz-td>{{i.updatedAt | _date}}</td>
      <td nz-td>
        <a (click)="msg.success('编辑:' + i.name)">编辑</a>
        <a (click)="edit(i)">编辑</a>
        <span nz-table-divider></span>
        <a (click)="msg.success('删除:' + i.name)">删除</a>
          <nz-popconfirm [nzTitle]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="popConfirm(i)" (nzOnCancel)="popCancel()">
            <a nz-popconfirm>删除</a>
          </nz-popconfirm>
      </td>
    </tr>
    </tbody>
  </nz-table>
</nz-card>
<nz-modal [nzVisible]="modalVisible" [nzTitle]="'新建规则'" [nzConfirmLoading]="loading" [nzContent]="modalContent" (nzOnCancel)="modalVisible=false" (nzOnOk)="save()">
  <ng-template #modalContent>
    <div nz-form-item class="d-flex">
      <div nz-form-label><label for="no">描述</label></div>
      <div nz-form-control class="flex-1">
        <nz-input [(ngModel)]="description" name="description" [nzSize]="'large'" [nzPlaceHolder]="'请输入'" nzId="no"></nz-input>
      </div>
    </div>
  </ng-template>
</nz-modal>