From 7ea52c024ca4f52bf4c5b4ec5c9d2e89d50502ff Mon Sep 17 00:00:00 2001 From: zou Date: Mon, 6 Jul 2026 12:03:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006-W12.6):=204=20=E4=B8=AA=20sys=20view?= =?UTF-8?q?=20(log=C3=973=20+=20schedule)=20=E8=B7=AF=E7=94=B1=E6=94=B9?= =?UTF-8?q?=E6=8C=87=E7=9C=9F=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: W5.x.x+4 把 log×3 + job/schedule 路由统一改成 MockTableView + configKey, W5.x.x+5 写的 LogErrorView/LogLoginView/LogOperationView/ScheduleListView 4 个真 view (241/179/216/198 行) 因路由没引用从未生效, 用户实际看到的都是 mock 数据. 根因诊断: - /sys/log/error/page 200 OK + 809 条真数据 (database sys_log_error) - /sys/log/login/page 200 OK + 50166 条 - /sys/log/operation/page 200 OK + 41771 条 - /sys/schedule/page 200 OK (0 条, QRTZ 表未建) - 之前 user 看 log 看到 mock 是因为 router 把 /sys/log/error 路由到 MockTableView (configKey sys-log-error), 不是 LogErrorView 修法: 改 src/router/index.ts 4 行, 让 /sys/log/{login,operation,error} 指向真 view, /job/schedule 指向 ScheduleListView. 验证 (Playwright + token 注入): - 错误日志 title="错误日志" rows=20 sub="共 809 条" - 登录日志 title="登录日志" rows=20 sub="共 50166 条" - 操作日志 title="操作日志" rows=20 sub="共 41771 条" - 定时任务 title="定时任务" rows=0 sub="共 0 个任务" (QRTZ 表待建) 额外发现: 操作日志显示 F002 MCP 列出询价 GET 反复失败, 是平台助手集成 bug 的真实证据 影响: FileListView 无菜单入口, 暂不接 router (保留 152 行代码供未来菜单化) ps: 后端 client_credentials token 触发 @PreAuthorize Access Denied, 必须用 admin/admin password grant + captcha=socialedu (前端 LoginView 走此路径, 无感知) --- src/router/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index faae014..95af768 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -214,7 +214,7 @@ const routes: RouteRecordRaw[] = [ { path: '/devtools/param', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'devtools-param' }), meta: { title: '参数配置(开发)' } }, { path: '/devtools/template', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'devtools-template' }), meta: { title: '模板配置' } }, // job 1 个 - { path: '/job/schedule', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'job-schedule' }), meta: { title: '定时任务' } }, + { path: '/job/schedule', component: () => import('@/modules/sys/ScheduleListView.vue'), meta: { title: '定时任务' } }, // order 9 个 { path: '/order/ordergood', component: () => import('@/modules/order/OrderListView.vue'), meta: { title: '商品订单' } }, { path: '/order/serviceorder', component: () => import('@/modules/order/OrderListView.vue'), meta: { title: '服务订单' } }, @@ -238,9 +238,9 @@ const routes: RouteRecordRaw[] = [ { path: '/supplier/promoter', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'supplier-promoter' }), meta: { title: '推广返佣' } }, // sys 11 个 { path: '/sys/dict', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-dict' }), meta: { title: '字典类型' } }, - { path: '/sys/log/login', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-log-login' }), meta: { title: '登录日志' } }, - { path: '/sys/log/operation', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-log-operation' }), meta: { title: '操作日志' } }, - { path: '/sys/log/error', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-log-error' }), meta: { title: '异常日志' } }, + { path: '/sys/log/login', component: () => import('@/modules/sys/LogLoginView.vue'), meta: { title: '登录日志' } }, + { path: '/sys/log/operation', component: () => import('@/modules/sys/LogOperationView.vue'), meta: { title: '操作日志' } }, + { path: '/sys/log/error', component: () => import('@/modules/sys/LogErrorView.vue'), meta: { title: '异常日志' } }, { path: '/sys/notice', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-notice' }), meta: { title: '通知公告' } }, { path: '/sys/params', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-params' }), meta: { title: '参数配置' } }, { path: '/sys/notice-user', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-notice-user' }), meta: { title: '用户通知' } },