From c5b814dcf5ae60e89169dadf6cb039261bb23a23 Mon Sep 17 00:00:00 2001
From: 沈斌 <bluelazysb@hotmail.com>
Date: Tue, 19 Dec 2017 16:26:41 +0800
Subject: [PATCH] updates

---
 src/app/routes/users/installer/installer.component.html |  153 ++++++++++++++-------------------------------------
 1 files changed, 42 insertions(+), 111 deletions(-)

diff --git a/src/app/routes/users/installer/installer.component.html b/src/app/routes/users/installer/installer.component.html
index 82a9368..e0e3db3 100644
--- a/src/app/routes/users/installer/installer.component.html
+++ b/src/app/routes/users/installer/installer.component.html
@@ -1,68 +1,26 @@
 <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">
-          <div nz-form-label><label for="no">������������</label></div>
+          <div nz-form-label><label for="u_name">������</label></div>
           <div nz-form-control class="flex-1">
-            <nz-input [(ngModel)]="q.no" name="no" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzId="no"></nz-input>
+            <nz-input [(ngModel)]="q.u_name" name="u_name" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzId="u_name"></nz-input>
           </div>
         </div>
       </div>
       <div nz-col [nzSpan]="8" class="mb-md">
         <div nz-form-item class="d-flex">
-          <div nz-form-label><label for="status">������������</label></div>
+          <div nz-form-label><label for="u_mobile">������</label></div>
           <div nz-form-control class="flex-1">
-            <nz-select [(ngModel)]="q.status" name="status" nzId="status" [nzPlaceHolder]="'���������'" [nzShowSearch]="true" [nzSize]="'large'">
-              <nz-option *ngFor="let i of status; let idx = index" [nzLabel]="i.text" [nzValue]="idx"></nz-option>
-            </nz-select>
+            <nz-input [(ngModel)]="q.u_mobile" name="u_mobile" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzId="u_mobile"></nz-input>
           </div>
         </div>
       </div>
-      <div *ngIf="expandForm" nz-col [nzSpan]="8" class="mb-md">
-        <div nz-form-item class="d-flex">
-          <div nz-form-label><label for="callNo">������������</label></div>
-          <div nz-form-control class="flex-1">
-            <nz-input [nzSize]="'large'" nzId="callNo"></nz-input>
-          </div>
-        </div>
-      </div>
-      <div *ngIf="expandForm" nz-col [nzSpan]="8" class="mb-md">
-        <div nz-form-item class="d-flex">
-          <div nz-form-label><label for="updatedAt">������������</label></div>
-          <div nz-form-control class="flex-1">
-            <nz-datepicker [nzSize]="'large'" [nzPlaceHolder]="'���������������������'" nzId="updatedAt" class="d-block"></nz-datepicker>
-          </div>
-        </div>
-      </div>
-      <div *ngIf="expandForm" nz-col [nzSpan]="8" class="mb-md">
-        <div nz-form-item class="d-flex">
-          <div nz-form-label><label for="status2">������������</label></div>
-          <div nz-form-control class="flex-1">
-            <nz-select [nzPlaceHolder]="'���������'" nzId="status2" [nzShowSearch]="true" [nzSize]="'large'">
-              <nz-option *ngFor="let i of status; let idx = index" [nzLabel]="i.text" [nzValue]="idx"></nz-option>
-            </nz-select>
-          </div>
-        </div>
-      </div>
-      <div *ngIf="expandForm" nz-col [nzSpan]="8" class="mb-md">
-        <div nz-form-item class="d-flex">
-          <div nz-form-label><label for="status3">������������</label></div>
-          <div nz-form-control class="flex-1">
-            <nz-select [nzPlaceHolder]="'���������'" nzId="status3" [nzShowSearch]="true" [nzSize]="'large'">
-              <nz-option *ngFor="let i of status; let idx = index" [nzLabel]="i.text" [nzValue]="idx"></nz-option>
-            </nz-select>
-          </div>
-        </div>
-      </div>
-      <div nz-col [nzSpan]="expandForm ? 24 : 8" class="mb-md" [class.text-right]="expandForm">
+      <div nz-col [nzSpan]="8" class="mb-md">
         <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="loading" [nzSize]="'large'">������</button>
