Browse Source

ui button style & update status

MaxKey 3 years ago
parent
commit
9ab56c7803
41 changed files with 835 additions and 448 deletions
  1. 4 0
      maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AccountsMapper.java
  2. 3 0
      maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/UserInfoMapper.java
  3. 3 0
      maxkey-persistence/src/main/java/org/maxkey/persistence/service/AccountsService.java
  4. 5 1
      maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
  5. 4 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/BaseEntity.ts
  6. 30 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/ChangePassword.ts
  7. 3 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/PageResults.ts
  8. 13 5
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Users.ts
  9. 3 1
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members.component.html
  10. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/groups.component.html
  11. 1 2
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges.component.html
  12. 13 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.html
  13. 13 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.ts
  14. 2 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/apps.component.html
  15. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy.component.html
  16. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/adapters/adapters.component.html
  17. 2 2
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/ldap-context/ldap-context.component.html
  18. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider.component.html
  19. 63 59
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizer-editer/synchronizer-editer.component.html
  20. 5 10
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizers.component.html
  21. 2 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organizations.component.html
  22. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resources.component.html
  23. 3 1
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members.component.html
  24. 3 6
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/roles.component.html
  25. 3 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/routes-routing.module.ts
  26. 3 1
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/routes.module.ts
  27. 62 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.html
  28. 0 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.less
  29. 25 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.spec.ts
  30. 75 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.ts
  31. 266 275
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.html
  32. 35 11
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.html
  33. 61 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts
  34. 9 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/accounts.service.ts
  35. 37 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/password.service.ts
  36. 9 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/users.service.ts
  37. 3 4
      maxkey-web-frontend/maxkey-web-mgt-app/src/app/shared/utils/set2stringstil.ts
  38. 15 0
      maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/en-US.json
  39. 16 1
      maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-CN.json
  40. 13 0
      maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/AccountsController.java
  41. 13 1
      maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/UserInfoController.java

+ 4 - 0
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/AccountsMapper.java

@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
 import org.maxkey.entity.Accounts;
 import org.maxkey.entity.AccountsStrategy;
@@ -44,4 +45,7 @@ public  interface AccountsMapper extends IJpaBaseMapper<Accounts> {
     
     @Select("select * from mxk_accounts where appid=#{appId} and	relatedusername=#{relatedUsername}")
     public List<Accounts> queryByAppIdAndAccount(@Param ("appId") String appId,@Param ("relatedUsername") String relatedUsername);
+    
+    @Update("update mxk_accounts set status = #{status}  where id= #{id}")
+    public int updateStatus(Accounts accounts);
 }

+ 3 - 0
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/UserInfoMapper.java

@@ -74,4 +74,7 @@ public interface UserInfoMapper  extends IJpaBaseMapper<UserInfo>{
 	
     @Update("update mxk_userinfo set gridlist =  #{gridList} where id = #{id}")
 	public int 	updateGridList(UserInfo userInfo) ;
+    
+    @Update("update mxk_userinfo set status =  #{status} where id = #{id}")
+   	public int 	updateStatus(UserInfo userInfo) ;
 }

+ 3 - 0
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AccountsService.java

@@ -109,6 +109,9 @@ public class AccountsService  extends JpaBaseService<Accounts>{
          return false;
      }
    
