This commit is contained in:
Taric Xin
2022-04-13 14:16:49 +08:00
parent e8172b12b1
commit 29b289b07c
3 changed files with 19 additions and 8 deletions

View File

@ -32,7 +32,7 @@ export class StaffManagementComponent implements OnInit {
{ title: '', index: 'key', className: 'text-center', type: 'checkbox' },
{ title: '员工姓名', className: 'text-center', index: 'name' },
{ title: '手机号码', className: 'text-center', index: 'telephone' },
{ title: '角色',className: 'text-center', index: 'roleName' },
{ title: '角色', className: 'text-center', index: 'roleName' },
{
title: '最后登录时间',
index: 'lastLoginDate',
@ -67,7 +67,8 @@ export class StaffManagementComponent implements OnInit {
},
{
text: '冻结',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
iif: item =>
item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 1),
acl: { ability: ['SYSTEM-STAFF-lock'] }
},
@ -79,7 +80,8 @@ export class StaffManagementComponent implements OnInit {
},
{
text: '删除',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
iif: item =>
item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 3),
acl: { ability: ['SYSTEM-STAFF-delete'] }
}
@ -167,6 +169,11 @@ export class StaffManagementComponent implements OnInit {
this.sf.reset();
}
exportList() {
const params = { nameOrPhone: this.sf.value?.nameOrPhone };
this.service.downloadFile(this.service.$api_export_staff, { ...params, pageSize: -1 });
}
private deleteStaff(params: any) {
this.service.request(this.service.$api_delete_staff, params).subscribe(res => {
if (res) {