-        <button nz-button type="reset" (click)="getData()" [nzSize]="'large'" class="mx-sm">������</button>
-        <a (click)="expandForm=!expandForm">
-          {{expandForm ? '������' : '������'}}
-          <i class="anticon" [class.anticon-down]="!expandForm" [class.anticon-up]="expandForm"></i>
-        </a>
+        <button nz-button type="reset" (click)="load(true)" [nzSize]="'large'" class="mx-sm">������</button>
       </div>
     </div>
   </form>
@@ -71,60 +29,39 @@
       <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>
-            </span>
+        <span alert-body>
+            ��������� <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">
-        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate"
-               (ngModelChange)="checkAll($event)"></label>
+        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)"></label>
       </th>
-      <th nz-th><span>������������</span></th>
-      <th nz-th><span>������</span></th>
+      <th nz-th><span>������</span></th>
+      <th nz-th><span>������</span></th>
+      <th nz-th><span>������������</span></th>
+      <th nz-th><span>���������</span></th>
+      <th nz-th><span>������</span></th>
+      <th nz-th><span>������</span></th>
+      <th nz-th><span>������������</span></th>
       <th nz-th>
-        <span>������������������</span>
-        <nz-table-sort [(nzValue)]="sortMap.callNo" (nzValueChange)="sort('callNo',$event)"></nz-table-sort>
-      </th>
-      <th nz-th>
-        <span>������</span>
-        <nz-dropdown [nzTrigger]="'click'">
-          <i class="anticon anticon-filter" nz-dropdown></i>
-          <ul nz-menu>
-            <li nz-menu-item *ngFor="let i of status">
-              <label nz-checkbox [(ngModel)]="i.value"><span>{{i.text}}</span></label>
-            </li>
-          </ul>
-          <div nz-table-filter>
-            <span nz-table-filter-confirm (click)="getData()">������</span>
-            <span nz-table-filter-clear (click)="reset(status)">������</span>
-          </div>
-        </nz-dropdown>
-      </th>
-      <th nz-th>
-        <span>������������</span>
-        <nz-table-sort [(nzValue)]="sortMap.updatedAt" (nzValueChange)="sort('updatedAt',$event)"></nz-table-sort>
+        <span>������������</span>
+        <nz-table-sort [(nzValue)]="sortMap.updatedAt" (nzValueChange)="sort('expireTime',$event)"></nz-table-sort>
       </th>
       <th nz-th><span>������</span></th>
     </tr>
@@ -132,31 +69,25 @@
     <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.no}}</td>
-      <td nz-td>{{i.description}}</td>
-      <td nz-td class="text-center">{{i.callNo}} ���</td>
-      <td nz-td><nz-badge [nzStatus]="i.statusType" [nzText]="i.statusText"></nz-badge></td>
-      <td nz-td>{{i.updatedAt | _date}}</td>
+      <td nz-td>{{i.name}}</td>
+      <td nz-td>{{i.mobile}}</td>
+      <td nz-td>{{i.email}}</td>
+      <td nz-td>{{i.weixin}}</td>
+      <td nz-td>{{i.password}}</td>
+      <td nz-td>{{i.organizationId}}</td>
+      <td nz-td>{{i.createTime | _date}}</td>
+      <td nz-td>{{i.expireTime | _date}}</td>
       <td nz-td>
-        <a (click)="msg.success('������' + i.no)">������</a>
+        <a (click)="edit(i)">������</a>
         <span nz-table-divider></span>
-        <a (click)="msg.success('������������' + i.no)">������������</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>

--
Gitblit v1.8.0