Compare commits

..

No commits in common. 'b487561759beb04244e25a27d74636f659cd54cb' and '17d89011873a567bb709441044d1f0225cebffcf' have entirely different histories.

  1. 21
      src/app/system-management/user/user.component.ts

21
src/app/system-management/user/user.component.ts

@ -17,16 +17,13 @@ export class UserComponent implements OnInit {
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { } constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
ngOnInit(): void { ngOnInit(): void {
console.log(JSON.parse(sessionStorage.getItem('userdata')).organization.id);
this.validateForm = this.fb.group({ this.validateForm = this.fb.group({
search: [null] search: [null]
}); });
this.getAllOrganization() this.getAllUsers()
// this.getAllUsers()
this.getAllRoles() this.getAllRoles()
this.getAllOrganization()
} }
nzSelectedKeys: any[] = [] nzSelectedKeys: any[] = []
defaultExpandedKeys = []; defaultExpandedKeys = [];
@ -43,10 +40,8 @@ export class UserComponent implements OnInit {
Keyword: this.validateForm.value.search ? this.validateForm.value.search : '', Keyword: this.validateForm.value.search ? this.validateForm.value.search : '',
SkipCount: String(this.SkipCount), SkipCount: String(this.SkipCount),
MaxResultCount: String(this.MaxResultCount), MaxResultCount: String(this.MaxResultCount),
OrganizaiotnId: this.OrganizaiotnId OrganizaiotnId:this.OrganizaiotnId
} }
this.http.get('/api/services/app/User/GetAll', { this.http.get('/api/services/app/User/GetAll', {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
@ -96,11 +91,6 @@ export class UserComponent implements OnInit {
}); });
this.nodes = [...this.toTree.toTree(data.result.items)] this.nodes = [...this.toTree.toTree(data.result.items)]
resolve(data) resolve(data)
this.getAllUsers()
console.log(this.nodes);
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
}) })
}) })
} }
@ -114,10 +104,9 @@ export class UserComponent implements OnInit {
} }
this.getAllUsers() this.getAllUsers()
} }
nzClick(event: NzFormatEmitEvent) { nzClick(event: NzFormatEmitEvent){
console.log(event); console.log(event);
this.OrganizaiotnId = event.node.origin.id
this.getAllUsers()
} }
//新增用户 //新增用户
addUser(): void { addUser(): void {

Loading…
Cancel
Save