Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
<se label="权限编码" required>
|
||||
{{functionInfo.permissionsCode || '-'}}
|
||||
</se>
|
||||
<se label="权限路径" required>
|
||||
<se label="api地址" required>
|
||||
<input nz-input [(ngModel)]="functionInfo.permissionsUrl" placeholder="请输入权限路径" [disabled]="isDisabled" />
|
||||
</se>
|
||||
</div>
|
||||
|
||||
@ -52,7 +52,7 @@ export class AuthDrawerComponent implements OnInit {
|
||||
|
||||
functionAction(item?: any, isDisabled = false) {
|
||||
if (item) {
|
||||
this.functionInfo = { ...item, buttonId: item.id };
|
||||
this.functionInfo = { ...item, buttonId: item.id, id: item.functionButtonId };
|
||||
} else {
|
||||
this.functionInfo = {};
|
||||
}
|
||||
@ -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.functionButtonId]).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)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -10,10 +10,10 @@
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading"
|
||||
(click)="loadMemu(selectedPlatform.appId)">查询</button>
|
||||
<button nz-button (click)="resetSF()">重置</button>
|
||||
<!-- <button nz-button (click)="delMenu(0)" [nzLoading]="service.http.loading">
|
||||
<button nz-button (click)="delMenu(0)" [nzLoading]="service.http.loading">
|
||||
清空货主菜单
|
||||
</button>
|
||||
<button nz-button (click)="delMenu(1)" [nzLoading]="service.http.loading">
|
||||
<!-- <button nz-button (click)="delMenu(1)" [nzLoading]="service.http.loading">
|
||||
清空运营后台菜单
|
||||
</button> -->
|
||||
</div>
|
||||
|
||||
@ -23,6 +23,8 @@ export class MenuManagerService extends BaseService {
|
||||
$api_get_functions= `/api/mdc/cuc/buttonInfo/getButtonInfoList`;
|
||||
// 保存菜单按钮关联
|
||||
$api_save_menu_function= `/api/mdc/cuc/functionButton/saveFunctionButton`;
|
||||
// 删除菜单按钮关联表
|
||||
$api_delete_menu_function= `/api/mdc/cuc/functionButton/deletebatch`;
|
||||
|
||||
constructor(public injector: Injector) {
|
||||
super(injector);
|
||||
|
||||
Reference in New Issue
Block a user