+   public boolean updateStatus(Accounts accounts) {
+	   return this.getMapper().updateStatus(accounts) > 0;
+   }
    public boolean remove(String id) {
        Accounts account = this.get(id);
        if (super.remove(id)) {

+ 5 - 1
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java

@@ -334,7 +334,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
 	public void updateLocked(UserInfo userInfo) {
 		try {
 			if(userInfo != null && StringUtils.isNotEmpty(userInfo.getId())) {
-				userInfo.setIsLocked(ConstsStatus.STOP);
+				userInfo.setIsLocked(ConstsStatus.LOCK);
 				getMapper().updateLocked(userInfo);
 			}
 		} catch(Exception e) {
@@ -397,6 +397,10 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
     public int updateProfile(UserInfo userInfo){
         return getMapper().updateProfile(userInfo);
     }
+    
+    public boolean 	updateStatus(UserInfo userInfo) {
+    	return getMapper().updateStatus(userInfo) > 0;
+    }
 
     public void setPasswordPolicyValidator(PasswordPolicyValidator passwordPolicyValidator) {
         this.passwordPolicyValidator = passwordPolicyValidator;

+ 4 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/BaseEntity.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 export class BaseEntity {
     id!: String;
@@ -23,6 +22,7 @@ export class BaseEntity {
     status!: Number;
     description!: String;
     switch_status: boolean = false;
+    str_status!: String;
 
     constructor() {
         this.status = 1;

+ 30 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/ChangePassword.ts

@@ -0,0 +1,30 @@
+/*
+ * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+
+import { BaseEntity } from './BaseEntity';
+
+export class ChangePassword extends BaseEntity {
+    userId!: String;
+    username!: String;
+    email!: String;
+    mobile!: String;
+    displayName!: String;
+    oldPassword!: String;
+    password!: String;
+    confirmPassword!: String;
+    decipherable!: String;
+}

+ 3 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/PageResults.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import format from 'date-fns/format';
 import { NzSafeAny } from 'ng-zorro-antd/core/types';

+ 13 - 5
maxkey-web-frontend/maxkey-web-mgt-app/src/app/entity/Users.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import { BaseEntity } from './BaseEntity';
 
@@ -143,7 +142,8 @@ export class Users extends BaseEntity {
     switch_dynamic: boolean = false;
 
     gender_select!: String;
-
+    str_married!: String;
+    str_idType!: String;
     constructor() {
         super();
         this.status = 1;
@@ -152,6 +152,8 @@ export class Users extends BaseEntity {
         this.userType = 'EMPLOYEE';
         this.userState = 'RESIDENT';
         this.gender_select = '1';
+        this.str_married = '0';
+        this.str_idType = '0';
     }
 
     override init(data: any): void {
@@ -164,6 +166,9 @@ export class Users extends BaseEntity {
         } else {
             this.gender_select = '2';
         }
+        this.str_status = `${this.status}`;
+        this.str_married = `${this.married}`;
+        this.str_idType = `${this.idType}`;
     }
     override trans(): void {
         if (this.switch_status) {
@@ -177,5 +182,8 @@ export class Users extends BaseEntity {
         } else {
             this.gender = 2;
         }
+        this.status = Number.parseInt(`${this.str_status}`);
+        this.married = Number.parseInt(`${this.str_married}`);
+        this.idType = Number.parseInt(`${this.str_idType}`);
     }
 }

+ 3 - 1
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/group-members/group-members.component.html

@@ -81,7 +81,9 @@
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
                 <button *ngIf="data.dynamic == '0'" nz-button type="button" (click)="onDelete($event, data.id)"
-                  [nzType]="'primary'" nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
+                  nzDanger>{{
+                  'mxk.text.delete' | i18n
+                  }}</button>
               </div>
             </td>
           </tr>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/groups/groups.component.html

@@ -59,12 +59,9 @@
         <td nzAlign="left">{{ data.description }}</td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 1 - 2
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/access/privileges/privileges.component.html

@@ -105,8 +105,7 @@
             </td>
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
-                <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-                  'mxk.text.delete' | i18n
+                <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
                   }}</button>
               </div>
             </td>

+ 13 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.html

@@ -73,16 +73,23 @@
         <td nzAlign="left" nzBreakWord="false">{{ data.displayName }}</td>
         <td nzAlign="left" nzBreakWord="false">{{ data.appName }}</td>
         <td nzAlign="left" nzBreakWord="false">{{ data.relatedUsername }}</td>
-        <td nzAlign="center"> <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill"
-            style="color: green"></i></td>
+        <td nzAlign="center">
+          <i *ngIf="data.status == 1" nz-icon nzType="check-circle" nzTheme="fill" style="color: green"></i>
+          <i *ngIf="data.status == 2" nz-icon nzType="stop" nzTheme="fill" style="color: gray"></i>
+        </td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
+            <button *ngIf="data.status == 2" nz-button type="button" (click)="onUpdateStatus($event, data.id, 1)"
+              style="float: left">{{
+              'mxk.text.enable' | i18n
+              }}</button>
+            <button *ngIf="data.status == 1" nz-button type="button" (click)="onUpdateStatus($event, data.id, 2)"
               style="float: left">{{
-              'mxk.text.edit' | i18n
+              'mxk.text.disable' | i18n
               }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 13 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/accounts/accounts.component.ts

@@ -194,6 +194,19 @@ export class AccountsComponent implements OnInit {
     });
   }
 
+  onUpdateStatus(e: MouseEvent, accountId: String, status: number): void {
+    e.preventDefault();
+    this.accountsService.updateStatus({ id: accountId, status: status }).subscribe(res => {
+      if (res.code == 0) {
+        this.msg.success(`提交成功`);
+        this.fetch();
+      } else {
+        this.msg.success(`提交失败`);
+      }
+      this.cdr.detectChanges();
+    });
+  }
+
   fetch(): void {
     this.query.submitLoading = true;
     this.query.tableLoading = true;

+ 2 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/apps/apps.component.html

@@ -130,12 +130,10 @@
             style="color: green"></i></td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id, data.protocol)" [nzType]="'primary'"
-              style="float: left">{{
+            <button nz-button type="button" (click)="onEdit($event, data.id, data.protocol)" style="float: left">{{
               'mxk.text.edit' | i18n
               }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/accounts-strategy/accounts-strategy.component.html

@@ -64,12 +64,9 @@
             style="color: green"></i></td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/adapters/adapters.component.html

@@ -60,12 +60,9 @@
         <td nzAlign="left">{{ data.description }}</td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 2 - 2
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/ldap-context/ldap-context.component.html

@@ -66,7 +66,7 @@
           name="credentials" id="credentials" />
       </nz-form-control>
     </nz-form-item>
-    <nz-form-item *ngIf="form.model.product == 'ActiveDirectory'">
+    <nz-form-item *ngIf="form.model.product !== 'ActiveDirectory'">
       <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="basedn">{{ 'mxk.ldapcontext.basedn' | i18n }}
       </nz-form-label>
       <nz-form-control [nzSm]="18" [nzXs]="24" nzErrorTip="The input is not valid basedn!">
@@ -74,7 +74,7 @@
           id="basedn" />
       </nz-form-control>
     </nz-form-item>
-    <nz-form-item *ngIf="form.model.product == 'ActiveDirectory'">
+    <nz-form-item *ngIf="form.model.product !== 'ActiveDirectory'">
       <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="filters">
         {{ 'mxk.ldapcontext.filters' | i18n }}
       </nz-form-label>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/socials-provider/socials-provider.component.html

@@ -63,12 +63,9 @@
             style="color: green"></i></td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 63 - 59
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizer-editer/synchronizer-editer.component.html

@@ -4,11 +4,13 @@
     <nz-form-item>
       <nz-form-label [nzMd]="6" nzFor="id">{{ 'mxk.text.id' | i18n }}</nz-form-label>
       <nz-form-control [nzMd]="18" nzErrorTip="The input is not valid id!">
-        <input [(ngModel)]="form.model.id" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }" nz-input name="id" id="id" />
+        <input [(ngModel)]="form.model.id" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }" nz-input
+          name="id" id="id" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sourceType">{{ 'mxk.synchronizers.sourceType' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sourceType">{{ 'mxk.synchronizers.sourceType' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sourceType!">
         <nz-select [(ngModel)]="form.model.sourceType" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }">
           <nz-option nzValue="SCIMV20" nzLabel="SCIM v2.0"> </nz-option>
@@ -20,128 +22,130 @@
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="service">{{ 'mxk.synchronizers.service' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="service">{{ 'mxk.synchronizers.service' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid icon!">
-        <input [(ngModel)]="form.model.service" [ngModelOptions]="{ standalone: true }" nz-input name="service" id="service" />
+        <input [(ngModel)]="form.model.service" [ngModelOptions]="{ standalone: true }" nz-input name="service"
+          id="service" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
       <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="scheduler">{{ 'mxk.synchronizers.scheduler' | i18n }}</nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid icon!">
-        <input [(ngModel)]="form.model.scheduler" [ngModelOptions]="{ standalone: true }" nz-input name="scheduler" id="scheduler" />
+        <input [(ngModel)]="form.model.scheduler" [ngModelOptions]="{ standalone: true }" nz-input name="scheduler"
+          id="scheduler" />
       </nz-form-control>
     </nz-form-item>
-    <nz-form-item
-      *ngIf="
+    <nz-form-item *ngIf="
         form.model.sourceType == 'DB' ||
         form.model.sourceType == 'LDAP' ||
         form.model.sourceType == 'MSAD' ||
         form.model.sourceType == 'SCIMV20'
-      "
-    >
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="providerUrl">{{ 'mxk.synchronizers.providerUrl' | i18n }}</nz-form-label>
+      ">
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="providerUrl">{{ 'mxk.synchronizers.providerUrl' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid providerUrl!">
-        <input [(ngModel)]="form.model.providerUrl" [ngModelOptions]="{ standalone: true }" nz-input name="providerUrl" id="providerUrl" />
+        <input [(ngModel)]="form.model.providerUrl" [ngModelOptions]="{ standalone: true }" nz-input name="providerUrl"
+          id="providerUrl" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="principal">{{ 'mxk.synchronizers.principal' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="principal">{{ 'mxk.synchronizers.principal' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid principal!">
-        <input [(ngModel)]="form.model.principal" [ngModelOptions]="{ standalone: true }" nz-input name="principal" id="principal" />
+        <input [(ngModel)]="form.model.principal" [ngModelOptions]="{ standalone: true }" nz-input name="principal"
+          id="principal" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="credentials">{{ 'mxk.synchronizers.credentials' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="credentials">{{ 'mxk.synchronizers.credentials' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid credentials!">
-        <input [(ngModel)]="form.model.credentials" [ngModelOptions]="{ standalone: true }" nz-input name="credentials" id="credentials" />
+        <input type="password" [(ngModel)]="form.model.credentials" [ngModelOptions]="{ standalone: true }" nz-input
+          name="credentials" id="credentials" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="basedn">{{ 'mxk.synchronizers.basedn' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="basedn">{{ 'mxk.synchronizers.basedn' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid basedn!">
-        <input [(ngModel)]="form.model.basedn" [ngModelOptions]="{ standalone: true }" nz-input name="basedn" id="basedn" />
+        <input [(ngModel)]="form.model.basedn" [ngModelOptions]="{ standalone: true }" nz-input name="basedn"
+          id="basedn" />
       </nz-form-control>
     </nz-form-item>
-    <nz-form-item *ngIf="form.model.sourceType == 'DB' || form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
+    <nz-form-item
+      *ngIf="form.model.sourceType == 'DB' || form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
       <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="filters">{{ 'mxk.synchronizers.filters' | i18n }}</nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid filters!">
-        <input [(ngModel)]="form.model.filters" [ngModelOptions]="{ standalone: true }" nz-input name="filters" id="filters" />
+        <input [(ngModel)]="form.model.filters" [ngModelOptions]="{ standalone: true }" nz-input name="filters"
+          id="filters" />
       </nz-form-control>
     </nz-form-item>
 
     <nz-form-item *ngIf="form.model.sourceType == 'MSAD'">
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="msadDomain">{{ 'mxk.synchronizers.msadDomain' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="msadDomain">{{ 'mxk.synchronizers.msadDomain' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid msadDomain!">
-        <input [(ngModel)]="form.model.msadDomain" [ngModelOptions]="{ standalone: true }" nz-input name="msadDomain" id="msadDomain" />
+        <input [(ngModel)]="form.model.msadDomain" [ngModelOptions]="{ standalone: true }" nz-input name="msadDomain"
+          id="msadDomain" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
       <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sslSwitch">{{ 'mxk.synchronizers.sslSwitch' | i18n }}</nz-form-label>
       <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid sslSwitch!">
-        <nz-switch
-          [(ngModel)]="form.model.switch_sslSwitch"
-          [ngModelOptions]="{ standalone: true }"
-          name="sslSwitch"
-          [nzCheckedChildren]="checkedTemplate"
-          [nzUnCheckedChildren]="unCheckedTemplate"
-        ></nz-switch>
+        <nz-switch [(ngModel)]="form.model.switch_sslSwitch" [ngModelOptions]="{ standalone: true }" name="sslSwitch"
+          [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
         <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
         <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
       </nz-form-control>
     </nz-form-item>
     <nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="trustStore">{{ 'mxk.synchronizers.trustStore' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="trustStore">{{ 'mxk.synchronizers.trustStore' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid trustStore!">
-        <input [(ngModel)]="form.model.trustStore" [ngModelOptions]="{ standalone: true }" nz-input name="trustStore" id="trustStore" />
+        <input [(ngModel)]="form.model.trustStore" [ngModelOptions]="{ standalone: true }" nz-input name="trustStore"
+          id="trustStore" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'">
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="trustStorePassword">{{ 'mxk.synchronizers.trustStorePassword' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="trustStorePassword">{{ 'mxk.synchronizers.trustStorePassword' | i18n
+        }}</nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sortIndex!">
-        <input
-          [(ngModel)]="form.model.trustStorePassword"
-          [ngModelOptions]="{ standalone: true }"
-          nz-input
-          name="trustStorePassword"
-          id="trustStorePassword"
-        />
+        <input [(ngModel)]="form.model.trustStorePassword" [ngModelOptions]="{ standalone: true }" nz-input
+          name="trustStorePassword" id="trustStorePassword" />
       </nz-form-control>
     </nz-form-item>
 
     <nz-form-item *ngIf="form.model.sourceType == 'DB' || form.model.sourceType == 'API'">
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="syncStartTime">{{ 'mxk.synchronizers.syncStartTime' | i18n }}</nz-form-label>
-      <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid syncStartTime!">
-        <input
-          [(ngModel)]="form.model.syncStartTime"
-          [ngModelOptions]="{ standalone: true }"
-          nz-input
-          name="syncStartTime"
-          id="syncStartTime"
-        />
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="syncStartTime">{{ 'mxk.synchronizers.syncStartTime' | i18n }}
+      </nz-form-label>
+      <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48"
+        nzErrorTip="The input is not valid syncStartTime!">
+        <input [(ngModel)]="form.model.syncStartTime" [ngModelOptions]="{ standalone: true }" nz-input
+          name="syncStartTime" id="syncStartTime" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="resumeTime">{{ 'mxk.synchronizers.resumeTime' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="resumeTime">{{ 'mxk.synchronizers.resumeTime' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid resumeTime!">
-        <input [(ngModel)]="form.model.resumeTime" [ngModelOptions]="{ standalone: true }" nz-input name="resumeTime" id="resumeTime" />
+        <input [(ngModel)]="form.model.resumeTime" [ngModelOptions]="{ standalone: true }" nz-input name="resumeTime"
+          id="resumeTime" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
-      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="suspendTime">{{ 'mxk.synchronizers.suspendTime' | i18n }}</nz-form-label>
+      <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="suspendTime">{{ 'mxk.synchronizers.suspendTime' | i18n }}
+      </nz-form-label>
       <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid suspendTime!">
-        <input [(ngModel)]="form.model.suspendTime" [ngModelOptions]="{ standalone: true }" nz-input name="suspendTime" id="suspendTime" />
+        <input [(ngModel)]="form.model.suspendTime" [ngModelOptions]="{ standalone: true }" nz-input name="suspendTime"
+          id="suspendTime" />
       </nz-form-control>
     </nz-form-item>
     <nz-form-item>
       <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="status">{{ 'mxk.text.status' | i18n }}</nz-form-label>
       <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid status!">
-        <nz-switch
-          [(ngModel)]="form.model.switch_status"
-          [ngModelOptions]="{ standalone: true }"
-          name="status"
-          [nzCheckedChildren]="checkedTemplate"
-          [nzUnCheckedChildren]="unCheckedTemplate"
-        ></nz-switch>
+        <nz-switch [(ngModel)]="form.model.switch_status" [ngModelOptions]="{ standalone: true }" name="status"
+          [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
         <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
         <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
       </nz-form-control>
@@ -152,4 +156,4 @@
 <div *nzModalFooter>
   <button nz-button nzType="default" (click)="onClose($event)">{{ 'mxk.text.close' | i18n }}</button>
   <button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.submit' | i18n }}</button>
-</div>
+</div>

+ 5 - 10
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/config/synchronizers/synchronizers.component.html

@@ -60,16 +60,11 @@
             style="color: green"></i></td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onSynchr($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.synchr' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onSynchr($event, data.id)" style="float: left">{{ 'mxk.text.synchr'
+              | i18n }}</button>
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 2 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/organizations/organizations.component.html

@@ -82,12 +82,10 @@
                 style="color: green"></i></td>
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
-                <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-                  style="float: left">
+                <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">
                   {{ 'mxk.text.edit' | i18n }}
                 </button>
-                <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-                  'mxk.text.delete' | i18n
+                <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
                   }}</button>
               </div>
             </td>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/resources/resources.component.html

@@ -99,12 +99,9 @@
                 style="color: green"></i></td>
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
-                <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-                  style="float: left">{{
-                  'mxk.text.edit' | i18n
-                  }}</button>
-                <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-                  'mxk.text.delete' | i18n
+                <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit'
+                  | i18n }}</button>
+                <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
                   }}</button>
               </div>
             </td>

+ 3 - 1
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/role-members.component.html

@@ -81,7 +81,9 @@
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
                 <button *ngIf="data.dynamic == '0'" nz-button type="button" (click)="onDelete($event, data.id)"
-                  [nzType]="'primary'" nzDanger>{{ 'mxk.text.delete' | i18n }}</button>
+                  nzDanger>{{
+                  'mxk.text.delete' | i18n
+                  }}</button>
               </div>
             </td>
           </tr>

+ 3 - 6
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/roles.component.html

@@ -59,12 +59,9 @@
         <td nzAlign="left">{{ data.description }}</td>
         <td nzAlign="left" nzBreakWord="false">
           <div nz-col>
-            <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-              style="float: left">{{
-              'mxk.text.edit' | i18n
-              }}</button>
-            <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-              'mxk.text.delete' | i18n
+            <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">{{ 'mxk.text.edit' |
+              i18n }}</button>
+            <button nz-button type="button" (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n
               }}</button>
           </div>
         </td>

+ 3 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/routes-routing.module.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';

+ 3 - 1
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/routes.module.ts

@@ -36,6 +36,7 @@ import { RouteRoutingModule } from './routes-routing.module';
 import { SelectUserComponent } from './users/select-user/select-user.component';
 import { UserEditerComponent } from './users/user-editer/user-editer.component';
 import { UsersComponent } from './users/users.component';
+import { PasswordComponent } from './users/password/password.component';
 
 const COMPONENTS: Array<Type<null>> = [];
 
@@ -59,7 +60,8 @@ const COMPONENTS: Array<Type<null>> = [];
     AppSaml20DetailsEditerComponent,
     AppTokenBasedDetailsEditerComponent,
     AppExtendApiDetailsEditerComponent,
-    AppBasicDetailsEditerComponent
+    AppBasicDetailsEditerComponent,
+    PasswordComponent
   ]
 })
 export class RoutesModule { }

+ 62 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.html

@@ -0,0 +1,62 @@
+<div *nzModalTitle> {{ 'mxk.text.changepassword' | i18n }} </div>
+<div>
+    <form nz-form [formGroup]="formGroup" (ngSubmit)="onSubmit($event)" se-container="1">
+        <nz-form-item style="width: 100%" class="d-none">
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="id">{{ 'mxk.password.id' | i18n }} </nz-form-label>
+            <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid id!">
+                <input [(ngModel)]="form.model.id" [ngModelOptions]="{ standalone: true }" nz-input name="id" id="id" />
+            </nz-form-control>
+        </nz-form-item>
+        <nz-form-item style="width: 100%">
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="username">{{ 'mxk.password.username' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid username!">
+                <input disabled [(ngModel)]="form.model.username" [ngModelOptions]="{ standalone: true }" nz-input
+                    name="username" id="username" />
+            </nz-form-control>
+        </nz-form-item>
+        <nz-form-item style="width: 100%">
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="displayName">{{ 'mxk.password.displayName' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid displayName!">
+                <input disabled [(ngModel)]="form.model.displayName" [ngModelOptions]="{ standalone: true }" nz-input
+                    name="displayName" id="displayName" />
+            </nz-form-control>
+        </nz-form-item>
+        <nz-form-item style="width: 100%">
+            <nz-form-label nzRequired [nzSm]="6" [nzXs]="24" nzFor="password">{{ 'mxk.password.password' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="18" [nzXs]="24" nzErrorTip="The input is not valid password!">
+                <nz-input-group [nzSuffix]="suffixPasswordTemplate" [nzAddOnAfter]="suffixPasswordButton"
+                    style="width: 100%">
+                    <input [type]="passwordVisible ? 'text' : 'password'" nz-input placeholder="new password"
+                        [(ngModel)]="form.model.password" [ngModelOptions]="{ standalone: true }" name="password"
+                        id="password" />
+                </nz-input-group>
+                <ng-template #suffixPasswordTemplate>
+                    <i nz-icon [nzType]="passwordVisible ? 'eye-invisible' : 'eye'"
+                        (click)="passwordVisible = !passwordVisible"></i>
+                </ng-template>
+                <ng-template #suffixPasswordButton>
+                    <button nz-button nzType="primary" nzSearch (click)="onPassword($event)">{{ 'mxk.text.generate' |
+                        i18n }}</button>
+                </ng-template>
+            </nz-form-control>
+        </nz-form-item>
+        <nz-form-item style="width: 100%">
+            <nz-form-label nzRequired [nzSm]="6" [nzXs]="24" nzFor="confirmPassword">{{ 'mxk.password.confirmPassword' |
+                i18n }}</nz-form-label>
+            <nz-form-control [nzSm]="18" [nzXs]="24" nzErrorTip="The input is not valid confirmPassword!">
+                <input type="password" nz-input placeholder="confirm password" [(ngModel)]="form.model.confirmPassword"
+                    [ngModelOptions]="{ standalone: true }" name="confirmPassword" id="confirmPassword" />
+            </nz-form-control>
+        </nz-form-item>
+    </form>
+</div>
+
+<div *nzModalFooter>
+    <button nz-button nzType="default" (click)="onClose($event)">{{ 'mxk.text.close' | i18n }}</button>
+    <button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.submit' | i18n }}</button>
+</div>

+ 0 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.less


+ 25 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.spec.ts

@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PasswordComponent } from './password.component';
+
+describe('PasswordComponent', () => {
+  let component: PasswordComponent;
+  let fixture: ComponentFixture<PasswordComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [ PasswordComponent ]
+    })
+    .compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(PasswordComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 75 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/password/password.component.ts

@@ -0,0 +1,75 @@
+import { Component, ChangeDetectorRef, OnInit, Input } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
+
+import { ChangePassword } from '../../../entity/ChangePassword';
+import { PasswordService } from '../../../service/password.service';
+import { UsersService } from '../../../service/users.service';
+
+@Component({
+  selector: 'app-password',
+  templateUrl: './password.component.html',
+  styleUrls: ['./password.component.less']
+})
+export class PasswordComponent implements OnInit {
+  @Input() id?: String;
+  @Input() username?: String;
+  @Input() displayName?: String;
+
+  form: {
+    submitting: boolean;
+    model: ChangePassword;
+  } = {
+      submitting: false,
+      model: new ChangePassword()
+    };
+
+  passwordVisible: boolean = false;
+
+  formGroup: FormGroup = new FormGroup({});
+
+  constructor(
+    private usersService: UsersService,
+    private passwordService: PasswordService,
+    private modalRef: NzModalRef,
+    private fb: FormBuilder,
+    private msg: NzMessageService,
+    private cdr: ChangeDetectorRef
+  ) { }
+
+  ngOnInit(): void {
+    this.form.model.id = this.id || '';
+    this.form.model.userId = this.id || '';
+    this.form.model.username = this.username || '';
+    this.form.model.displayName = this.displayName || '';
+  }
+
+  onPassword(e: MouseEvent): void {
+    e.preventDefault();
+    this.usersService.generatePassword({}).subscribe(res => {
+      this.form.model.password = res.data;
+      this.form.model.confirmPassword = res.data;
+      this.cdr.detectChanges();
+    });
+  }
+
+  onClose(e: MouseEvent): void {
+    e.preventDefault();
+    this.modalRef.destroy({ refresh: false });
+  }
+
+  onSubmit(e: MouseEvent): void {
+    e.preventDefault();
+    this.form.submitting = true;
+    this.passwordService.changePassword(this.form.model).subscribe(res => {
+      if (res.code == 0) {
+        this.msg.success(`提交成功`);
+      } else {
+        this.msg.success(`提交失败`);
+      }
+      this.modalRef.destroy({ refresh: true });
+      this.cdr.detectChanges();
+    });
+  }
+}

+ 266 - 275
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/user-editer/user-editer.component.html

@@ -7,53 +7,45 @@
           <nz-form-item style="display: none">
             <nz-form-label [nzMd]="8" nzFor="id">{{ 'mxk.text.id' | i18n }}</nz-form-label>
             <nz-form-control [nzMd]="16" nzErrorTip="The input is not valid id!">
-              <input
-                [(ngModel)]="form.model.id"
-                disabled="{{ isEdit }}"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="id"
-                id="id"
-              />
-              <input
-                [(ngModel)]="form.model.pictureId"
-                disabled="{{ isEdit }}"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="pictureId"
-                id="pictureId"
-              />
+              <input [(ngModel)]="form.model.id" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }"
+                nz-input name="id" id="id" />
+              <input [(ngModel)]="form.model.pictureId" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }"
+                nz-input name="pictureId" id="pictureId" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <div nz-row style="width: 100%; margin-bottom: 18px">
-              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="name">{{ 'mxk.users.displayName' | i18n }}</nz-form-label>
-              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid displayName!">
-                <input
-                  [(ngModel)]="form.model.displayName"
-                  [ngModelOptions]="{ standalone: true }"
-                  nz-input
-                  name="displayName"
-                  id="displayName"
-                />
+              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="name">{{ 'mxk.users.displayName' | i18n }}
+              </nz-form-label>
+              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid displayName!">
+                <input [(ngModel)]="form.model.displayName" [ngModelOptions]="{ standalone: true }" nz-input
+                  name="displayName" id="displayName" />
               </nz-form-control>
             </div>
             <div nz-row style="width: 100%; margin-bottom: 18px">
-              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="username">{{ 'mxk.users.username' | i18n }}</nz-form-label>
-              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid username!">
-                <input [(ngModel)]="form.model.username" [ngModelOptions]="{ standalone: true }" nz-input name="username" id="username" />
+              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="username">{{ 'mxk.users.username' | i18n }}
+              </nz-form-label>
+              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid username!">
+                <input [(ngModel)]="form.model.username" [ngModelOptions]="{ standalone: true }" nz-input
+                  name="username" id="username" />
               </nz-form-control>
             </div>
             <div nz-row class="{{ isEdit ? 'passwordhidden' : 'passwordshow' }}">
-              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="password">{{ 'mxk.users.password' | i18n }}</nz-form-label>
-              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid password!">
-                <input [(ngModel)]="form.model.password" [ngModelOptions]="{ standalone: true }" nz-input name="password" id="password" />
+              <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="password">{{ 'mxk.users.password' | i18n }}
+              </nz-form-label>
+              <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+                nzErrorTip="The input is not valid password!">
+                <input [(ngModel)]="form.model.password" [ngModelOptions]="{ standalone: true }" nz-input
+                  name="password" id="password" />
               </nz-form-control>
             </div>
             <div nz-row style="width: 100%">
               <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="gender">{{ 'mxk.users.gender' | i18n }}</nz-form-label>
               <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid gender!">
-                <nz-radio-group [(ngModel)]="form.model.gender_select" [ngModelOptions]="{ standalone: true }" nzButtonStyle="solid">
+                <nz-radio-group [(ngModel)]="form.model.gender_select" [ngModelOptions]="{ standalone: true }"
+                  nzButtonStyle="solid">
                   <label nz-radio-button nzValue="2">{{ 'mxk.users.gender.male' | i18n }}</label>
                   <label nz-radio-button nzValue="1">{{ 'mxk.users.gender.female' | i18n }}</label>
                 </nz-radio-group>
@@ -64,21 +56,15 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="uploadFile">{{ 'mxk.users.picture' | i18n }}</nz-form-label>
             <div nz-col class="clearfix" nzSm="16" nzXs="24">
-              <nz-upload
-                nzAction="file/upload/"
-                nzListType="picture-card"
-                [(nzFileList)]="fileList"
-                nzName="uploadFile"
-                [nzShowButton]="fileList.length < 1"
-                [nzPreview]="handlePreview"
-                (nzChange)="uploadImageChange($event)"
-              >
+              <nz-upload nzAction="file/upload/" nzListType="picture-card" [(nzFileList)]="fileList" nzName="uploadFile"
+                [nzShowButton]="fileList.length < 1" [nzPreview]="handlePreview" (nzChange)="uploadImageChange($event)">
                 <div>
                   <i nz-icon nzType="plus"></i>
                   <div style="margin-top: 8px">Upload</div>
                 </div>
               </nz-upload>
-              <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
+              <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null"
+                (nzOnCancel)="previewVisible = false">
                 <ng-template #modalContent>
                   <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
                 </ng-template>
@@ -88,85 +74,99 @@
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid employeeNumber!">
-              <input
-                [(ngModel)]="form.model.employeeNumber"
-                readonly
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="employeeNumber"
-                id="employeeNumber"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid employeeNumber!">
+              <input [(ngModel)]="form.model.employeeNumber" readonly [ngModelOptions]="{ standalone: true }" nz-input
+                name="employeeNumber" id="employeeNumber" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="windowsAccount">{{ 'mxk.users.windowsAccount' | i18n }}</nz-form-label>
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="windowsAccount">{{ 'mxk.users.windowsAccount' | i18n }}
+            </nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid status!">
-              <input
-                [(ngModel)]="form.model.windowsAccount"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="windowsAccount"
-                id="windowsAccount"
-              />
+              <input [(ngModel)]="form.model.windowsAccount" [ngModelOptions]="{ standalone: true }" nz-input
+                name="windowsAccount" id="windowsAccount" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="mobile">{{ 'mxk.users.mobile' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid mobile!">
-              <input [(ngModel)]="form.model.mobile" readonly [ngModelOptions]="{ standalone: true }" nz-input name="mobile" id="mobile" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid mobile!">
+              <input [(ngModel)]="form.model.mobile" readonly [ngModelOptions]="{ standalone: true }" nz-input
+                name="mobile" id="mobile" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="email">{{ 'mxk.users.email' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid email!">
-              <input [(ngModel)]="form.model.email" [ngModelOptions]="{ standalone: true }" nz-input name="email" id="email" />
+              <input [(ngModel)]="form.model.email" [ngModelOptions]="{ standalone: true }" nz-input name="email"
+                id="email" />
             </nz-form-control>
           </nz-form-item>
         </div>
 
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userType">{{ 'mxk.users.userType' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid userType!">
-              <input [(ngModel)]="form.model.userType" [ngModelOptions]="{ standalone: true }" nz-input name="userType" id="userType" />
-            </nz-form-control>
-          </nz-form-item>
-          <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userState">{{ 'mxk.users.userstate' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid userState!">
-              <input
-                [(ngModel)]="form.model.userState"
-                readonly
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="userState"
-                id="userState"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userType">{{ 'mxk.users.userType' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid userType!">
+              <nz-select [(ngModel)]="form.model.userType" [ngModelOptions]="{ standalone: true }" name="userType"
+                id="userType">
+                <nz-option nzValue="EMPLOYEE" nzLabel="{{ 'mxk.users.userType.employee' | i18n }}"> </nz-option>
+                <nz-option nzValue="SUPPLIER" nzLabel="{{ 'mxk.users.userType.supplier' | i18n }}"> </nz-option>
+                <nz-option nzValue="CUSTOMER" nzLabel="{{ 'mxk.users.userType.customer' | i18n }}"> </nz-option>
+                <nz-option nzValue="CONTRACTOR" nzLabel="{{ 'mxk.users.userType.contractor' | i18n }}"></nz-option>
+                <nz-option nzValue="DEALER" nzLabel="{{ 'mxk.users.userType.dealer' | i18n }}"></nz-option>
+                <nz-option nzValue="PARTNER" nzLabel="{{ 'mxk.users.userType.partner' | i18n }}"></nz-option>
+                <nz-option nzValue="EXTERNAL" nzLabel="{{ 'mxk.users.userType.external' | i18n }}"></nz-option>
+                <nz-option nzValue="INTERN" nzLabel="{{ 'mxk.users.userType.intern' | i18n }}"></nz-option>
+                <nz-option nzValue="TEMP" nzLabel="{{ 'mxk.users.userType.temp' | i18n }}"></nz-option>
+              </nz-select>
+            </nz-form-control>
+          </nz-form-item>
+          <nz-form-item>
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userState">{{ 'mxk.users.userstate' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid userState!">
+              <nz-select [(ngModel)]="form.model.userState" [ngModelOptions]="{ standalone: true }" name="userState"
+                id="userState">
+                <nz-option nzValue="RESIDENT" nzLabel="{{ 'mxk.users.userstate.resident' | i18n }}"> </nz-option>
+                <nz-option nzValue="WITHDRAWN" nzLabel="{{ 'mxk.users.userstate.withdrawn' | i18n }}"> </nz-option>
+                <nz-option nzValue="INACTIVE" nzLabel="{{ 'mxk.users.userstate.inactive' | i18n }}"> </nz-option>
+                <nz-option nzValue="RETIREE" nzLabel="{{ 'mxk.users.userstate.retiree' | i18n }}"></nz-option>
+              </nz-select>
             </nz-form-control>
           </nz-form-item>
         </div>
 
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="sortIndex">{{ 'mxk.text.sortIndex' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sortIndex!">
-              <nz-input-number
-                [(ngModel)]="form.model.sortIndex"
-                [ngModelOptions]="{ standalone: true }"
-                [nzMin]="1"
-                [nzMax]="100000"
-                [nzStep]="1"
-              ></nz-input-number>
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="sortIndex">{{ 'mxk.text.sortIndex' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid sortIndex!">
+              <nz-input-number [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }" [nzMin]="1"
+                [nzMax]="100000" [nzStep]="1"></nz-input-number>
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="status">{{ 'mxk.text.status' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid status!">
-              <input [(ngModel)]="form.model.status" [ngModelOptions]="{ standalone: true }" nz-input name="status" id="status" />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="status">{{ 'mxk.text.status' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid status!">
+              <nz-select [(ngModel)]="form.model.str_status" [ngModelOptions]="{ standalone: true }" name="status"
+                id="status">
+                <nz-option nzValue="1" nzLabel="{{ 'mxk.users.status.active' | i18n }}"></nz-option>
+                <nz-option nzValue="2" nzLabel="{{ 'mxk.users.status.inactive' | i18n }}"></nz-option>
+                <nz-option nzValue="5" nzLabel="{{ 'mxk.users.status.lock' | i18n }}"></nz-option>
+                <nz-option nzValue="9" nzLabel="{{ 'mxk.users.status.delete' | i18n }}"></nz-option>
+              </nz-select>
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -176,25 +176,15 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="familyName">{{ 'mxk.users.familyName' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="16" nzErrorTip="The input is not valid familyName!">
-              <input
-                [(ngModel)]="form.model.familyName"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="familyName"
-                id="familyName"
-              />
+              <input [(ngModel)]="form.model.familyName" [ngModelOptions]="{ standalone: true }" nz-input
+                name="familyName" id="familyName" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="middleName">{{ 'mxk.users.middleName' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid middleName!">
-              <input
-                [(ngModel)]="form.model.middleName"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="middleName"
-                id="middleName"
-              />
+              <input [(ngModel)]="form.model.middleName" [ngModelOptions]="{ standalone: true }" nz-input
+                name="middleName" id="middleName" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -202,13 +192,15 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="givenName">{{ 'mxk.users.givenName' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid givenName!">
-              <input [(ngModel)]="form.model.givenName" [ngModelOptions]="{ standalone: true }" nz-input name="givenName" id="givenName" />
+              <input [(ngModel)]="form.model.givenName" [ngModelOptions]="{ standalone: true }" nz-input
+                name="givenName" id="givenName" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="nickName">{{ 'mxk.users.nickName' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid nickName!">
-              <input [(ngModel)]="form.model.nickName" [ngModelOptions]="{ standalone: true }" nz-input name="nickName" id="nickName" />
+              <input [(ngModel)]="form.model.nickName" [ngModelOptions]="{ standalone: true }" nz-input name="nickName"
+                id="nickName" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -216,13 +208,21 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="idType">{{ 'mxk.users.idtype' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid idType!">
-              <input [(ngModel)]="form.model.idType" [ngModelOptions]="{ standalone: true }" nz-input name="idType" id="idType" />
+              <nz-select [(ngModel)]="form.model.str_idType" [ngModelOptions]="{ standalone: true }" name="idType"
+                id="idType">
+                <nz-option nzValue="0" nzLabel="{{ 'mxk.users.idtype.unknown' | i18n }}"></nz-option>
+                <nz-option nzValue="1" nzLabel="{{ 'mxk.users.idtype.idcard' | i18n }}"></nz-option>
+                <nz-option nzValue="2" nzLabel="{{ 'mxk.users.idtype.passport' | i18n }}"></nz-option>
+                <nz-option nzValue="3" nzLabel="{{ 'mxk.users.idtype.studentcard' | i18n }}"></nz-option>
+                <nz-option nzValue="4" nzLabel="{{ 'mxk.users.idtype.militarycard' | i18n }}"></nz-option>
+              </nz-select>
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="idCardNo">{{ 'mxk.users.idCardNo' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid idCardNo!">
-              <input [(ngModel)]="form.model.idCardNo" [ngModelOptions]="{ standalone: true }" nz-input name="idCardNo" id="idCardNo" />
+              <input [(ngModel)]="form.model.idCardNo" [ngModelOptions]="{ standalone: true }" nz-input name="idCardNo"
+                id="idCardNo" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -230,39 +230,39 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="married">{{ 'mxk.users.married' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid married!">
-              <input [(ngModel)]="form.model.married" [ngModelOptions]="{ standalone: true }" nz-input name="married" id="married" />
+              <nz-select [(ngModel)]="form.model.str_married" [ngModelOptions]="{ standalone: true }" name="married"
+                id="married">
+                <nz-option nzValue="0" nzLabel="{{ 'mxk.users.married.unknown' | i18n }}"></nz-option>
+                <nz-option nzValue="1" nzLabel="{{ 'mxk.users.married.single' | i18n }}"></nz-option>
+                <nz-option nzValue="2" nzLabel="{{ 'mxk.users.married.married' | i18n }}"></nz-option>
+                <nz-option nzValue="3" nzLabel="{{ 'mxk.users.married.divorce' | i18n }}"></nz-option>
+                <nz-option nzValue="4" nzLabel="{{ 'mxk.users.married.widowed' | i18n }}"></nz-option>
+              </nz-select>
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="birthDate">{{ 'mxk.users.birthDate' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid birthDate!">
-              <input [(ngModel)]="form.model.birthDate" [ngModelOptions]="{ standalone: true }" nz-input name="birthDate" id="birthDate" />
+              <input [(ngModel)]="form.model.birthDate" [ngModelOptions]="{ standalone: true }" nz-input
+                name="birthDate" id="birthDate" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="preferredLanguage">{{ 'mxk.users.preferredLanguage' | i18n }}</nz-form-label>
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="preferredLanguage">{{ 'mxk.users.preferredLanguage' | i18n }}
+            </nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid preferredLanguage!">
-              <input
-                [(ngModel)]="form.model.preferredLanguage"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="preferredLanguage"
-                id="preferredLanguage"
-              />
+              <input [(ngModel)]="form.model.preferredLanguage" [ngModelOptions]="{ standalone: true }" nz-input
+                name="preferredLanguage" id="preferredLanguage" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="startWorkDate">{{ 'mxk.users.startWorkDate' | i18n }}</nz-form-label>
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="startWorkDate">{{ 'mxk.users.startWorkDate' | i18n }}
+            </nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid startWorkDate!">
-              <input
-                [(ngModel)]="form.model.startWorkDate"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="startWorkDate"
-                id="startWorkDate"
-              />
+              <input [(ngModel)]="form.model.startWorkDate" [ngModelOptions]="{ standalone: true }" nz-input
+                name="startWorkDate" id="startWorkDate" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -270,13 +270,15 @@
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="webSite">{{ 'mxk.users.website' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid webSite!">
-              <input [(ngModel)]="form.model.webSite" [ngModelOptions]="{ standalone: true }" nz-input name="webSite" id="webSite" />
+              <input [(ngModel)]="form.model.webSite" [ngModelOptions]="{ standalone: true }" nz-input name="webSite"
+                id="webSite" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="defineIm">{{ 'mxk.users.ims' | i18n }}</nz-form-label>
             <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid defineIm!">
-              <input [(ngModel)]="form.model.defineIm" [ngModelOptions]="{ standalone: true }" nz-input name="defineIm" id="defineIm" />
+              <input [(ngModel)]="form.model.defineIm" [ngModelOptions]="{ standalone: true }" nz-input name="defineIm"
+                id="defineIm" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -284,115 +286,112 @@
       <nz-tab nzTitle="{{ 'mxk.users.tab.business' | i18n }}">
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="organization">{{ 'mxk.users.organization' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid organization!">
-              <input
-                [(ngModel)]="form.model.organization"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="organization"
-                id="organization"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="organization">{{ 'mxk.users.organization' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid organization!">
+              <input [(ngModel)]="form.model.organization" [ngModelOptions]="{ standalone: true }" nz-input
+                name="organization" id="organization" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="division">{{ 'mxk.users.division' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid division!">
-              <input [(ngModel)]="form.model.division" [ngModelOptions]="{ standalone: true }" nz-input name="division" id="division" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid division!">
+              <input [(ngModel)]="form.model.division" [ngModelOptions]="{ standalone: true }" nz-input name="division"
+                id="division" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="departmentId">{{ 'mxk.users.departmentId' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid departmentId!">
-              <input
-                [(ngModel)]="form.model.departmentId"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="departmentId"
-                id="departmentId"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="departmentId">{{ 'mxk.users.departmentId' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid departmentId!">
+              <input [(ngModel)]="form.model.departmentId" [ngModelOptions]="{ standalone: true }" nz-input
+                name="departmentId" id="departmentId" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="department">{{ 'mxk.users.department' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid department!">
-              <input
-                [(ngModel)]="form.model.department"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="department"
-                id="department"
-              />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid department!">
+              <input [(ngModel)]="form.model.department" [ngModelOptions]="{ standalone: true }" nz-input
+                name="department" id="department" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="costCenter">{{ 'mxk.users.costCenter' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid departmentId!">
-              <input
-                [(ngModel)]="form.model.costCenter"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="costCenter"
-                id="costCenter"
-              />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid departmentId!">
+              <input [(ngModel)]="form.model.costCenter" [ngModelOptions]="{ standalone: true }" nz-input
+                name="costCenter" id="costCenter" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="jobLevel">{{ 'mxk.users.jobLevel' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid jobLevel!">
-              <input [(ngModel)]="form.model.jobLevel" [ngModelOptions]="{ standalone: true }" nz-input name="jobLevel" id="jobLevel" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid jobLevel!">
+              <input [(ngModel)]="form.model.jobLevel" [ngModelOptions]="{ standalone: true }" nz-input name="jobLevel"
+                id="jobLevel" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="jobTitle">{{ 'mxk.users.jobTitle' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid jobTitle!">
-              <input [(ngModel)]="form.model.jobTitle" [ngModelOptions]="{ standalone: true }" nz-input name="jobTitle" id="jobTitle" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid jobTitle!">
+              <input [(ngModel)]="form.model.jobTitle" [ngModelOptions]="{ standalone: true }" nz-input name="jobTitle"
+                id="jobTitle" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="manager">{{ 'mxk.users.manager' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid manager!">
-              <input [(ngModel)]="form.model.manager" [ngModelOptions]="{ standalone: true }" nz-input name="manager" id="manager" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid manager!">
+              <input [(ngModel)]="form.model.manager" [ngModelOptions]="{ standalone: true }" nz-input name="manager"
+                id="manager" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="assistant">{{ 'mxk.users.assistant' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid assistant!">
-              <input [(ngModel)]="form.model.assistant" [ngModelOptions]="{ standalone: true }" nz-input name="assistant" id="assistant" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid assistant!">
+              <input [(ngModel)]="form.model.assistant" [ngModelOptions]="{ standalone: true }" nz-input
+                name="assistant" id="assistant" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workOfficeName">{{ 'mxk.users.workOfficeName' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workOfficeName!">
-              <input
-                [(ngModel)]="form.model.workOfficeName"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="workOfficeName"
-                id="workOfficeName"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workOfficeName">{{ 'mxk.users.workOfficeName' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid workOfficeName!">
+              <input [(ngModel)]="form.model.workOfficeName" [ngModelOptions]="{ standalone: true }" nz-input
+                name="workOfficeName" id="workOfficeName" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="entryDate">{{ 'mxk.users.entryDate' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid entryDate!">
-              <input [(ngModel)]="form.model.entryDate" [ngModelOptions]="{ standalone: true }" nz-input name="entryDate" id="entryDate" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid entryDate!">
+              <input [(ngModel)]="form.model.entryDate" [ngModelOptions]="{ standalone: true }" nz-input
+                name="entryDate" id="entryDate" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="quitDate">{{ 'mxk.users.quitDate' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid quitDate!">
-              <input [(ngModel)]="form.model.quitDate" [ngModelOptions]="{ standalone: true }" nz-input name="quitDate" id="quitDate" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid quitDate!">
+              <input [(ngModel)]="form.model.quitDate" [ngModelOptions]="{ standalone: true }" nz-input name="quitDate"
+                id="quitDate" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -400,81 +399,77 @@
       <nz-tab nzTitle="{{ 'mxk.users.tab.business.extra' | i18n }}">
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workPhoneNumber">{{ 'mxk.users.workPhoneNumber' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workPhoneNumber!">
-              <input
-                [(ngModel)]="form.model.workPhoneNumber"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="workPhoneNumber"
-                id="workPhoneNumber"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workPhoneNumber">{{ 'mxk.users.workPhoneNumber' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid workPhoneNumber!">
+              <input [(ngModel)]="form.model.workPhoneNumber" [ngModelOptions]="{ standalone: true }" nz-input
+                name="workPhoneNumber" id="workPhoneNumber" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workEmail">{{ 'mxk.users.workEmail' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workEmail!">
-              <input [(ngModel)]="form.model.workEmail" [ngModelOptions]="{ standalone: true }" nz-input name="workEmail" id="workEmail" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid workEmail!">
+              <input [(ngModel)]="form.model.workEmail" [ngModelOptions]="{ standalone: true }" nz-input
+                name="workEmail" id="workEmail" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workCountry">{{ 'mxk.users.workCountry' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workCountry!">
-              <input
-                [(ngModel)]="form.model.workCountry"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="workCountry"
-                id="workCountry"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workCountry">{{ 'mxk.users.workCountry' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid workCountry!">
+              <input [(ngModel)]="form.model.workCountry" [ngModelOptions]="{ standalone: true }" nz-input
+                name="workCountry" id="workCountry" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="region">{{ 'mxk.users.workRegion' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid region!">
-              <input [(ngModel)]="form.model.workRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region" id="region" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid region!">
+              <input [(ngModel)]="form.model.workRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region"
+                id="region" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="locality">{{ 'mxk.users.workLocality' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid locality!">
-              <input [(ngModel)]="form.model.workLocality" [ngModelOptions]="{ standalone: true }" nz-input name="locality" id="locality" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid locality!">
+              <input [(ngModel)]="form.model.workLocality" [ngModelOptions]="{ standalone: true }" nz-input
+                name="locality" id="locality" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="street">{{ 'mxk.users.workStreetAddress' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid street!">
-              <input
-                [(ngModel)]="form.model.workStreetAddress"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="street"
-                id="street"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="street">{{ 'mxk.users.workStreetAddress' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid street!">
+              <input [(ngModel)]="form.model.workStreetAddress" [ngModelOptions]="{ standalone: true }" nz-input
+                name="street" id="street" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="postalCode">{{ 'mxk.users.workPostalCode' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid postalCode!">
-              <input
-                [(ngModel)]="form.model.workPostalCode"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="postalCode"
-                id="postalCode"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="postalCode">{{ 'mxk.users.workPostalCode' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid postalCode!">
+              <input [(ngModel)]="form.model.workPostalCode" [ngModelOptions]="{ standalone: true }" nz-input
+                name="postalCode" id="postalCode" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workFax">{{ 'mxk.users.workFax' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workFax!">
-              <input [(ngModel)]="form.model.workFax" [ngModelOptions]="{ standalone: true }" nz-input name="workFax" id="workFax" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid workFax!">
+              <input [(ngModel)]="form.model.workFax" [ngModelOptions]="{ standalone: true }" nz-input name="workFax"
+                id="workFax" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -483,80 +478,76 @@
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeEmail">{{ 'mxk.users.homeEmail' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homeEmail!">
-              <input [(ngModel)]="form.model.homeEmail" [ngModelOptions]="{ standalone: true }" nz-input name="homeEmail" id="homeEmail" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid homeEmail!">
+              <input [(ngModel)]="form.model.homeEmail" [ngModelOptions]="{ standalone: true }" nz-input
+                name="homeEmail" id="homeEmail" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePhoneNumber">{{ 'mxk.users.homePhoneNumber' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homePhoneNumber!">
-              <input
-                [(ngModel)]="form.model.homePhoneNumber"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="homePhoneNumber"
-                id="homePhoneNumber"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePhoneNumber">{{ 'mxk.users.homePhoneNumber' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid homePhoneNumber!">
+              <input [(ngModel)]="form.model.homePhoneNumber" [ngModelOptions]="{ standalone: true }" nz-input
+                name="homePhoneNumber" id="homePhoneNumber" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeFax">{{ 'mxk.users.homeFax' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homeFax!">
-              <input [(ngModel)]="form.model.homeFax" [ngModelOptions]="{ standalone: true }" nz-input name="homeFax" id="homeFax" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid homeFax!">
+              <input [(ngModel)]="form.model.homeFax" [ngModelOptions]="{ standalone: true }" nz-input name="homeFax"
+                id="homeFax" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePostalCode">{{ 'mxk.users.homePostalCode' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid postalCode!">
-              <input
-                [(ngModel)]="form.model.homePostalCode"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="homePostalCode"
-                id="homePostalCode"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePostalCode">{{ 'mxk.users.homePostalCode' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid postalCode!">
+              <input [(ngModel)]="form.model.homePostalCode" [ngModelOptions]="{ standalone: true }" nz-input
+                name="homePostalCode" id="homePostalCode" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeCountry">{{ 'mxk.users.homeCountry' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homeCountry!">
-              <input
-                [(ngModel)]="form.model.homeCountry"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="homeCountry"
-                id="homeCountry"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeCountry">{{ 'mxk.users.homeCountry' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid homeCountry!">
+              <input [(ngModel)]="form.model.homeCountry" [ngModelOptions]="{ standalone: true }" nz-input
+                name="homeCountry" id="homeCountry" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="region">{{ 'mxk.users.homeRegion' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid region!">
-              <input [(ngModel)]="form.model.homeRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region" id="region" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid region!">
+              <input [(ngModel)]="form.model.homeRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region"
+                id="region" />
             </nz-form-control>
           </nz-form-item>
         </div>
         <div nz-row>
           <nz-form-item>
             <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="locality">{{ 'mxk.users.homeLocality' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid locality!">
-              <input [(ngModel)]="form.model.homeLocality" [ngModelOptions]="{ standalone: true }" nz-input name="locality" id="locality" />
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid locality!">
+              <input [(ngModel)]="form.model.homeLocality" [ngModelOptions]="{ standalone: true }" nz-input
+                name="locality" id="locality" />
             </nz-form-control>
           </nz-form-item>
           <nz-form-item>
-            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeStreetAddress">{{ 'mxk.users.homeStreetAddress' | i18n }}</nz-form-label>
-            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid street!">
-              <input
-                [(ngModel)]="form.model.homeStreetAddress"
-                [ngModelOptions]="{ standalone: true }"
-                nz-input
-                name="street"
-                id="street"
-              />
+            <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeStreetAddress">{{ 'mxk.users.homeStreetAddress' | i18n }}
+            </nz-form-label>
+            <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
+              nzErrorTip="The input is not valid street!">
+              <input [(ngModel)]="form.model.homeStreetAddress" [ngModelOptions]="{ standalone: true }" nz-input
+                name="street" id="street" />
             </nz-form-control>
           </nz-form-item>
         </div>
@@ -569,4 +560,4 @@
 <div *nzModalFooter>
   <button nz-button nzType="default" (click)="onClose($event)">{{ 'mxk.text.close' | i18n }}</button>
   <button nz-button nzType="primary" (click)="onSubmit($event)">{{ 'mxk.text.submit' | i18n }}</button>
-</div>
+</div>

+ 35 - 11
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.html

@@ -26,10 +26,15 @@
 <nz-card [nzBordered]="false">
   <div nz-row [nzGutter]="{ xs: 8, sm: 8, md: 8, lg: 24, xl: 48, xxl: 48 }">
     <div nz-col [nzSpan]="24" class="table-list-toolbar">
-      <button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">{{ 'mxk.text.add' | i18n }}</button>
-      <button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">{{
-        'mxk.text.delete' | i18n
-        }}</button>
+      <button nz-button type="button" [nzType]="'primary'" (click)="onAdd($event)">
+        {{ 'mxk.text.add' | i18n }}
+      </button>
+      <button nz-button type="button" [nzType]="'primary'" (click)="changePassword($event)">
+        {{ 'mxk.text.changepassword' | i18n }}
+      </button>
+      <button nz-button type="button" (click)="onBatchDelete($event)" [nzType]="'primary'" nzDanger class="mx-sm">
+        {{ 'mxk.text.delete' | i18n }}
+      </button>
     </div>
     <div nz-col nzMd="6" nzSm="24" class="grid-border">
       <nz-tree nzShowLine="false" [nzCheckable]="treeNodes.checkable" nzBlockNode [nzData]="treeNodes.nodes"
@@ -96,13 +101,32 @@
             </td>
             <td nzAlign="left" nzBreakWord="false">
               <div nz-col>
-                <button nz-button type="button" (click)="onEdit($event, data.id)" [nzType]="'primary'"
-                  style="float: left">{{
-                  'mxk.text.edit' | i18n
-                  }}</button>
-                <button nz-button type="button" (click)="onDelete($event, data.id)" [nzType]="'primary'" nzDanger>{{
-                  'mxk.text.delete' | i18n
-                  }}</button>
+                <button nz-button type="button" (click)="onEdit($event, data.id)" style="float: left">
+                  {{ 'mxk.text.edit' | i18n }}
+                </button>
+                <button *ngIf="data.status !== 9" nz-button nz-dropdown [nzDropdownMenu]="menuMoreAction">
+                  {{ 'mxk.text.moreaction' | i18n }}
+                  <i nz-icon nzType="down"></i>
+                </button>
+                <nz-dropdown-menu #menuMoreAction="nzDropdownMenu">
+                  <ul nz-menu>
+                    <li nz-menu-item *ngIf="data.status == 1" (click)="changePasswordById($event, data.id)">{{
+                      'mxk.text.changepassword' | i18n
+                      }}</li>
+                    <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 5)">{{
+                      'mxk.text.lock' | i18n }}</li>
+                    <li nz-menu-item *ngIf="data.status == 1" (click)="onUpdateStatus($event, data.id, 2)">{{
+                      'mxk.text.disable' | i18n
+                      }}</li>
+                    <li nz-menu-item *ngIf="data.status == 2" (click)="onUpdateStatus($event, data.id, 1)">{{
+                      'mxk.text.enable' | i18n
+                      }}</li>
+                    <li nz-menu-item *ngIf="data.status == 5" (click)="onUpdateStatus($event, data.id, 1)">{{
+                      'mxk.text.unlock' | i18n
+                      }}</li>
+                    <li nz-menu-item (click)="onDelete($event, data.id)" nzDanger>{{ 'mxk.text.delete' | i18n }}</li>
+                  </ul>
+                </nz-dropdown-menu>
               </div>
             </td>
           </tr>

+ 61 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/users/users.component.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
 import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@@ -32,6 +31,7 @@ import { TreeNodes } from '../../entity/TreeNodes';
 import { OrganizationsService } from '../../service/organizations.service';
 import { UsersService } from '../../service/users.service';
 import { set2String } from '../../shared/index';
+import { PasswordComponent } from './password/password.component';
 import { UserEditerComponent } from './user-editer/user-editer.component';
 
 @Component({
@@ -127,6 +127,50 @@ export class UsersComponent implements OnInit {
     });
   }
 
+  changePassword(e: MouseEvent): void {
+    e.preventDefault();
+    let lastCheckedId: String = '';
+    this.query.tableCheckedId.forEach(value => {
+      lastCheckedId = value;
+    });
+    for (var i = 0; i < this.query.results.rows.length; i++) {
+      let user = this.query.results.rows[i];
+      if (lastCheckedId == user.id) {
+        const modal = this.modal.create({
+          nzContent: PasswordComponent,
+          nzViewContainerRef: this.viewContainerRef,
+          nzComponentParams: {
+            id: user.id,
+            username: user.username,
+            displayName: user.displayName
+          },
+          nzWidth: 450,
+          nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
+        });
+      }
+    }
+  }
+
+  changePasswordById(e: MouseEvent, userId: String): void {
+    e.preventDefault();
+    for (var i = 0; i < this.query.results.rows.length; i++) {
+      let user = this.query.results.rows[i];
+      if (userId == user.id) {
+        const modal = this.modal.create({
+          nzContent: PasswordComponent,
+          nzViewContainerRef: this.viewContainerRef,
+          nzComponentParams: {
+            id: user.id,
+            username: user.username,
+            displayName: user.displayName
+          },
+          nzWidth: 450,
+          nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
+        });
+      }
+    }
+  }
+
   onAdd(e: MouseEvent): void {
     e.preventDefault();
     const modal = this.modal.create({
@@ -169,6 +213,19 @@ export class UsersComponent implements OnInit {
     });
   }
 
+  onUpdateStatus(e: MouseEvent, userId: String, status: number): void {
+    e.preventDefault();
+    this.usersService.updateStatus({ id: userId, status: status }).subscribe(res => {
+      if (res.code == 0) {
+        this.msg.success(`提交成功`);
+        this.fetch();
+      } else {
+        this.msg.success(`提交失败`);
+      }
+      this.cdr.detectChanges();
+    });
+  }
+
   onDelete(e: MouseEvent, deleteId: String): void {
     e.preventDefault();
     this.usersService.delete(deleteId).subscribe(res => {

+ 9 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/accounts.service.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
@@ -35,4 +34,10 @@ export class AccountsService extends BaseService<Accounts> {
   generate(params: NzSafeAny): Observable<Message<Accounts>> {
     return this.getByParams(params, `${this.server.urls.base}/generate`);
   }
+
+  updateStatus(params: NzSafeAny): Observable<Message<Accounts>> {
+    return this.http.get<Message<Accounts>>(`${this.server.urls.base}/updateStatus`, {
+      params: this.parseParams(params)
+    });
+  }
 }

+ 37 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/password.service.ts

@@ -0,0 +1,37 @@
+/*
+ * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import { HttpClient, HttpParams } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { NzSafeAny } from 'ng-zorro-antd/core/types';
+import { Observable } from 'rxjs';
+
+import { ChangePassword } from '../entity/ChangePassword';
+import { Message } from '../entity/Message';
+import { BaseService } from './base.service';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class PasswordService extends BaseService<ChangePassword> {
+  constructor(private _httpClient: HttpClient) {
+    super(_httpClient, '/config');
+  }
+
+  public changePassword(body: NzSafeAny): Observable<Message<ChangePassword>> {
+    return this.http.put<Message<ChangePassword>>('/users/changePassword', body);
+  }
+}

+ 9 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/service/users.service.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
@@ -37,4 +36,10 @@ export class UsersService extends BaseService<Users> {
       params: this.parseParams(params)
     });
   }
+
+  updateStatus(params: NzSafeAny): Observable<Message<Users>> {
+    return this.http.get<Message<Users>>(`${this.server.urls.base}/updateStatus`, {
+      params: this.parseParams(params)
+    });
+  }
 }

+ 3 - 4
maxkey-web-frontend/maxkey-web-mgt-app/src/app/shared/utils/set2stringstil.ts

@@ -1,19 +1,18 @@
 /*
  * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
 
 export function set2String(set: Set<String>): string {
     let setValues = '';

+ 15 - 0
maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/en-US.json

@@ -549,6 +549,15 @@
       "resumeTime":"Join Time",
       "suspendTime":"Suspend Time"
     },
+    "password":{
+      "id": "Id",
+      "displayName": "DisplayName",
+      "username": "Username",
+      "oldPassword": "Old Password",
+      "password": "New Password",
+      "confirmPassword": "Confirm Password",
+      "captcha": "Captcha"
+    },
     "smsprovider" :{
       "provider": "provider",
       "name":{
@@ -631,6 +640,7 @@
       "manual":"Manual",
       "automatic":"Automatic",
       "terminate":"Terminate",
+      "changepassword": "ChangePassword",
       "add": "Add",
       "edit": "Edit",
       "delete": "Delete",
@@ -638,6 +648,11 @@
       "confirm":"Confirm",
       "synchr":"Synchr",
       "close":"Close",
+      "enable":"Enable",
+      "disable":"Disable",
+      "lock":"Lock",
+      "unlock":"UnLock",
+      "moreaction":"More",
       "submit":"Submit",
       "generate":"Generate",
       "upload":"Upload",

+ 16 - 1
maxkey-web-frontend/maxkey-web-mgt-app/src/assets/i18n/zh-CN.json

@@ -88,7 +88,7 @@
       "displayName":"姓名",
       "username":"登录账号",
       "password":"密码",
-      "email":"邮箱",
+      "email":"电子邮箱",
       "mobile":"手机号码",
       "userType":"用户类型",
       "userType.employee":"内部员工",
@@ -548,6 +548,15 @@
       "resumeTime":"执行时间",
       "suspendTime":"挂起时间"
     },
+    "password":{
+      "id": "用户编码",
+      "displayName": "姓名",
+      "username": "账号",
+      "oldPassword": "当前密码",
+      "password": "新密码",
+      "confirmPassword": "确认密码",
+      "captcha": "验证码"
+    },
     "smsprovider" :{
       "provider": "提供商",
       "name":{
@@ -630,6 +639,7 @@
       "manual":"人工",
       "automatic":"自动",
       "terminate":"终止",
+      "changepassword": "密码修改",
       "add": "新增",
       "edit": "编辑",
       "delete": "删除",
@@ -637,7 +647,12 @@
       "confirm":"确定",
       "synchr":"同步",
       "close":"关闭",
+      "enable":"启用",
+      "disable":"禁用",
+      "lock":"锁定",
+      "unlock":"解锁",
       "submit":"提交",
+      "moreaction":"更多",
       "generate":"生成",
       "upload":"上传",
       "save":"保存",

+ 13 - 0
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/AccountsController.java

@@ -113,6 +113,19 @@ public class AccountsController {
 		}
 	}
 	
+	
+	@RequestMapping(value = { "/updateStatus" }, produces = {MediaType.APPLICATION_JSON_VALUE})
+	@ResponseBody
+	public ResponseEntity<?> updateStatus(@ModelAttribute Accounts accounts,@CurrentUser UserInfo currentUser) {
+		_logger.debug(""+accounts);
+		accounts.setInstId(currentUser.getInstId());
+		if (accountsService.updateStatus(accounts)) {
+		    return new Message<Accounts>(Message.SUCCESS).buildResponse();
+		} else {
+			return new Message<Accounts>(Message.FAIL).buildResponse();
+		}
+	}
+	
 	@ResponseBody
 	@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
 	public ResponseEntity<?> delete(@RequestParam("ids") String ids,@CurrentUser UserInfo currentUser) {

+ 13 - 1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/UserInfoController.java

@@ -185,7 +185,7 @@ public class UserInfoController {
 	@ResponseBody
 	@RequestMapping(value="/changePassword", produces = {MediaType.APPLICATION_JSON_VALUE})
 	public ResponseEntity<?> changePassword(
-			@ModelAttribute ChangePassword changePassword,
+			@RequestBody ChangePassword changePassword,
 			@CurrentUser UserInfo currentUser) {
 		_logger.debug("UserId {}",changePassword.getUserId());
 		changePassword.setPasswordSetType(ConstsPasswordSetType.PASSWORD_NORMAL);
@@ -197,6 +197,18 @@ public class UserInfoController {
 		}
 	}
 	
+	@RequestMapping(value = { "/updateStatus" }, produces = {MediaType.APPLICATION_JSON_VALUE})
+	@ResponseBody
+	public ResponseEntity<?> updateStatus(@ModelAttribute UserInfo userInfo,@CurrentUser UserInfo currentUser) {
+		_logger.debug(""+userInfo);
+		userInfo.setInstId(currentUser.getInstId());
+		if(userInfoService.updateStatus(userInfo)) {
+			return new Message<UserInfo>(Message.SUCCESS).buildResponse();
+		} else {
+			return new Message<UserInfo>(Message.FAIL).buildResponse();
+		}
+	}
+	
     @RequestMapping(value = "/import")
     public ResponseEntity<?> importingUsers(
     		@ModelAttribute("excelImportFile")ExcelImport excelImportFile,