沈斌
2017-12-22 2c8b7ad8f9e31970cc2b7596f2b678bdf8292069
updates
2 files modified
29 ■■■■ changed files
src/app/routes/systems/account/account.component.html 25 ●●●● patch | view | raw | blame | history
src/app/routes/systems/account/account.component.ts 4 ●●● patch | view | raw | blame | history
src/app/routes/systems/account/account.component.html
@@ -1,6 +1,6 @@
<pro-header [title]="'账户列表'"></pro-header>
<nz-card [nzBordered]="false">
    <form nz-form (ngSubmit)="load(true)" [nzLayout]="'inline'">
    <form nz-form [nzLayout]="'inline'">
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="8" class="mb-md">
                <div nz-form-item class="d-flex">
@@ -52,22 +52,21 @@
    </div>
    <div class="mb-md">
        <nz-alert [nzType]="'info'" [nzShowIcon]="true">
        <nz-alert [nzType]="'info'" [nzShowIcon]="true">
            <span alert-body>
                 已选择<strong class="text-primary">{{selectedRows.length}}</strong>项
            </span>
            </span>
        </nz-alert>
    </div>
    <nz-table   #nzTable
                [nzDataSource]="data"
    <nz-table   #nzTable
                [nzAjaxData]="data"
                [nzLoading]="http.loading"
                [nzTotal]="total"
                [nzTotal]="total"
                [(nzPageIndex)]="query.pageIndex"
                [nzPageSize]="query.pageSize"
                [nzPageSize]="query.pageSize"
                [nzShowTotal]="true"
                (nzPageIndexChange)="load()"
                (nzDataChange)="dataChange($event)">
                (nzPageIndexChange)="load()">
        <thead nz-thead>
            <tr>
                <th nz-th [nzCheckbox]="true">
@@ -81,7 +80,7 @@
                <th nz-th><span>组织</span></th>
                <th nz-th><span>创建日期</span></th>
                <th nz-th>
                    <span>过期日期</span>
                    <span>过期日期</span>
                    <nz-table-sort [(nzValue)]="sortMap.updatedAt" (nzValueChange)="sort('expire_time', $event)"></nz-table-sort>
                </th>
                <th nz-th><span>操作</span></th>
@@ -101,10 +100,10 @@
                <td nz-td>{{format_date(account.createTime)}}</td>
                <td nz-td>{{format_date(account.expireTime)}}</td>
                <td nz-td>
                    <a (click)="edit(account)">编辑</a>
                    <a (click)="edit(account)">编辑</a>
                    <ng-container *ngIf="account.isDelete == '0'">
                        <span nz-table-divider></span>
                        <nz-popconfirm  [nzTitle]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(account)" >
                        <span nz-table-divider></span>
                        <nz-popconfirm  [nzTitle]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(account)" >
                            <a nz-popconfirm>删除</a>
                        </nz-popconfirm>
                    </ng-container>
src/app/routes/systems/account/account.component.ts
@@ -49,13 +49,15 @@
    this.http.get(environment.SERVER_BASH_URL + '/account/list', {params: this.query}).subscribe((res: any) => {
      this.data = res.data.data;
      this.total = res.data.total;
      this.dataChange(this.data);
    });
  }
  ngOnInit() {
    this.load();
  }
  edit(account) {
    this.modalHelper.static(AccountEditComponent, {account}).subscribe(() => {
      this.load(true);