edit
This commit is contained in:
@ -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)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user