From 8815d4c3d666cbc96988087e9c21f9e1a9f64a06 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Thu, 10 May 2018 14:09:39 +0800
Subject: [PATCH] 安装用户密码修改

---
 src/app/routes/users/installer/installer.component.html |  101 +++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 74 insertions(+), 27 deletions(-)

diff --git a/src/app/routes/users/installer/installer.component.html b/src/app/routes/users/installer/installer.component.html
index 7210492..7d24dd6 100644
--- a/src/app/routes/users/installer/installer.component.html
+++ b/src/app/routes/users/installer/installer.component.html
@@ -1,26 +1,38 @@
 <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="u_name">������</label></div>
           <div nz-form-control class="flex-1">
-            <nz-input [(ngModel)]="q.u_name" name="u_name" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzId="u_name"></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="u_mobile">������</label></div>
+          <div nz-form-label><label for="u_mobile">������/������</label></div>
           <div nz-form-control class="flex-1">
-            <nz-input [(ngModel)]="q.u_mobile" name="u_mobile" [nzSize]="'large'" [nzPlaceHolder]="'���������'" nzId="u_mobile"></nz-input>
+            <nz-input [(ngModel)]="q.u_mobile" name="u_mobile" [nzSize]="'large'" [nzPlaceHolder]="'���������������'" nzId="u_mobile"></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>������������</label>
+					</div>
+					<div nz-form-control class="flex-1">
+						<nz-select [(ngModel)]="q.isDelete" name="isDelete" [nzSize]="'large'">
+							<nz-option *ngFor="let option of isDeleteOptions" [nzLabel]="option.label" [nzValue]="option.value" ></nz-option>
+            			</nz-select>
+					</div>
+				</div>
+			</div>
+      <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>
+        <button nz-button type="reset" [nzSize]="'large'" class="mx-sm">������</button>
       </div>
     </div>
   </form>
@@ -41,7 +53,7 @@
   </div>
   <nz-table #nzTable
             [nzAjaxData]="data"
-            [nzLoading]="http.loading"
+            [nzLoading]="loading"
             [nzTotal]="total"
             [(nzPageIndex)]="q.pi"
             [nzPageSize]="q.ps"
@@ -53,16 +65,14 @@
         <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></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('expire_time', $event)"></nz-table-sort>
       </th>
       <th nz-th><span>������</span></th>
     </tr>
@@ -74,30 +84,67 @@
         </label>
       </td>
       <td nz-td>{{i.name}}</td>
-      <td nz-td>{{i.sex}}</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.organization}}</td>
-      <td nz-td>{{i.nickname}}</td>
-      <td nz-td>{{i.updatedAt | _date}}</td>
+      <td nz-td>{{i.organizationId}}</td>
+      <td nz-td>{{format_date(i.createTime)}}</td>
+      <td nz-td>{{format_date(i.expireTime)}}</td>
       <td nz-td>
         <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)="delete(i)" >
+            <a nz-popconfirm>������</a>
+          </nz-popconfirm>
+          <span nz-table-divider></span>
+          <nz-dropdown>
+              <a class="ant-dropdown-link" nz-dropdown>
+                  ������
+                  <i class="anticon anticon-down"></i>
+              </a>
+              <ul nz-menu>
+                  <li nz-menu-item>
+                      <a (click)="showResetPwdWindow(i)">������������</a>
+                  </li>
+              </ul>
+          </nz-dropdown>
       </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 [nzVisible]="resetPwdWindowIsVisible" [nzTitle]="'������������'" [nzContent]="modalContent" (nzOnCancel)="resetPwdCancel()"
+    (nzOnOk)="resetPwdOk()" [nzConfirmLoading]="isResetPwdLoading">
+    <ng-template #modalContent>
+        <form nz-form [formGroup]="resetPwdForm">
+            <div nz-form-item nz-row>
+                <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
+                    <label for="name" >������</label>
+                </div>
+                <div nz-form-control nz-col [nzSm]="14" [nzXs]="24">
+                    <h4 class="h4">{{ getFormControl('name').value }}</h4>
+                </div>
+            </div>
+            <div nz-form-item nz-row>
+                <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
+                    <label for="password" nz-form-item-required>������</label>
+                </div>
+                <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
+                    <nz-input [nzSize]="'large'" formControlName="password" [nzType]="'password'" [nzId]="'password'" (ngModelChange)="updateConfirmValidator()"></nz-input>
+                    <div nz-form-explain *ngIf="getFormControl('password').dirty&&getFormControl('password').hasError('required')">���������������!</div>
+                </div>
+            </div>
+            <div nz-form-item nz-row>
+                <div nz-form-label nz-col [nzSm]="6" [nzXs]="24">
+                    <label for="checkPassword" nz-form-item-required>������������</label>
+                </div>
+                <div nz-form-control nz-col [nzSm]="14" [nzXs]="24" nzHasFeedback>
+                    <nz-input [nzSize]="'large'" formControlName="checkPassword" [nzType]="'password'" [nzId]="'checkPassword'"></nz-input>
+                    <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('required')">���������������!</div>
+                    <div nz-form-explain *ngIf="getFormControl('checkPassword').dirty&&getFormControl('checkPassword').hasError('confirm')">���������������������!</div>
+                </div>
+            </div>
+        </form>
+    </ng-template>
 </nz-modal>

--
Gitblit v1.8.0