提交开发分支未提交代码并修正配置

This commit is contained in:
2026-06-23 15:33:06 +08:00
parent a53b27ef20
commit 0fd96d150e
141 changed files with 3624 additions and 6048 deletions
+24 -35
View File
@@ -219,6 +219,7 @@ import {
UserOutlined
} from '@ant-design/icons-vue'
import { message, Modal } from 'ant-design-vue'
import type { Component } from 'vue'
/**
* Purpose: UserVO supports AdminLayout.vue by holding or executing the user vo page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
@@ -230,6 +231,7 @@ import { isAllowedForShoplessPlatformAdmin } from '@/utils/platform-admin-permis
import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme'
import { useAdminViewport } from '@/composables/useAdminViewport'
import { adminNavigationItems, findAdminNavigationItemByPath, type AdminNavIconKey } from '@/config/admin-navigation'
import {
getAdminCurrentShopName,
getAdminRoleLabel,
@@ -237,17 +239,6 @@ import {
isBootstrapAdminUser
} from './admin-helpers'
/**
* Purpose: AdminMenuItem supports AdminLayout.vue by holding or executing the admin menu item page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
type AdminMenuItem = {
key: string
icon: any
label: string
permissionCode: string
}
/**
* Purpose: router supports AdminLayout.vue by holding or executing the router page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
@@ -283,29 +274,27 @@ const selectedShopId = ref<string>()
const shopSwitchLoading = ref(false)
const { loadUserPermissions, hasPermission, clearPermissions, userPermissions } = usePermission()
const menuItems: AdminMenuItem[] = [
{ key: '/admin', icon: HomeOutlined, label: '首页', permissionCode: '' },
{ key: '/admin/dashboard', icon: DashboardOutlined, label: '仪表盘', permissionCode: 'dashboard:view' },
{ key: '/admin/users', icon: UserOutlined, label: '用户管理', permissionCode: 'user:view' },
{ key: '/admin/products', icon: ShopOutlined, label: '作品管理', permissionCode: 'product:view' },
{ key: '/admin/coupons', icon: GiftOutlined, label: '优惠券管理', permissionCode: 'coupon:view' },
{ key: '/admin/comments', icon: MessageOutlined, label: '评论管理', permissionCode: 'comment:view' },
{ key: '/admin/shops', icon: HomeOutlined, label: '店铺管理', permissionCode: 'shop:view' },
{ key: '/admin/permissions', icon: SafetyCertificateOutlined, label: '权限管理', permissionCode: 'permission:view' },
{ key: '/admin/tags', icon: TagOutlined, label: '标签管理', permissionCode: 'tag:view' },
{ key: '/admin/orders', icon: ShoppingOutlined, label: '订单管理', permissionCode: 'order:view' },
{ key: '/admin/schedules', icon: CalendarOutlined, label: '排班管理', permissionCode: 'schedule:view' },
{ key: '/admin/after-sales', icon: MessageOutlined, label: '售后处理', permissionCode: 'after_sale:view' },
{ key: '/admin/inventory', icon: ToolOutlined, label: '库存管理', permissionCode: 'inventory:view' },
{ key: '/admin/campaigns', icon: GiftOutlined, label: '活动管理', permissionCode: 'campaign:view' },
{ key: '/admin/nail-artists', icon: TeamOutlined, label: '美甲师管理', permissionCode: 'nail_artist:view' }
,
{ key: '/admin/messages', icon: MessageOutlined, label: '消息发布', permissionCode: 'message:view' },
{ key: '/admin/announcements', icon: MessageOutlined, label: '公告管理', permissionCode: 'announcement:view' },
{ key: '/admin/vip-recharge-plans', icon: GiftOutlined, label: 'VIP充值配置', permissionCode: 'user:vip:manage' },
{ key: '/admin/messagehub-push-configs', icon: MessageOutlined, label: '参数管理', permissionCode: 'messagehub:config:manage' },
{ key: '/admin/legal-agreements', icon: SafetyCertificateOutlined, label: '协议管理', permissionCode: 'legal_agreement:manage' }
]
const adminMenuIconMap: Record<AdminNavIconKey, Component> = {
home: HomeOutlined,
dashboard: DashboardOutlined,
user: UserOutlined,
shop: ShopOutlined,
gift: GiftOutlined,
message: MessageOutlined,
security: SafetyCertificateOutlined,
tag: TagOutlined,
shopping: ShoppingOutlined,
calendar: CalendarOutlined,
tool: ToolOutlined,
team: TeamOutlined
}
const menuItems = adminNavigationItems.map(item => ({
key: item.path,
icon: adminMenuIconMap[item.iconKey],
label: item.label,
permissionCode: item.permissionCode
}))
/** isBootstrapAdmin is a reactive state variable used by the template and event handlers. */
const isBootstrapAdmin = computed(() => isBootstrapAdminUser(userInfo.value))
@@ -364,7 +353,7 @@ const currentMobileSectionLabel = computed(() => {
/** currentMobileTitle is a reactive state variable used by the template and event handlers. */
const currentMobileTitle = computed(() => {
const currentMenu = menuItems.find(item => item.key === route.path)
const currentMenu = findAdminNavigationItemByPath(route.path)
if (currentMenu) {
return currentMenu.label
}