diff --git a/src/modules/statistics/StatisticsView.vue b/src/modules/statistics/StatisticsView.vue new file mode 100644 index 0000000..c2ade19 --- /dev/null +++ b/src/modules/statistics/StatisticsView.vue @@ -0,0 +1,357 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index f3aeef6..40a6830 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,6 +1,15 @@ import { createRouter, createWebHistory } from 'vue-router' import type { RouteRecordRaw } from 'vue-router' +/** + * 路由结构 + * - /login 公开 + * - / + /dashboard 实际页面 + * - /inquiry 询价列表 + * - /inquiry/:id 询价详情 + * - /:module/:action 通配占位(覆盖菜单映射的 70 个 url,避免 404) + * - /:pathMatch(.*)* 兜底跳首页 + */ const routes: RouteRecordRaw[] = [ { path: '/login', @@ -8,11 +17,200 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/modules/auth/LoginView.vue'), meta: { title: '登录', public: true } }, + // W3.x C P0.1: 数据统计首页 (生产环境一级模块, 走 order 真 API) { path: '/', - name: 'Dashboard', - component: () => import('@/modules/dashboard/DashboardView.vue'), - meta: { title: '数据看板', icon: 'dashboard' } + name: 'Statistics', + component: () => import('@/modules/statistics/StatisticsView.vue'), + meta: { title: '数据统计', icon: 'DataAnalysis' } + }, + { + path: '/dashboard', + redirect: '/' + }, + // statistics/index 走通配时, 仍走 StatisticsView + { + path: '/statistics/index', + name: 'StatisticsIndex', + component: () => import('@/modules/statistics/StatisticsView.vue'), + meta: { title: '数据统计', icon: 'DataAnalysis' } + }, + { + path: '/inquiry', + name: 'InquiryList', + component: () => import('@/modules/inquiry/InquiryListView.vue'), + meta: { title: '询价管理' } + }, + { + path: '/inquiry/:id', + name: 'InquiryDetail', + component: () => import('@/modules/inquiry/InquiryDetailView.vue'), + meta: { title: '询价详情' } + }, + // W3.2 订单管理(具体路由必须在 /:module/:action 之前,否则被通配拦截) + { + path: '/order', + name: 'OrderList', + component: () => import('@/modules/order/OrderListView.vue'), + meta: { title: '订单管理' } + }, + { + path: '/order/:id', + name: 'OrderDetail', + component: () => import('@/modules/order/OrderDetailView.vue'), + meta: { title: '订单详情' } + }, + // W4.19 业务模块(必须在通配占位之前) + { + path: '/user/enterprise', + name: 'UserEnterpriseList', + component: () => import('@/modules/user/EnterpriseListView.vue'), + meta: { title: '企业管理' } + }, + { + path: '/user/finance', + name: 'UserFinanceList', + component: () => import('@/modules/user/FinanceListView.vue'), + meta: { title: '财务管理' } + }, + { + path: '/supplier/activity', + name: 'SupplierActivityList', + component: () => import('@/modules/supplier/ActivityListView.vue'), + meta: { title: '营销活动' } + }, + // W4.1 集成管理 - 应用列表(具体路由必须在通配占位之前) + // 详情是 dialog 弹窗不是路由页(老 vue app-list.vue 结构) + { + path: '/openapi/app', + name: 'OpenAppList', + component: () => import('@/modules/openapi/OpenAppListView.vue'), + meta: { title: '应用列表' } + }, + // W4.2 集成管理 - 公司账号管理 + { + path: '/openapi/company', + name: 'OpenCompanyAccount', + component: () => import('@/modules/openapi/CompanyAccountListView.vue'), + meta: { title: '公司账号管理' } + }, + // W4.3 集成管理 - 审计日志 + { + path: '/openapi/audit-log', + name: 'OpenAuditLog', + component: () => import('@/modules/openapi/AuditLogListView.vue'), + meta: { title: '审计日志' } + }, + // W4.5 用户管理(后台用户) + { + path: '/sys/user', + name: 'SysUserList', + component: () => import('@/modules/sys/UserListView.vue'), + meta: { title: '用户管理' } + }, + // W4.6 角色管理 + { + path: '/sys/role', + name: 'SysRoleList', + component: () => import('@/modules/sys/RoleListView.vue'), + meta: { title: '角色管理' } + }, + // W4.7 参数管理(对应老 devtools/param, 后端 /sys/params/*) + { + path: '/sys/params', + name: 'SysParamsList', + component: () => import('@/modules/sys/ParamsListView.vue'), + meta: { title: '参数管理' } + }, + // W4.14 sys 模块补全:部门/菜单/日志 + { + path: '/sys/dept', + name: 'SysDeptList', + component: () => import('@/modules/sys/DeptListView.vue'), + meta: { title: '部门管理' } + }, + { + path: '/sys/menu', + name: 'SysMenuList', + component: () => import('@/modules/sys/MenuListView.vue'), + meta: { title: '菜单管理' } + }, + { + path: '/sys/log-login', + name: 'SysLogLogin', + component: () => import('@/modules/sys/LogLoginView.vue'), + meta: { title: '登录日志' } + }, + { + path: '/sys/log-operation', + name: 'SysLogOperation', + component: () => import('@/modules/sys/LogOperationView.vue'), + meta: { title: '操作日志' } + }, + // W4.16 sys 模块补全:岗位/错误日志/定时任务/角色组/文件 + { + path: '/sys/post', + name: 'SysPostList', + component: () => import('@/modules/sys/PostListView.vue'), + meta: { title: '岗位管理' } + }, + { + path: '/sys/log-error', + name: 'SysLogError', + component: () => import('@/modules/sys/LogErrorView.vue'), + meta: { title: '错误日志' } + }, + { + path: '/sys/schedule', + name: 'SysScheduleList', + component: () => import('@/modules/sys/ScheduleListView.vue'), + meta: { title: '定时任务' } + }, + { + path: '/sys/role-group', + name: 'SysRoleGroupList', + component: () => import('@/modules/sys/RoleGroupListView.vue'), + meta: { title: '角色组管理' } + }, + { + path: '/sys/file', + name: 'SysFileList', + component: () => import('@/modules/sys/FileListView.vue'), + meta: { title: '文件管理' } + }, + // W4.18 字典/通知/商品 + { + path: '/sys/dict-data', + name: 'SysDictDataList', + component: () => import('@/modules/sys/DictDataListView.vue'), + meta: { title: '字典数据' } + }, + { + path: '/sys/dict-type', + name: 'SysDictTypeList', + component: () => import('@/modules/sys/DictTypeListView.vue'), + meta: { title: '字典类型' } + }, + { + path: '/sys/notice', + name: 'SysNoticeList', + component: () => import('@/modules/sys/NoticeListView.vue'), + meta: { title: '通知公告' } + }, + { + path: '/sys/product', + name: 'SysProductList', + component: () => import('@/modules/sys/ProductListView.vue'), + meta: { title: '商品管理' } + }, + // W3.1 通用通配占位 — 覆盖菜单 70 个 url(两层路径,如 /admin/user/finance/recharge) + // 注意:必须放在具体路由后面,否则会拦截 /inquiry /login + // 使用 ?:action 让 action 可选(单层路径如 /sys/user 也匹配),不加 (.*)* 避免贪婪匹配抢静态路由 + { + path: '/:module/:action?', + name: 'Placeholder', + component: () => import('@/modules/placeholder/PlaceholderView.vue'), + meta: { title: '即将上线' } }, { path: '/:pathMatch(.*)*',