Compare commits

..

3 Commits

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

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

@ -17,13 +17,16 @@ 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.getAllUsers()
this.getAllOrganization()
// this.getAllUsers()
this.getAllRoles()
this.getAllOrganization()
}
nzSelectedKeys: any[] = []
defaultExpandedKeys = [];
@ -42,6 +45,8 @@ export class UserComponent implements OnInit {
MaxResultCount: String(this.MaxResultCount),
OrganizaiotnId: this.OrganizaiotnId
}
this.http.get('/api/services/app/User/GetAll', {
params: params
}).subscribe((data: any) => {
@ -91,6 +96,11 @@ export class UserComponent implements OnInit {
});
this.nodes = [...this.toTree.toTree(data.result.items)]
resolve(data)
this.getAllUsers()
console.log(this.nodes);
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
})
}
@ -106,7 +116,8 @@ export class UserComponent implements OnInit {
}
nzClick(event: NzFormatEmitEvent) {
console.log(event);
this.OrganizaiotnId = event.node.origin.id
this.getAllUsers()
}
//新增用户
addUser(): void {

Loading…
Cancel
Save