Browse Source

菜单管理

beijing
陈鹏飞 2 years ago
parent
commit
9b2e7af098
  1. 20
      src/app/system-management/user/user.component.ts

20
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 = [];
@ -40,10 +43,10 @@ export class UserComponent implements OnInit {
Keyword: this.validateForm.value.search ? this.validateForm.value.search : '',
SkipCount: String(this.SkipCount),
MaxResultCount: String(this.MaxResultCount),
OrganizaiotnId:this.OrganizaiotnId
OrganizaiotnId: this.OrganizaiotnId
}
console.log(this.OrganizaiotnId);
this.http.get('/api/services/app/User/GetAll', {
params: params
}).subscribe((data: any) => {
@ -93,6 +96,9 @@ export class UserComponent implements OnInit {
});
this.nodes = [...this.toTree.toTree(data.result.items)]
resolve(data)
this.getAllUsers()
this.defaultExpandedKeys = [this.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys]
})
})
}
@ -106,9 +112,9 @@ export class UserComponent implements OnInit {
}
this.getAllUsers()
}
nzClick(event: NzFormatEmitEvent){
nzClick(event: NzFormatEmitEvent) {
console.log(event);
this.OrganizaiotnId=event.node.origin.id
this.OrganizaiotnId = event.node.origin.id
this.getAllUsers()
}
//新增用户

Loading…
Cancel
Save