Browse Source

菜单管理

beijing
陈鹏飞 2 years ago
parent
commit
162a90d61d
  1. 2
      src/app/system-management/user/user.component.html
  2. 11
      src/app/system-management/user/user.component.ts

2
src/app/system-management/user/user.component.html

@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div class="tablebox"> <div class="tablebox">
<nz-table #basicTable [nzData]="usersLIst" [nzShowPagination]='false' [nzPageSize]='16'> <nz-table #basicTable [nzLoading]="loading" [nzData]="usersLIst" [nzShowPagination]='false' [nzPageSize]='16'>
<thead> <thead>
<tr> <tr>
<th></th> <th></th>

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

@ -36,14 +36,15 @@ export class UserComponent implements OnInit {
//获取所有用户 //获取所有用户
usersLIst: any = [] usersLIst: any = []
usersNum: string usersNum: string
OrganizaiotnId OrganizationUnitId
loading: boolean;
getAllUsers() { getAllUsers() {
this.loading=true
let params = { let params = {
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 OrganizationUnitId: this.OrganizationUnitId
} }
this.http.get('/api/services/app/User/GetAll', { this.http.get('/api/services/app/User/GetAll', {
params: params params: params
@ -51,6 +52,7 @@ export class UserComponent implements OnInit {
this.usersLIst = data.result.items this.usersLIst = data.result.items
this.usersNum = data.result.totalCount this.usersNum = data.result.totalCount
console.log('所有用户', this.usersLIst) console.log('所有用户', this.usersLIst)
this.loading=false
}) })
} }
SkipCount: number = 0 //0 16 32 48 SkipCount: number = 0 //0 16 32 48
@ -99,6 +101,7 @@ export class UserComponent implements OnInit {
resolve(data) resolve(data)
this.defaultExpandedKeys = [this.nodes[0].id] this.defaultExpandedKeys = [this.nodes[0].id]
this.nzSelectedKeys = [this.nodes[0].id] this.nzSelectedKeys = [this.nodes[0].id]
this.OrganizationUnitId=[this.nodes[0].id]
this.getAllUsers() this.getAllUsers()
}) })
}) })
@ -114,7 +117,7 @@ export class UserComponent implements OnInit {
this.getAllUsers() this.getAllUsers()
} }
nzClick(event: NzFormatEmitEvent) { nzClick(event: NzFormatEmitEvent) {
this.OrganizaiotnId = event.node.origin.id this.OrganizationUnitId = event.node.origin.id
this.getAllUsers() this.getAllUsers()
} }
//新增用户 //新增用户

Loading…
Cancel
Save