refactor(dashboard): 重构用户管理页面和路由结构 feat(server): 实现部门管理API和RBAC增强功能 docs: 更新用户手册和管理员指南文档 style: 统一图标使用和组件命名规范 test: 添加部门服务和数据隔离测试用例 chore: 更新依赖和配置文件
333 lines
9.4 KiB
TypeScript
333 lines
9.4 KiB
TypeScript
import { defineConfig } from 'umi';
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'process.env.REACT_APP_USE_MOCK': process.env.REACT_APP_USE_MOCK || 'true',
|
|
'process.env.REACT_APP_API_BASE_URL': process.env.REACT_APP_API_BASE_URL || 'http://localhost:3001',
|
|
'process.env.REACT_APP_REDUX_DEVTOOLS': process.env.REACT_APP_REDUX_DEVTOOLS || 'true',
|
|
'process.env.REACT_APP_MSW_DEBUG': process.env.REACT_APP_MSW_DEBUG || 'true',
|
|
},
|
|
|
|
|
|
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
component: '@/pages/Auth/LoginPage',
|
|
exact: true,
|
|
},
|
|
{
|
|
path: '/home',
|
|
component: '@/pages/Homepage',
|
|
exact: true,
|
|
},
|
|
{
|
|
path: '/test-route',
|
|
component: '@/pages/TestRoute',
|
|
},
|
|
{
|
|
path: '/dashboard',
|
|
routes: [
|
|
{
|
|
path: '/dashboard',
|
|
component: '@/pages/DashboardPage',
|
|
},
|
|
{
|
|
path: '/dashboard/ai-action-task-manager',
|
|
component: '@/pages/AIActionTaskManager',
|
|
},
|
|
{
|
|
path: '/dashboard/ai-suggestion',
|
|
component: '@/pages/AISuggestionPage',
|
|
},
|
|
{
|
|
path: '/dashboard/human-approval',
|
|
component: '@/pages/HumanApprovalPage',
|
|
},
|
|
{
|
|
path: '/dashboard/client-management',
|
|
component: '@/pages/ClientManagement',
|
|
},
|
|
{
|
|
path: '/dashboard/execution-results',
|
|
component: '@/pages/ExecutionResults',
|
|
},
|
|
{
|
|
path: '/dashboard/ai-decision-log',
|
|
component: '@/pages/AIDecisionLog/index',
|
|
},
|
|
{
|
|
path: '/dashboard/strategy-marketplace',
|
|
component: '@/pages/StrategyMarketplace/index',
|
|
},
|
|
{
|
|
path: '/dashboard/auto-product-selection',
|
|
component: '@/pages/AutoProductSelection/index',
|
|
},
|
|
{
|
|
path: '/dashboard/auto-execution',
|
|
component: '@/pages/AutoExecution/index',
|
|
},
|
|
{
|
|
path: '/dashboard/workflow',
|
|
component: '@/pages/Workflow/WorkflowManagement',
|
|
},
|
|
{
|
|
path: '/dashboard/workflow/config',
|
|
component: '@/pages/Workflow/WorkflowConfig',
|
|
},
|
|
{
|
|
path: '/dashboard/operation-agent',
|
|
component: '@/pages/OperationAgentEnhanced',
|
|
},
|
|
{
|
|
path: '/dashboard/operation-agent-enhanced',
|
|
component: '@/pages/OperationAgentEnhanced',
|
|
},
|
|
{
|
|
path: '/dashboard/auto-pilot',
|
|
component: '@/pages/AutoPilot/index',
|
|
},
|
|
{
|
|
path: '/dashboard/task-center',
|
|
component: '@/pages/TaskCenter/index',
|
|
},
|
|
{
|
|
path: '/dashboard/product',
|
|
component: '@/pages/Product/index',
|
|
},
|
|
{
|
|
path: '/dashboard/product/publish',
|
|
component: '@/pages/Product/ProductPublishForm',
|
|
},
|
|
{
|
|
path: '/dashboard/product/ai-pricing',
|
|
component: '@/pages/Product/AIPricing/index',
|
|
},
|
|
{
|
|
path: '/dashboard/product/profit-monitor',
|
|
component: '@/pages/Product/ProfitMonitor/index',
|
|
},
|
|
{
|
|
path: '/dashboard/inventory',
|
|
component: '@/pages/Inventory/index',
|
|
},
|
|
{
|
|
path: '/dashboard/inventory/warehouses',
|
|
component: '@/pages/Warehouse/index',
|
|
},
|
|
{
|
|
path: '/dashboard/orders',
|
|
component: '@/pages/Orders/index',
|
|
},
|
|
{
|
|
path: '/dashboard/orders/exception',
|
|
component: '@/pages/Orders/ExceptionOrder',
|
|
},
|
|
{
|
|
path: '/dashboard/after-sales',
|
|
component: '@/pages/AfterSales/index',
|
|
},
|
|
{
|
|
path: '/dashboard/after-sales/refund',
|
|
component: '@/pages/AfterSales/RefundProcess',
|
|
},
|
|
{
|
|
path: '/dashboard/logistics',
|
|
component: '@/pages/Logistics/index',
|
|
},
|
|
{
|
|
path: '/dashboard/logistics/freight-calc',
|
|
component: '@/pages/Logistics/FreightCalc',
|
|
},
|
|
{
|
|
path: '/dashboard/finance',
|
|
component: '@/pages/Finance/index',
|
|
},
|
|
{
|
|
path: '/dashboard/finance/transactions',
|
|
component: '@/pages/Finance/Transactions',
|
|
},
|
|
{
|
|
path: '/dashboard/finance/reconciliation',
|
|
component: '@/pages/Finance/Reconciliation',
|
|
},
|
|
{
|
|
path: '/dashboard/user-asset',
|
|
component: '@/pages/UserAsset/UserAssets',
|
|
},
|
|
{
|
|
path: '/dashboard/ad',
|
|
component: '@/pages/Ad/index',
|
|
},
|
|
{
|
|
path: '/dashboard/marketing/competitors',
|
|
component: '@/pages/Marketing/Competitors',
|
|
},
|
|
{
|
|
path: '/dashboard/dynamic-pricing',
|
|
component: '@/pages/DynamicPricing/index',
|
|
},
|
|
{
|
|
path: '/dashboard/ab-test',
|
|
component: '@/pages/ABTest/ABTestConfig',
|
|
},
|
|
{
|
|
path: '/dashboard/analytics',
|
|
component: '@/pages/Analytics/index',
|
|
},
|
|
{
|
|
path: '/dashboard/analytics/dashboard',
|
|
component: '@/pages/Analytics/AnalyticsDashboard',
|
|
},
|
|
{
|
|
path: '/dashboard/reports',
|
|
component: '@/pages/Reports/index',
|
|
},
|
|
{
|
|
path: '/dashboard/multi-shop-report',
|
|
component: '@/pages/MultiShopReport/index',
|
|
},
|
|
{
|
|
path: '/dashboard/leaderboard',
|
|
component: '@/pages/Leaderboard/index',
|
|
},
|
|
{
|
|
path: '/dashboard/merchant',
|
|
component: '@/pages/Merchant/index',
|
|
},
|
|
{
|
|
path: '/dashboard/b2b',
|
|
component: '@/pages/B2B/index',
|
|
},
|
|
{
|
|
path: '/dashboard/b2b/batch-order',
|
|
component: '@/pages/B2B/BatchOrder',
|
|
},
|
|
{
|
|
path: '/dashboard/b2b/enterprise-quote',
|
|
component: '@/pages/B2B/EnterpriseQuote',
|
|
},
|
|
{
|
|
path: '/dashboard/b2b/contract-manage',
|
|
component: '@/pages/B2B/ContractManage',
|
|
},
|
|
{
|
|
path: '/dashboard/procurement',
|
|
component: '@/pages/Procurement/index',
|
|
},
|
|
{
|
|
path: '/dashboard/suppliers',
|
|
component: '@/pages/Suppliers/index',
|
|
},
|
|
{
|
|
path: '/dashboard/warehouse',
|
|
component: '@/pages/Warehouse/index',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site',
|
|
component: '@/pages/IndependentSite/index',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/create',
|
|
component: '@/pages/IndependentSite/IndependentSiteCreate',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/templates',
|
|
component: '@/pages/IndependentSite/SiteTemplates',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/analytics',
|
|
component: '@/pages/IndependentSite/IndependentSiteAnalytics',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/orders',
|
|
component: '@/pages/IndependentSite/IndependentSiteOrder',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/products',
|
|
component: '@/pages/IndependentSite/IndependentSiteProduct',
|
|
},
|
|
{
|
|
path: '/dashboard/independent-site/domains',
|
|
component: '@/pages/IndependentSite/DomainManagement',
|
|
},
|
|
{
|
|
path: '/dashboard/blacklist',
|
|
component: '@/pages/Blacklist/index',
|
|
},
|
|
{
|
|
path: '/dashboard/compliance',
|
|
component: '@/pages/Compliance/index',
|
|
},
|
|
{
|
|
path: '/dashboard/audit',
|
|
component: '@/pages/Audit/index',
|
|
},
|
|
{
|
|
path: '/dashboard/operation-logs',
|
|
component: '@/pages/OperationLogs/index',
|
|
},
|
|
{
|
|
path: '/dashboard/governance',
|
|
component: '@/pages/Governance/index',
|
|
},
|
|
{
|
|
path: '/dashboard/sovereignty',
|
|
component: '@/pages/Sovereignty/index',
|
|
},
|
|
{
|
|
path: '/dashboard/compliance/certificates',
|
|
component: '@/pages/Compliance/CertificateManage',
|
|
},
|
|
{
|
|
path: '/dashboard/settings',
|
|
component: '@/pages/Settings/index',
|
|
},
|
|
{
|
|
path: '/dashboard/settings/platform-auth',
|
|
component: '@/pages/Settings/PlatformAuth',
|
|
},
|
|
{
|
|
path: '/dashboard/settings/service-manager',
|
|
component: '@/pages/Settings/ServiceManager',
|
|
},
|
|
{
|
|
path: '/dashboard/settings/subscription',
|
|
component: '@/pages/Settings/SubscriptionManage',
|
|
},
|
|
{
|
|
path: '/dashboard/settings/user',
|
|
component: '@/pages/Settings/UserManagement',
|
|
},
|
|
{
|
|
path: '/dashboard/settings/department',
|
|
component: '@/pages/Settings/DepartmentManagement',
|
|
},
|
|
{
|
|
path: '/dashboard/user',
|
|
redirect: '/dashboard/settings/user',
|
|
},
|
|
{
|
|
path: '/dashboard/role',
|
|
component: '@/pages/Role/index',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/auth/login',
|
|
component: '@/pages/Auth/LoginPage',
|
|
},
|
|
{
|
|
path: '/auth/register',
|
|
component: '@/pages/Auth/RegisterPage',
|
|
},
|
|
{
|
|
path: '/auth/reset-password',
|
|
component: '@/pages/Auth/ResetPasswordPage',
|
|
},
|
|
],
|
|
fastRefresh: true,
|
|
esbuildMinifyIIFE: true,
|
|
});
|