/** * Admin 页面组件映射表 * * 用于内部路由系统的组件解析 * key: componentKey (来自 adminRoutes.uts) * value: 组件引用 * * 注意: * 1. 所有组件必须静态导入,确保打包可分析 * 2. 组件路径使用 @ 别名 * 3. 占位组件统一使用 PlaceholderPage */ // 导入占位组件 import PlaceholderPage from '@/layouts/admin/components/PlaceholderPage.uvue' // 导入首页(内部组件,不包含 AdminLayout) import HomeIndex from '@/layouts/admin/pages/HomeIndex.uvue' // 导入用户模块(纯组件,不包含 AdminLayout) import UserStatistic from '@/pages/mall/admin/user/Statistic.uvue' import UserList from '@/pages/mall/admin/user/list.uvue' import UserLevel from '@/pages/mall/admin/user/level.uvue' import UserGroup from '@/pages/mall/admin/user/group.uvue' import UserLabel from '@/pages/mall/admin/user/label.uvue' import MemberConfig from '@/pages/mall/admin/user/MemberConfig.uvue' // 导入商品模块(纯组件,不包含 AdminLayout) import ProductStatistic from '@/pages/mall/admin/product/product-statistics/index.uvue' import ProductList from '@/pages/mall/admin/product/product-management/index.uvue' import ProductEdit from '@/pages/mall/admin/product/product-management/edit.uvue' import ProductMemberPrice from '@/pages/mall/admin/product/product-management/member-price.uvue' import ProductClassify from '@/pages/mall/admin/product/classify.uvue' import ProductReply from '@/pages/mall/admin/product/reply.uvue' import ProductAttr from '@/pages/mall/admin/product/attr.uvue' import ProductParam from '@/pages/mall/admin/product/param.uvue' import ProductLabel from '@/pages/mall/admin/product/label.uvue' import ProductProtection from '@/pages/mall/admin/product/protection.uvue' // 导入订单模块(纯组件,不包含 AdminLayout) import OrderList from '@/pages/mall/admin/order/list.uvue' import OrderStatistic from '@/pages/mall/admin/order/order-statistics/index.uvue' import OrderRefund from '@/pages/mall/admin/order/aftersales-order/index.uvue' import OrderCashier from '@/pages/mall/admin/order/cashier-order/index.uvue' import OrderVerify from '@/pages/mall/admin/order/write-off-records/index.uvue' import OrderConfig from '@/pages/mall/admin/order/order-configuration/index.uvue' // 营销设置模块暂时使用 PlaceholderPage // 避免循环依赖问题 import CmsArticle from '@/pages/mall/admin/cms/article/list.uvue' import CmsCategory from '@/pages/mall/admin/cms/category/list.uvue' import MarketingCouponList from '@/pages/mall/admin/marketing/coupon/list.uvue' import MarketingCouponUser from '@/pages/mall/admin/marketing/coupon/user.uvue' import MarketingIntegralStatistic from '@/pages/mall/admin/marketing/integral/statistic.uvue' // 导入财务模块(纯组件) import FinanceTransactionStats from '@/pages/mall/admin/finance/transaction_stats.uvue' import FinanceWithdrawal from '@/pages/mall/admin/finance/withdrawal.uvue' import FinanceInvoice from '@/pages/mall/admin/finance/invoice.uvue' import FinanceRecharge from '@/pages/mall/admin/finance/recharge.uvue' import FinanceCapitalFlow from '@/pages/mall/admin/finance/capital_flow.uvue' import FinanceBill from '@/pages/mall/admin/finance/bill.uvue' import FinanceCommission from '@/pages/mall/admin/finance/commission.uvue' import FinanceBalanceStats from '@/pages/mall/admin/finance/balance_stats.uvue' import FinanceBalanceRecord from '@/pages/mall/admin/finance/balance_record.uvue' // 导入客服模块 import KefuList from '@/pages/mall/admin/kefu/list.uvue' import KefuWords from '@/pages/mall/admin/kefu/words.uvue' import KefuFeedback from '@/pages/mall/admin/kefu/feedback.uvue' import KefuConfig from '@/pages/mall/admin/kefu/config.uvue' // 导入装修模块 import DecorationHome from '@/pages/mall/admin/decoration/home.uvue' import DecorationCategory from '@/pages/mall/admin/decoration/category.uvue' import DecorationUser from '@/pages/mall/admin/decoration/user.uvue' // 导入维护模块 import MaintainDevConfig from '@/pages/mall/admin/maintain/dev/config.uvue' // import StatisticIndex from '@/pages/mall/admin/statistic/index.uvue' // import SettingSystemConfig from '@/pages/mall/admin/setting/system/config.uvue' // import SettingSystemAdmin from '@/pages/mall/admin/setting/system/admin.uvue' // import SettingSystemRole from '@/pages/mall/admin/setting/system/role.uvue' /** * 组件映射表 */ export const componentMap: Map = new Map([ // 首页 ['HomeIndex', HomeIndex], // 用户模块 ['UserStatistic', UserStatistic], ['UserList', UserList], ['UserLevel', UserLevel], ['UserGroup', UserGroup], ['UserLabel', UserLabel], ['UserMemberConfig', MemberConfig], // 商品模块 ['ProductStatistic', ProductStatistic], ['ProductList', ProductList], ['ProductEdit', ProductEdit], ['ProductMemberPrice', ProductMemberPrice], ['ProductClassify', ProductClassify], ['ProductReply', ProductReply], ['ProductAttr', ProductAttr], ['ProductParam', ProductParam], ['ProductLabel', ProductLabel], ['ProductProtection', ProductProtection], // 订单模块 ['OrderList', OrderList], ['OrderStatistic', OrderStatistic], ['OrderRefund', OrderRefund], ['OrderCashier', OrderCashier], ['OrderVerify', OrderVerify], ['OrderConfig', OrderConfig], // 营销模块 // 1. 优惠券 ['MarketingCouponList', MarketingCouponList], ['MarketingCouponUser', MarketingCouponUser], // 2. 积分管理 ['MarketingIntegralStatistic', MarketingIntegralStatistic], ['MarketingIntegralProduct', PlaceholderPage], ['MarketingIntegralOrder', PlaceholderPage], ['MarketingIntegralRecord', PlaceholderPage], // 3. 抽奖管理 ['MarketingLotteryList', PlaceholderPage], ['MarketingLotteryConfig', PlaceholderPage], // 4. 砍价管理 ['MarketingBargainProduct', PlaceholderPage], ['MarketingBargainList', PlaceholderPage], // 5. 拼团管理 ['MarketingCombinationProduct', PlaceholderPage], ['MarketingCombinationList', PlaceholderPage], // 6. 秒杀管理 ['MarketingSeckillList', PlaceholderPage], ['MarketingSeckillProduct', PlaceholderPage], ['MarketingSeckillConfig', PlaceholderPage], // 7. 付费会员 ['MarketingMemberType', PlaceholderPage], ['MarketingMemberRight', PlaceholderPage], ['MarketingMemberCard', PlaceholderPage], ['MarketingMemberRecord', PlaceholderPage], ['MarketingMemberConfig', PlaceholderPage], // 8. 直播管理 ['MarketingLiveRoom', PlaceholderPage], ['MarketingLiveProduct', PlaceholderPage], ['MarketingLiveAnchor', PlaceholderPage], // 9. 用户充值 ['MarketingRechargeQuota', PlaceholderPage], ['MarketingRechargeConfig', PlaceholderPage], // 10. 每日签到 ['MarketingCheckinConfig', PlaceholderPage], ['MarketingCheckinReward', PlaceholderPage], // 11. 渠道码 & 新人礼 ['MarketingChannelList', PlaceholderPage], ['MarketingNewcomerGift', PlaceholderPage], // 内容模块 ['CmsArticle', CmsArticle], ['CmsCategory', CmsCategory], // 财务模块 ['FinanceTransactionStats', FinanceTransactionStats], ['FinanceWithdrawal', FinanceWithdrawal], ['FinanceInvoice', FinanceInvoice], ['FinanceRecharge', FinanceRecharge], ['FinanceCapitalFlow', FinanceCapitalFlow], ['FinanceBill', FinanceBill], ['FinanceCommission', FinanceCommission], ['FinanceBalanceStats', FinanceBalanceStats], ['FinanceBalanceRecord', FinanceBalanceRecord], // 数据模块 - 暂时使用占位组件 ['StatisticIndex', PlaceholderPage], // 设置模块 - 暂时使用占位组件 ['SettingSystemConfig', PlaceholderPage], ['SettingSystemAdmin', PlaceholderPage], ['SettingSystemRole', PlaceholderPage], // 分销模块 ['DistributionStatistic', PlaceholderPage], ['DistributionList', PlaceholderPage], ['DistributionConfig', PlaceholderPage], // 客服模块 ['KefuList', KefuList], ['KefuWords', KefuWords], ['KefuFeedback', KefuFeedback], ['KefuAutoReply', PlaceholderPage], ['KefuConfig', KefuConfig], // 装修模块 ['DecorationHome', DecorationHome], ['DecorationCategory', DecorationCategory], ['DecorationUser', DecorationUser], ['DecorationData', PlaceholderPage], ['DecorationStyle', PlaceholderPage], ['DecorationMaterial', PlaceholderPage], ['DecorationLink', PlaceholderPage], // 应用模块 ['AppStatistic', PlaceholderPage], ['AppList', PlaceholderPage], // 维护模块 ['MaintainDevConfig', MaintainDevConfig], ['MaintainDevData', PlaceholderPage], ['MaintainDevTask', PlaceholderPage], ['MaintainDevAuth', PlaceholderPage], ['MaintainDevModule', PlaceholderPage], ['MaintainDevEvent', PlaceholderPage], ['MaintainSecurityCache', PlaceholderPage], ['MaintainSecurityLog', PlaceholderPage], ['MaintainSecurityUpgrade', PlaceholderPage], ['MaintainDataLogistics', PlaceholderPage], ['MaintainDataCity', PlaceholderPage], ['MaintainDataClear', PlaceholderPage], ['MaintainApiAccount', PlaceholderPage], ['MaintainLangList', PlaceholderPage], ['MaintainLangDetail', PlaceholderPage], ['MaintainLangRegion', PlaceholderPage], ['MaintainLangConfig', PlaceholderPage], ['MaintainToolDb', PlaceholderPage], ['MaintainToolFile', PlaceholderPage], ['MaintainToolApi', PlaceholderPage], ['MaintainToolDic', PlaceholderPage], ['MaintainSysInfo', PlaceholderPage] ]) /** * 获取组件 * @param componentKey 组件Key * @returns 组件引用,不存在时返回占位组件 */ export function getComponent(componentKey: string): any { return componentMap.get(componentKey) || PlaceholderPage }