ui button style & update status

This commit is contained in:
MaxKey 2022-05-24 09:09:24 +08:00
parent 1f5c9922f6
commit 9ab56c7803
41 changed files with 832 additions and 445 deletions

View File

@ -24,6 +24,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper; import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
import org.maxkey.entity.Accounts; import org.maxkey.entity.Accounts;
import org.maxkey.entity.AccountsStrategy; 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}") @Select("select * from mxk_accounts where appid=#{appId} and relatedusername=#{relatedUsername}")
public List<Accounts> queryByAppIdAndAccount(@Param ("appId") String appId,@Param ("relatedUsername") String 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);
} }

View File

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

View File

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

View File

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

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
export class BaseEntity { export class BaseEntity {
id!: String; id!: String;
instId!: String; instId!: String;
@ -23,6 +22,7 @@ export class BaseEntity {
status!: Number; status!: Number;
description!: String; description!: String;
switch_status: boolean = false; switch_status: boolean = false;
str_status!: String;
constructor() { constructor() {
this.status = 1; this.status = 1;

View File

@ -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;
}

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import format from 'date-fns/format'; import format from 'date-fns/format';
import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzSafeAny } from 'ng-zorro-antd/core/types';

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { BaseEntity } from './BaseEntity'; import { BaseEntity } from './BaseEntity';
export class Users extends BaseEntity { export class Users extends BaseEntity {
@ -143,7 +142,8 @@ export class Users extends BaseEntity {
switch_dynamic: boolean = false; switch_dynamic: boolean = false;
gender_select!: String; gender_select!: String;
str_married!: String;
str_idType!: String;
constructor() { constructor() {
super(); super();
this.status = 1; this.status = 1;
@ -152,6 +152,8 @@ export class Users extends BaseEntity {
this.userType = 'EMPLOYEE'; this.userType = 'EMPLOYEE';
this.userState = 'RESIDENT'; this.userState = 'RESIDENT';
this.gender_select = '1'; this.gender_select = '1';
this.str_married = '0';
this.str_idType = '0';
} }
override init(data: any): void { override init(data: any): void {
@ -164,6 +166,9 @@ export class Users extends BaseEntity {
} else { } else {
this.gender_select = '2'; this.gender_select = '2';
} }
this.str_status = `${this.status}`;
this.str_married = `${this.married}`;
this.str_idType = `${this.idType}`;
} }
override trans(): void { override trans(): void {
if (this.switch_status) { if (this.switch_status) {
@ -177,5 +182,8 @@ export class Users extends BaseEntity {
} else { } else {
this.gender = 2; this.gender = 2;
} }
this.status = Number.parseInt(`${this.str_status}`);
this.married = Number.parseInt(`${this.str_married}`);
this.idType = Number.parseInt(`${this.str_idType}`);
} }
} }

View File

@ -81,7 +81,9 @@
<td nzAlign="left" nzBreakWord="false"> <td nzAlign="left" nzBreakWord="false">
<div nz-col> <div nz-col>
<button *ngIf="data.dynamic == '0'" nz-button type="button" (click)="onDelete($event, data.id)" <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> </div>
</td> </td>
</tr> </tr>

View File

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

View File

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

View File

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

View File

@ -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 { fetch(): void {
this.query.submitLoading = true; this.query.submitLoading = true;
this.query.tableLoading = true; this.query.tableLoading = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,13 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzMd]="6" nzFor="id">{{ 'mxk.text.id' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<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-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-select [(ngModel)]="form.model.sourceType" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }">
<nz-option nzValue="SCIMV20" nzLabel="SCIM v2.0"> </nz-option> <nz-option nzValue="SCIMV20" nzLabel="SCIM v2.0"> </nz-option>
@ -20,128 +22,130 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="scheduler">{{ 'mxk.synchronizers.scheduler' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item <nz-form-item *ngIf="
*ngIf="
form.model.sourceType == 'DB' || form.model.sourceType == 'DB' ||
form.model.sourceType == 'LDAP' || form.model.sourceType == 'LDAP' ||
form.model.sourceType == 'MSAD' || form.model.sourceType == 'MSAD' ||
form.model.sourceType == 'SCIMV20' form.model.sourceType == 'SCIMV20'
" ">
> <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="providerUrl">{{ 'mxk.synchronizers.providerUrl' | i18n }}
<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="providerUrl">{{ 'mxk.synchronizers.providerUrl' | i18n }}</nz-form-label> </nz-form-label>
<nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid providerUrl!"> <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-control>
</nz-form-item> </nz-form-item>
<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!"> <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-control>
</nz-form-item> </nz-form-item>
<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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'"> <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!"> <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-control>
</nz-form-item> </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-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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'MSAD'"> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'"> <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-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-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid sslSwitch!">
<nz-switch <nz-switch [(ngModel)]="form.model.switch_sslSwitch" [ngModelOptions]="{ standalone: true }" name="sslSwitch"
[(ngModel)]="form.model.switch_sslSwitch" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
[ngModelOptions]="{ standalone: true }"
name="sslSwitch"
[nzCheckedChildren]="checkedTemplate"
[nzUnCheckedChildren]="unCheckedTemplate"
></nz-switch>
<ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template> <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
<ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template> <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'"> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'LDAP' || form.model.sourceType == 'MSAD'"> <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!"> <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sortIndex!">
<input <input [(ngModel)]="form.model.trustStorePassword" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.trustStorePassword" name="trustStorePassword" id="trustStorePassword" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="trustStorePassword"
id="trustStorePassword"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item *ngIf="form.model.sourceType == 'DB' || form.model.sourceType == 'API'"> <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-label [nzSm]="6" [nzXs]="24" nzFor="syncStartTime">{{ 'mxk.synchronizers.syncStartTime' | i18n }}
<nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid syncStartTime!"> </nz-form-label>
<input <nz-form-control [nzSm]="18" [nzMd]="18" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.syncStartTime" nzErrorTip="The input is not valid syncStartTime!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.syncStartTime" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="syncStartTime" id="syncStartTime" />
name="syncStartTime"
id="syncStartTime"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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!"> <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-control>
</nz-form-item> </nz-form-item>
<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!"> <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-control>
</nz-form-item> </nz-form-item>
<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-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-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="The input is not valid status!">
<nz-switch <nz-switch [(ngModel)]="form.model.switch_status" [ngModelOptions]="{ standalone: true }" name="status"
[(ngModel)]="form.model.switch_status" [nzCheckedChildren]="checkedTemplate" [nzUnCheckedChildren]="unCheckedTemplate"></nz-switch>
[ngModelOptions]="{ standalone: true }"
name="status"
[nzCheckedChildren]="checkedTemplate"
[nzUnCheckedChildren]="unCheckedTemplate"
></nz-switch>
<ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template> <ng-template #checkedTemplate><i nz-icon nzType="check"></i></ng-template>
<ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template> <ng-template #unCheckedTemplate><i nz-icon nzType="close"></i></ng-template>
</nz-form-control> </nz-form-control>

View File

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

View File

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

View File

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

View File

@ -81,7 +81,9 @@
<td nzAlign="left" nzBreakWord="false"> <td nzAlign="left" nzBreakWord="false">
<div nz-col> <div nz-col>
<button *ngIf="data.dynamic == '0'" nz-button type="button" (click)="onDelete($event, data.id)" <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> </div>
</td> </td>
</tr> </tr>

View File

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

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { SimpleGuard } from '@delon/auth'; import { SimpleGuard } from '@delon/auth';

View File

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

View File

@ -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>

View File

@ -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();
});
});

View File

@ -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();
});
}
}

View File

@ -7,53 +7,45 @@
<nz-form-item style="display: none"> <nz-form-item style="display: none">
<nz-form-label [nzMd]="8" nzFor="id">{{ 'mxk.text.id' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzMd]="16" nzErrorTip="The input is not valid id!">
<input <input [(ngModel)]="form.model.id" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }"
[(ngModel)]="form.model.id" nz-input name="id" id="id" />
disabled="{{ isEdit }}" <input [(ngModel)]="form.model.pictureId" disabled="{{ isEdit }}" [ngModelOptions]="{ standalone: true }"
[ngModelOptions]="{ standalone: true }" nz-input name="pictureId" id="pictureId" />
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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<div nz-row style="width: 100%; margin-bottom: 18px"> <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-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="name">{{ 'mxk.users.displayName' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid displayName!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.displayName" nzErrorTip="The input is not valid displayName!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.displayName" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="displayName" id="displayName" />
name="displayName"
id="displayName"
/>
</nz-form-control> </nz-form-control>
</div> </div>
<div nz-row style="width: 100%; margin-bottom: 18px"> <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-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="username">{{ 'mxk.users.username' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid username!"> </nz-form-label>
<input [(ngModel)]="form.model.username" [ngModelOptions]="{ standalone: true }" nz-input name="username" id="username" /> <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> </nz-form-control>
</div> </div>
<div nz-row class="{{ isEdit ? 'passwordhidden' : 'passwordshow' }}"> <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-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="password">{{ 'mxk.users.password' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid password!"> </nz-form-label>
<input [(ngModel)]="form.model.password" [ngModelOptions]="{ standalone: true }" nz-input name="password" id="password" /> <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> </nz-form-control>
</div> </div>
<div nz-row style="width: 100%"> <div nz-row style="width: 100%">
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="gender">{{ 'mxk.users.gender' | i18n }}</nz-form-label> <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-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="2">{{ 'mxk.users.gender.male' | i18n }}</label>
<label nz-radio-button nzValue="1">{{ 'mxk.users.gender.female' | i18n }}</label> <label nz-radio-button nzValue="1">{{ 'mxk.users.gender.female' | i18n }}</label>
</nz-radio-group> </nz-radio-group>
@ -64,21 +56,15 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="uploadFile">{{ 'mxk.users.picture' | i18n }}</nz-form-label> <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"> <div nz-col class="clearfix" nzSm="16" nzXs="24">
<nz-upload <nz-upload nzAction="file/upload/" nzListType="picture-card" [(nzFileList)]="fileList" nzName="uploadFile"
nzAction="file/upload/" [nzShowButton]="fileList.length < 1" [nzPreview]="handlePreview" (nzChange)="uploadImageChange($event)">
nzListType="picture-card"
[(nzFileList)]="fileList"
nzName="uploadFile"
[nzShowButton]="fileList.length < 1"
[nzPreview]="handlePreview"
(nzChange)="uploadImageChange($event)"
>
<div> <div>
<i nz-icon nzType="plus"></i> <i nz-icon nzType="plus"></i>
<div style="margin-top: 8px">Upload</div> <div style="margin-top: 8px">Upload</div>
</div> </div>
</nz-upload> </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> <ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" /> <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
</ng-template> </ng-template>
@ -88,85 +74,99 @@
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="employeeNumber">{{ 'mxk.users.employeeNumber' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid employeeNumber!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.employeeNumber" nzErrorTip="The input is not valid employeeNumber!">
readonly <input [(ngModel)]="form.model.employeeNumber" readonly [ngModelOptions]="{ standalone: true }" nz-input
[ngModelOptions]="{ standalone: true }" name="employeeNumber" id="employeeNumber" />
nz-input
name="employeeNumber"
id="employeeNumber"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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!"> <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid status!">
<input <input [(ngModel)]="form.model.windowsAccount" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.windowsAccount" name="windowsAccount" id="windowsAccount" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="windowsAccount"
id="windowsAccount"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="mobile">{{ 'mxk.users.mobile' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.mobile" readonly [ngModelOptions]="{ standalone: true }" nz-input name="mobile" id="mobile" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="email">{{ 'mxk.users.email' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userType">{{ 'mxk.users.userType' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userType">{{ 'mxk.users.userType' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid userType!"> </nz-form-label>
<input [(ngModel)]="form.model.userType" [ngModelOptions]="{ standalone: true }" nz-input name="userType" id="userType" /> <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-control>
</nz-form-item> </nz-form-item>
<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-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="userState">{{ 'mxk.users.userstate' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid userState!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.userState" nzErrorTip="The input is not valid userState!">
readonly <nz-select [(ngModel)]="form.model.userState" [ngModelOptions]="{ standalone: true }" name="userState"
[ngModelOptions]="{ standalone: true }" id="userState">
nz-input <nz-option nzValue="RESIDENT" nzLabel="{{ 'mxk.users.userstate.resident' | i18n }}"> </nz-option>
name="userState" <nz-option nzValue="WITHDRAWN" nzLabel="{{ 'mxk.users.userstate.withdrawn' | i18n }}"> </nz-option>
id="userState" <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="sortIndex">{{ 'mxk.text.sortIndex' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="sortIndex">{{ 'mxk.text.sortIndex' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid sortIndex!"> </nz-form-label>
<nz-input-number <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.sortIndex" nzErrorTip="The input is not valid sortIndex!">
[ngModelOptions]="{ standalone: true }" <nz-input-number [(ngModel)]="form.model.sortIndex" [ngModelOptions]="{ standalone: true }" [nzMin]="1"
[nzMin]="1" [nzMax]="100000" [nzStep]="1"></nz-input-number>
[nzMax]="100000"
[nzStep]="1"
></nz-input-number>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="status">{{ 'mxk.text.status' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid status!"> </nz-form-label>
<input [(ngModel)]="form.model.status" [ngModelOptions]="{ standalone: true }" nz-input name="status" id="status" /> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -176,25 +176,15 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="familyName">{{ 'mxk.users.familyName' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzXs]="16" nzErrorTip="The input is not valid familyName!">
<input <input [(ngModel)]="form.model.familyName" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.familyName" name="familyName" id="familyName" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="familyName"
id="familyName"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="middleName">{{ 'mxk.users.middleName' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid middleName!">
<input <input [(ngModel)]="form.model.middleName" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.middleName" name="middleName" id="middleName" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="middleName"
id="middleName"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -202,13 +192,15 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="givenName">{{ 'mxk.users.givenName' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="nickName">{{ 'mxk.users.nickName' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -216,13 +208,21 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="idType">{{ 'mxk.users.idtype' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="idCardNo">{{ 'mxk.users.idCardNo' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -230,39 +230,39 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="married">{{ 'mxk.users.married' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="birthDate">{{ 'mxk.users.birthDate' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <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!"> <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid preferredLanguage!">
<input <input [(ngModel)]="form.model.preferredLanguage" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.preferredLanguage" name="preferredLanguage" id="preferredLanguage" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="preferredLanguage"
id="preferredLanguage"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<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!"> <nz-form-control [nzSm]="16" [nzXs]="24" nzErrorTip="The input is not valid startWorkDate!">
<input <input [(ngModel)]="form.model.startWorkDate" [ngModelOptions]="{ standalone: true }" nz-input
[(ngModel)]="form.model.startWorkDate" name="startWorkDate" id="startWorkDate" />
[ngModelOptions]="{ standalone: true }"
nz-input
name="startWorkDate"
id="startWorkDate"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -270,13 +270,15 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="webSite">{{ 'mxk.users.website' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="defineIm">{{ 'mxk.users.ims' | i18n }}</nz-form-label> <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!"> <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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -284,115 +286,112 @@
<nz-tab nzTitle="{{ 'mxk.users.tab.business' | i18n }}"> <nz-tab nzTitle="{{ 'mxk.users.tab.business' | i18n }}">
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="organization">{{ 'mxk.users.organization' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="organization">{{ 'mxk.users.organization' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid organization!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.organization" nzErrorTip="The input is not valid organization!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.organization" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="organization" id="organization" />
name="organization"
id="organization"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="division">{{ 'mxk.users.division' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.division" [ngModelOptions]="{ standalone: true }" nz-input name="division" id="division" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="departmentId">{{ 'mxk.users.departmentId' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="departmentId">{{ 'mxk.users.departmentId' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid departmentId!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.departmentId" nzErrorTip="The input is not valid departmentId!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.departmentId" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="departmentId" id="departmentId" />
name="departmentId"
id="departmentId"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="department">{{ 'mxk.users.department' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input nzErrorTip="The input is not valid department!">
[(ngModel)]="form.model.department" <input [(ngModel)]="form.model.department" [ngModelOptions]="{ standalone: true }" nz-input
[ngModelOptions]="{ standalone: true }" name="department" id="department" />
nz-input
name="department"
id="department"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="costCenter">{{ 'mxk.users.costCenter' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input nzErrorTip="The input is not valid departmentId!">
[(ngModel)]="form.model.costCenter" <input [(ngModel)]="form.model.costCenter" [ngModelOptions]="{ standalone: true }" nz-input
[ngModelOptions]="{ standalone: true }" name="costCenter" id="costCenter" />
nz-input
name="costCenter"
id="costCenter"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="jobLevel">{{ 'mxk.users.jobLevel' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.jobLevel" [ngModelOptions]="{ standalone: true }" nz-input name="jobLevel" id="jobLevel" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="jobTitle">{{ 'mxk.users.jobTitle' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.jobTitle" [ngModelOptions]="{ standalone: true }" nz-input name="jobTitle" id="jobTitle" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="manager">{{ 'mxk.users.manager' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.manager" [ngModelOptions]="{ standalone: true }" nz-input name="manager" id="manager" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="assistant">{{ 'mxk.users.assistant' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.assistant" [ngModelOptions]="{ standalone: true }" nz-input name="assistant" id="assistant" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workOfficeName">{{ 'mxk.users.workOfficeName' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workOfficeName">{{ 'mxk.users.workOfficeName' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workOfficeName!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.workOfficeName" nzErrorTip="The input is not valid workOfficeName!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.workOfficeName" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="workOfficeName" id="workOfficeName" />
name="workOfficeName"
id="workOfficeName"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="entryDate">{{ 'mxk.users.entryDate' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.entryDate" [ngModelOptions]="{ standalone: true }" nz-input name="entryDate" id="entryDate" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="quitDate">{{ 'mxk.users.quitDate' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.quitDate" [ngModelOptions]="{ standalone: true }" nz-input name="quitDate" id="quitDate" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -400,81 +399,77 @@
<nz-tab nzTitle="{{ 'mxk.users.tab.business.extra' | i18n }}"> <nz-tab nzTitle="{{ 'mxk.users.tab.business.extra' | i18n }}">
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workPhoneNumber">{{ 'mxk.users.workPhoneNumber' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workPhoneNumber">{{ 'mxk.users.workPhoneNumber' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workPhoneNumber!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.workPhoneNumber" nzErrorTip="The input is not valid workPhoneNumber!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.workPhoneNumber" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="workPhoneNumber" id="workPhoneNumber" />
name="workPhoneNumber"
id="workPhoneNumber"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workEmail">{{ 'mxk.users.workEmail' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.workEmail" [ngModelOptions]="{ standalone: true }" nz-input name="workEmail" id="workEmail" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workCountry">{{ 'mxk.users.workCountry' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workCountry">{{ 'mxk.users.workCountry' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid workCountry!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.workCountry" nzErrorTip="The input is not valid workCountry!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.workCountry" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="workCountry" id="workCountry" />
name="workCountry"
id="workCountry"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="region">{{ 'mxk.users.workRegion' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.workRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region" id="region" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="locality">{{ 'mxk.users.workLocality' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.workLocality" [ngModelOptions]="{ standalone: true }" nz-input name="locality" id="locality" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="street">{{ 'mxk.users.workStreetAddress' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="street">{{ 'mxk.users.workStreetAddress' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid street!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.workStreetAddress" nzErrorTip="The input is not valid street!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.workStreetAddress" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="street" id="street" />
name="street"
id="street"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="postalCode">{{ 'mxk.users.workPostalCode' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="postalCode">{{ 'mxk.users.workPostalCode' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid postalCode!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.workPostalCode" nzErrorTip="The input is not valid postalCode!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.workPostalCode" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="postalCode" id="postalCode" />
name="postalCode"
id="postalCode"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="workFax">{{ 'mxk.users.workFax' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.workFax" [ngModelOptions]="{ standalone: true }" nz-input name="workFax" id="workFax" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
@ -483,80 +478,76 @@
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeEmail">{{ 'mxk.users.homeEmail' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.homeEmail" [ngModelOptions]="{ standalone: true }" nz-input name="homeEmail" id="homeEmail" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePhoneNumber">{{ 'mxk.users.homePhoneNumber' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePhoneNumber">{{ 'mxk.users.homePhoneNumber' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homePhoneNumber!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.homePhoneNumber" nzErrorTip="The input is not valid homePhoneNumber!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.homePhoneNumber" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="homePhoneNumber" id="homePhoneNumber" />
name="homePhoneNumber"
id="homePhoneNumber"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeFax">{{ 'mxk.users.homeFax' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.homeFax" [ngModelOptions]="{ standalone: true }" nz-input name="homeFax" id="homeFax" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePostalCode">{{ 'mxk.users.homePostalCode' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homePostalCode">{{ 'mxk.users.homePostalCode' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid postalCode!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.homePostalCode" nzErrorTip="The input is not valid postalCode!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.homePostalCode" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="homePostalCode" id="homePostalCode" />
name="homePostalCode"
id="homePostalCode"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeCountry">{{ 'mxk.users.homeCountry' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeCountry">{{ 'mxk.users.homeCountry' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid homeCountry!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.homeCountry" nzErrorTip="The input is not valid homeCountry!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.homeCountry" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="homeCountry" id="homeCountry" />
name="homeCountry"
id="homeCountry"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="region">{{ 'mxk.users.homeRegion' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.homeRegion" [ngModelOptions]="{ standalone: true }" nz-input name="region" id="region" /> 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-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-row> <div nz-row>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="locality">{{ 'mxk.users.homeLocality' | i18n }}</nz-form-label> <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!"> <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
<input [(ngModel)]="form.model.homeLocality" [ngModelOptions]="{ standalone: true }" nz-input name="locality" id="locality" /> 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-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeStreetAddress">{{ 'mxk.users.homeStreetAddress' | i18n }}</nz-form-label> <nz-form-label [nzSm]="8" [nzXs]="24" nzFor="homeStreetAddress">{{ 'mxk.users.homeStreetAddress' | i18n }}
<nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48" nzErrorTip="The input is not valid street!"> </nz-form-label>
<input <nz-form-control [nzSm]="16" [nzMd]="16" [nzXs]="36" [nzXl]="48"
[(ngModel)]="form.model.homeStreetAddress" nzErrorTip="The input is not valid street!">
[ngModelOptions]="{ standalone: true }" <input [(ngModel)]="form.model.homeStreetAddress" [ngModelOptions]="{ standalone: true }" nz-input
nz-input name="street" id="street" />
name="street"
id="street"
/>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>

View File

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

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
@ -32,6 +31,7 @@ import { TreeNodes } from '../../entity/TreeNodes';
import { OrganizationsService } from '../../service/organizations.service'; import { OrganizationsService } from '../../service/organizations.service';
import { UsersService } from '../../service/users.service'; import { UsersService } from '../../service/users.service';
import { set2String } from '../../shared/index'; import { set2String } from '../../shared/index';
import { PasswordComponent } from './password/password.component';
import { UserEditerComponent } from './user-editer/user-editer.component'; import { UserEditerComponent } from './user-editer/user-editer.component';
@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 { onAdd(e: MouseEvent): void {
e.preventDefault(); e.preventDefault();
const modal = this.modal.create({ 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 { onDelete(e: MouseEvent, deleteId: String): void {
e.preventDefault(); e.preventDefault();
this.usersService.delete(deleteId).subscribe(res => { this.usersService.delete(deleteId).subscribe(res => {

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzSafeAny } from 'ng-zorro-antd/core/types';
@ -35,4 +34,10 @@ export class AccountsService extends BaseService<Accounts> {
generate(params: NzSafeAny): Observable<Message<Accounts>> { generate(params: NzSafeAny): Observable<Message<Accounts>> {
return this.getByParams(params, `${this.server.urls.base}/generate`); 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)
});
}
} }

View File

@ -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);
}
}

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzSafeAny } from 'ng-zorro-antd/core/types';
@ -37,4 +36,10 @@ export class UsersService extends BaseService<Users> {
params: this.parseParams(params) 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)
});
}
} }

View File

@ -14,7 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
export function set2String(set: Set<String>): string { export function set2String(set: Set<String>): string {
let setValues = ''; let setValues = '';
set.forEach(value => { set.forEach(value => {

View File

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

View File

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

View File

@ -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 @ResponseBody
@RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE}) @RequestMapping(value={"/delete"}, produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<?> delete(@RequestParam("ids") String ids,@CurrentUser UserInfo currentUser) { public ResponseEntity<?> delete(@RequestParam("ids") String ids,@CurrentUser UserInfo currentUser) {

View File

@ -185,7 +185,7 @@ public class UserInfoController {
@ResponseBody @ResponseBody
@RequestMapping(value="/changePassword", produces = {MediaType.APPLICATION_JSON_VALUE}) @RequestMapping(value="/changePassword", produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity<?> changePassword( public ResponseEntity<?> changePassword(
@ModelAttribute ChangePassword changePassword, @RequestBody ChangePassword changePassword,
@CurrentUser UserInfo currentUser) { @CurrentUser UserInfo currentUser) {
_logger.debug("UserId {}",changePassword.getUserId()); _logger.debug("UserId {}",changePassword.getUserId());
changePassword.setPasswordSetType(ConstsPasswordSetType.PASSWORD_NORMAL); 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") @RequestMapping(value = "/import")
public ResponseEntity<?> importingUsers( public ResponseEntity<?> importingUsers(
@ModelAttribute("excelImportFile")ExcelImport excelImportFile, @ModelAttribute("excelImportFile")ExcelImport excelImportFile,