This commit is contained in:
Taric Xin
2021-12-02 17:35:43 +08:00
parent d1467d4f45
commit 436dd750d3
18 changed files with 2900 additions and 10 deletions

View File

@ -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: () => {}
});
}
/**
* 重置表单