diff --git a/src/app/routes/sys-setting/components/cart-config/cart-config.component.html b/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
index c5cfa144..00d6b58b 100644
--- a/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
+++ b/src/app/routes/sys-setting/components/cart-config/cart-config.component.html
@@ -1,7 +1,11 @@
-
+
+
+
+
+
@@ -22,10 +26,10 @@
+ [req]="{process: beforeReq }" [res]="{ process: afterRes }" [loading]="loading" [scroll]="{ y: '370px' }">
\ No newline at end of file
diff --git a/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts b/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
index b7039fb0..0682a22e 100644
--- a/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
+++ b/src/app/routes/sys-setting/components/cart-config/cart-config.component.ts
@@ -1,5 +1,6 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
+import { ACLService } from '@delon/acl';
import { SFComponent, SFSchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { SystemService } from '../../services/system.service';
@@ -20,17 +21,20 @@ export class CartConfigComponent implements OnInit {
{
name: '车型配置',
type: 1,
- isActived: false
+ isActived: false,
+ isShow: true
},
{
name: '车长配置',
type: 2,
- isActived: false
+ isActived: false,
+ isShow: true
},
{
name: '禁限物品名单',
type: 3,
- isActived: false
+ isActived: false,
+ isShow: true
}
];
tabType = 1;
@@ -102,10 +106,12 @@ export class CartConfigComponent implements OnInit {
buttons: [
{
text: '编辑',
+ acl: { ability: ['SYSTEM-CART-CONFIG-edit'] },
click: item => this.configAction(item)
},
{
text: '删除',
+ acl: { ability: ['SYSTEM-CART-CONFIG-delete'] },
click: item => this.deleteAction(item)
}
]
@@ -113,7 +119,35 @@ export class CartConfigComponent implements OnInit {
];
loading = true;
- constructor(public service: SystemService, private nzModalService: NzModalService, private cdr: ChangeDetectorRef) {}
+ constructor(
+ public service: SystemService,
+ private nzModalService: NzModalService,
+ private cdr: ChangeDetectorRef,
+ private acl: ACLService
+ ) {
+ const acls = acl.data.abilities || [];
+ this.tabs = [
+ {
+ name: '车型配置',
+ type: 1,
+ isActived: false,
+ isShow: acl.data.full || !!acls.find(acl => acl === 'SYSTEM-CART-CONFIG-modeList')
+ },
+ {
+ name: '车长配置',
+ type: 2,
+ isActived: false,
+ isShow: acl.data.full || !!acls.find(acl => acl === 'SYSTEM-CART-CONFIG-cartLength')
+ },
+ {
+ name: '禁限物品名单',
+ type: 3,
+ isActived: false,
+ isShow: acl.data.full || !!acls.find(acl => acl === 'SYSTEM-CART-CONFIG-goodsList')
+ }
+ ];
+ this.tabType = this.tabs.find(tab => tab.isShow)?.type || 1;
+ }
ngOnInit(): void {}