Browse Source

[完善]完善bug

beijing
邵佳豪 2 years ago
parent
commit
5372d4d754
  1. 3
      src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts
  2. 12
      src/app/system-management/user/user.component.ts

3
src/app/system-management/analysis-of-the-host/analysis-of-the-host.component.ts

@ -37,6 +37,9 @@ export class AnalysisOfTheHostComponent implements OnInit {
}).subscribe((data: any) => { }).subscribe((data: any) => {
this.totalCount = data.result.totalCount this.totalCount = data.result.totalCount
data.result.items.forEach(element => { data.result.items.forEach(element => {
if (element.id == OrganizationUnitId) {
element.parentId = null
}
element.key = element.id element.key = element.id
element.title = element.displayName element.title = element.displayName
element.selectable = false element.selectable = false

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

@ -45,8 +45,6 @@ export class UserComponent implements OnInit {
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) => {
@ -91,16 +89,17 @@ export class UserComponent implements OnInit {
params: params params: params
}).subscribe((data: any) => { }).subscribe((data: any) => {
data.result.items.forEach(element => { data.result.items.forEach(element => {
if (element.id == OrganizationUnitId) {
element.parentId = null
}
element.key = element.id element.key = element.id
element.title = element.displayName element.title = element.displayName
}); });
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.nodes[0].id]
this.defaultExpandedKeys = [...this.defaultExpandedKeys] this.nzSelectedKeys = [this.nodes[0].id]
this.getAllUsers()
}) })
}) })
} }
@ -115,7 +114,6 @@ export class UserComponent implements OnInit {
this.getAllUsers() 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() this.getAllUsers()
} }

Loading…
Cancel
Save