feat(admin): 拆分经营站点与历史分销后台
This commit is contained in:
@@ -74,6 +74,8 @@ interface NavGroup {
|
||||
index: string
|
||||
icon: Component
|
||||
children: NavItem[]
|
||||
tenantOnly?: boolean
|
||||
legacyOnly?: boolean
|
||||
}
|
||||
|
||||
const allNavGroups: NavGroup[] = [
|
||||
@@ -147,6 +149,7 @@ const allNavGroups: NavGroup[] = [
|
||||
label: '分销管理',
|
||||
index: 'distribution',
|
||||
icon: Share,
|
||||
legacyOnly: true,
|
||||
children: [
|
||||
{
|
||||
label: '分销站点管理',
|
||||
@@ -178,6 +181,14 @@ const allNavGroups: NavGroup[] = [
|
||||
icon: Coin,
|
||||
permission: 'distribution:settlement_view',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '邀请与返利',
|
||||
index: 'tenant-invitation',
|
||||
icon: Present,
|
||||
tenantOnly: true,
|
||||
children: [
|
||||
{
|
||||
label: '邀请返利管理',
|
||||
to: adminPath('invitations'),
|
||||
@@ -340,6 +351,7 @@ function canAccessNavItem(item: NavItem) {
|
||||
|
||||
const navGroups = computed(() => {
|
||||
return allNavGroups
|
||||
.filter(group => (siteStore.isTenant ? !group.legacyOnly : !group.tenantOnly))
|
||||
.map(group => ({
|
||||
...group,
|
||||
children: group.children.filter(item => canAccessNavItem(item)),
|
||||
|
||||
Reference in New Issue
Block a user