From 2c8b7ad8f9e31970cc2b7596f2b678bdf8292069 Mon Sep 17 00:00:00 2001 From: 沈斌 <bluelazysb@hotmail.com> Date: Fri, 22 Dec 2017 17:25:33 +0800 Subject: [PATCH] updates --- src/app/routes/systems/account/account.component.ts | 4 +++- src/app/routes/systems/account/account.component.html | 25 ++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/app/routes/systems/account/account.component.html b/src/app/routes/systems/account/account.component.html index 57015ce..8c84cc4 100644 --- a/src/app/routes/systems/account/account.component.html +++ b/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> diff --git a/src/app/routes/systems/account/account.component.ts b/src/app/routes/systems/account/account.component.ts index 4013043..9078ab4 100644 --- a/src/app/routes/systems/account/account.component.ts +++ b/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); -- Gitblit v1.8.0