edit
This commit is contained in:
@ -3,6 +3,7 @@ import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
import { SettingRoleEditComponent } from './edit/edit.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-role-management',
|
||||
@ -40,12 +41,12 @@ export class RoleManagementComponent implements OnInit {
|
||||
title: '操作',
|
||||
buttons: [
|
||||
{
|
||||
text: '编辑'
|
||||
// click: item => this.staffAction(item)
|
||||
text: '编辑',
|
||||
click: item => this.roleAction(item)
|
||||
},
|
||||
{
|
||||
text: '删除'
|
||||
// click: item => this.action(3)
|
||||
text: '删除',
|
||||
click: item => this.deleteAction(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -70,7 +71,26 @@ export class RoleManagementComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
roleAction(item?: any) {}
|
||||
roleAction(item?: any) {
|
||||
const modal = this.nzModalService.create({
|
||||
nzContent: SettingRoleEditComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } },
|
||||
nzFooter: null
|
||||
});
|
||||
modal.afterClose.subscribe(res => {
|
||||
this.st.load();
|
||||
});
|
||||
}
|
||||
|
||||
deleteAction(item?: any) {
|
||||
this.nzModalService.error({
|
||||
nzTitle: '确认删除?',
|
||||
nzClosable: false,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
Reference in New Issue
Block a user