Files
medical-mall/layouts/admin/router/adminComponentMap.uts
2026-02-05 17:59:45 +08:00

286 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 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/statistics/index.uvue'
import UserList from '@/pages/mall/admin/user/management/index.uvue'
import UserLevel from '@/pages/mall/admin/user/level/index.uvue'
import UserGroup from '@/pages/mall/admin/user/grouping/index.uvue'
import UserLabel from '@/pages/mall/admin/user/label/index.uvue'
import MemberConfig from '@/pages/mall/admin/user/configuration/index.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 MarketingIntegralProduct from '@/pages/mall/admin/marketing/integral/list.uvue'
import MarketingIntegralOrder from '@/pages/mall/admin/marketing/integral/order.uvue'
import MarketingIntegralRecord from '@/pages/mall/admin/marketing/integral/record.uvue'
import MarketingIntegralConfig from '@/pages/mall/admin/marketing/integral/config.uvue'
import MarketingLotteryList from '@/pages/mall/admin/marketing/lottery/list.uvue'
import MarketingLotteryConfig from '@/pages/mall/admin/marketing/lottery/config.uvue'
import MarketingCombinationProduct from '@/pages/mall/admin/marketing/combination/product.uvue'
import MarketingCombinationList from '@/pages/mall/admin/marketing/combination/list.uvue'
import MarketingCombinationCreate from '@/pages/mall/admin/marketing/combination/create.uvue'
import MarketingSeckillList from '@/pages/mall/admin/marketing/seckill/list.uvue'
import MarketingSeckillProduct from '@/pages/mall/admin/marketing/seckill/product.uvue'
import MarketingSeckillConfig from '@/pages/mall/admin/marketing/seckill/config.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 KefuAutoReply from '@/pages/mall/admin/kefu/auto_reply.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 DecorationData from '@/pages/mall/admin/decoration/data-config.uvue'
import DecorationStyle from '@/pages/mall/admin/design/theme-style.uvue'
import DecorationMaterial from '@/pages/mall/admin/design/material.uvue'
import DecorationLink from '@/pages/mall/admin/design/link-management.uvue'
// 导入直播管理
import MarketingLiveRoom from '@/pages/mall/admin/marketing/live/room.uvue'
import MarketingLiveProduct from '@/pages/mall/admin/marketing/live/product.uvue'
import MarketingLiveAnchor from '@/pages/mall/admin/marketing/live/anchor.uvue'
// 导入用户充值
import MarketingRechargeQuota from '@/pages/mall/admin/marketing/recharge/quota.uvue'
import MarketingRechargeConfig from '@/pages/mall/admin/marketing/recharge/config.uvue'
// 导入每日签到
import MarketingCheckinConfig from '@/pages/mall/admin/marketing/checkin/config.uvue'
import MarketingCheckinReward from '@/pages/mall/admin/marketing/checkin/reward.uvue'
// 导入新人礼
import MarketingNewcomerGift from '@/pages/mall/admin/marketing/newcomer/index.uvue'
// 导入付费会员
import MarketingMemberType from '@/pages/mall/admin/marketing/member/type.uvue'
import MarketingMemberRight from '@/pages/mall/admin/marketing/member/right.uvue'
import MarketingMemberCard from '@/pages/mall/admin/marketing/member/card.uvue'
import MarketingMemberRecord from '@/pages/mall/admin/marketing/member/record.uvue'
import MarketingMemberConfig from '@/pages/mall/admin/marketing/member/config.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<string, any> = 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', MarketingIntegralProduct],
['MarketingIntegralOrder', MarketingIntegralOrder],
['MarketingIntegralRecord', MarketingIntegralRecord],
['MarketingIntegralConfig', MarketingIntegralConfig],
// 3. 抽奖管理
['MarketingLotteryList', MarketingLotteryList],
['MarketingLotteryConfig', MarketingLotteryConfig],
// 4. 砍价管理
['MarketingBargainProduct', PlaceholderPage],
['MarketingBargainList', PlaceholderPage],
// 5. 拼团管理
['MarketingCombinationProduct', MarketingCombinationProduct],
['MarketingCombinationList', MarketingCombinationList],
['MarketingCombinationCreate', MarketingCombinationCreate],
// 6. 秒杀管理
['MarketingSeckillList', MarketingSeckillList],
['MarketingSeckillProduct', MarketingSeckillProduct],
['MarketingSeckillConfig', MarketingSeckillConfig],
// 7. 付费会员
['MarketingMemberType', MarketingMemberType],
['MarketingMemberRight', MarketingMemberRight],
['MarketingMemberCard', MarketingMemberCard],
['MarketingMemberRecord', MarketingMemberRecord],
['MarketingMemberConfig', MarketingMemberConfig],
// 8. 直播管理
['MarketingLiveRoom', MarketingLiveRoom],
['MarketingLiveProduct', MarketingLiveProduct],
['MarketingLiveAnchor', MarketingLiveAnchor],
// 9. 用户充值
['MarketingRechargeQuota', MarketingRechargeQuota],
['MarketingRechargeConfig', MarketingRechargeConfig],
// 10. 每日签到
['MarketingCheckinConfig', MarketingCheckinConfig],
['MarketingCheckinReward', MarketingCheckinReward],
// 11. 渠道码 & 新人礼
['MarketingChannelList', PlaceholderPage],
['MarketingNewcomerGift', MarketingNewcomerGift],
// 内容模块
['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', KefuAutoReply],
['KefuConfig', KefuConfig],
// 装修模块
['DecorationHome', DecorationHome],
['DecorationCategory', DecorationCategory],
['DecorationUser', DecorationUser],
['DecorationData', DecorationData],
['DecorationStyle', DecorationStyle],
['DecorationMaterial', DecorationMaterial],
['DecorationLink', DecorationLink],
// 应用模块
['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
}