From d24cc0090f9c242a2c6e21aedbc3d9fec1f5d369 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 1 Jul 2022 17:31:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/edituser/edituser.component.ts | 8 +++----- src/app/system-management/user/user.component.ts | 9 --------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/system-management/user/edituser/edituser.component.ts b/src/app/system-management/user/edituser/edituser.component.ts index ae54578..80fe234 100644 --- a/src/app/system-management/user/edituser/edituser.component.ts +++ b/src/app/system-management/user/edituser/edituser.component.ts @@ -25,9 +25,6 @@ export class EdituserComponent implements OnInit { role: [null, [Validators.required]], phonenum: [null, [Validators.required]] }); - // Promise.all([this.getAllRoles(), this.getAllOrganization()]).then(()=>{ - // this.modal.containerInstance.config.nzOkLoading = false - // }) if (this.listOfData.length == 0) { this.getAllRoles() } @@ -35,11 +32,11 @@ export class EdituserComponent implements OnInit { this.getAllOrganization() } } + destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } - //获取角色列表 async getAllRoles() { let params = { @@ -56,8 +53,8 @@ export class EdituserComponent implements OnInit { }) }) } - //获取所有组织机构 + //获取所有组织机构 async getAllOrganization() { let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id let params = { @@ -77,4 +74,5 @@ export class EdituserComponent implements OnInit { }) }) } + } diff --git a/src/app/system-management/user/user.component.ts b/src/app/system-management/user/user.component.ts index e333b6f..7af5398 100644 --- a/src/app/system-management/user/user.component.ts +++ b/src/app/system-management/user/user.component.ts @@ -17,16 +17,11 @@ export class UserComponent implements OnInit { constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { } ngOnInit(): void { - console.log(JSON.parse(sessionStorage.getItem('userdata')).organization.id); - this.validateForm = this.fb.group({ search: [null] }); this.getAllOrganization() - // this.getAllUsers() - this.getAllRoles() - } nzSelectedKeys: any[] = [] defaultExpandedKeys = []; @@ -134,7 +129,6 @@ export class UserComponent implements OnInit { subtitle: '' }, nzOnOk: async () => { - // console.log(instance.validateForm.value) if (instance.validateForm.valid) { await new Promise(resolve => { let body = { @@ -153,7 +147,6 @@ export class UserComponent implements OnInit { return true }, err => { resolve(err) - console.log(4444, err) this.message.create('warning', err.error.error.message); return false }) @@ -166,7 +159,6 @@ export class UserComponent implements OnInit { }); const instance = modal.getContentComponent(); modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!')); - // Return a result when closed modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result)); } @@ -179,7 +171,6 @@ export class UserComponent implements OnInit { nzViewContainerRef: this.viewContainerRef, nzWidth: 450, nzMaskClosable: false, - // nzOkLoading: true, nzComponentParams: { data: data, listOfData: this.listOfData,