This commit is contained in:
Taric Xin
2022-01-21 10:31:03 +08:00
parent 369d591b63
commit 96e2e5297b
3 changed files with 23 additions and 2 deletions

View File

@ -76,6 +76,24 @@ export class AuthDrawerComponent implements OnInit {
});
}
deleteAuth(item: any) {
const modal = this.modal.warning({
nzTitle: '是否确定删除该权限',
nzOnOk: () => {
this.service.request(this.service.$api_delete_menu_function, [item.id]).subscribe(res => {
if (res) {
this.service.msgSrv.success('删除成功');
this.st.load(1);
modal.destroy();
} else {
this.service.msgSrv.error('删除失败');
}
});
return false;
}
});
}
/**
* 重置表单
*/
@ -125,7 +143,8 @@ export class AuthDrawerComponent implements OnInit {
click: item => this.functionAction(item)
},
{
text: '删除'
text: '删除',
click: item => this.deleteAuth(item)
}
]
}