From 8130f60b49af50e66d80d17c456bae3bde705117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E5=B0=9B?= <1254210241@qq.com> Date: Wed, 25 Jun 2025 17:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=90=E8=A1=8C=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/runningLog.js | 25 ++ src/api/modules/violation.js | 8 +- src/layout/Sidebar.vue | 14 +- src/router/index.js | 5 + src/views/Examine/Violation/List.vue | 8 +- src/views/log/RunningLog/List.vue | 368 +++++++++++++++++++++++++++ 6 files changed, 414 insertions(+), 14 deletions(-) create mode 100644 src/api/modules/runningLog.js create mode 100644 src/views/log/RunningLog/List.vue diff --git a/src/api/modules/runningLog.js b/src/api/modules/runningLog.js new file mode 100644 index 0000000..ec613de --- /dev/null +++ b/src/api/modules/runningLog.js @@ -0,0 +1,25 @@ +import instance from '../../utils/axios.js' + +const runningApi = { + // 获取查询参数与分页参数 + pageQuery: (params) => { + // 转换分页参数名称 + const convertedParams = { + ...params, + pageNum: params.page, + pageSize: params.size + } + // 删除旧的参数 + delete convertedParams.page + delete convertedParams.size + + return instance.get('/runningLog/pageQuery', { + params: convertedParams + }) + }, + viewLog: (fileName) => { + return instance.get('/runningLog/viewLog?fileName='+fileName); + } +} + +export { runningApi } \ No newline at end of file diff --git a/src/api/modules/violation.js b/src/api/modules/violation.js index 3fba1d1..ee2f00a 100644 --- a/src/api/modules/violation.js +++ b/src/api/modules/violation.js @@ -14,13 +14,7 @@ const violationApi = { delete convertedParams.size return instance.get('/violation/pageQuery', { - params: convertedParams, - // paramsSerializer: params => { - // return Object.entries(params) - // .filter(([_, v]) => v !== undefined) - // .map(([k, v]) => `${k}=${encodeURIComponent(v)}`) - // .join('&') - // } + params: convertedParams }) }, diff --git a/src/layout/Sidebar.vue b/src/layout/Sidebar.vue index f163a6a..2b239dd 100644 --- a/src/layout/Sidebar.vue +++ b/src/layout/Sidebar.vue @@ -95,7 +95,19 @@ path: '/examine/violation/list' }] }] - } + }, + { + title: '日志管理', + path: '/log', + children:[{ + title: '运行日志', + path: '/log/runningLog', + children:[{ + title: '日志列表', + path: '/log/runningLog/list' + }] + }] + }, // 更多菜单... ]) diff --git a/src/router/index.js b/src/router/index.js index e4ccb86..62fbc67 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,6 +42,11 @@ const routes = [{ path: '/examine/violation/list', component: () => import('@/views/Examine/Violation/List.vue'), meta: { title: '违规列表' } + }, + { + path: '/log/runningLog/list', + component: () => import('@/views/log/RunningLog/List.vue'), + meta: { title: '日志列表' } } ] }] diff --git a/src/views/Examine/Violation/List.vue b/src/views/Examine/Violation/List.vue index 6455de5..16efec9 100644 --- a/src/views/Examine/Violation/List.vue +++ b/src/views/Examine/Violation/List.vue @@ -522,17 +522,13 @@ const editSubmit = async() =>{ -:global(.warning-row) { - /* background: red !important; - color: white !important; */ +/* :global(.warning-row) { background:#fdf6ec !important } :global(.shenhe-row) { - /* background: red !important; - color: white !important; */ background:#fde8e8 !important -} +} */ .unit-label { margin-left: 5px; diff --git a/src/views/log/RunningLog/List.vue b/src/views/log/RunningLog/List.vue new file mode 100644 index 0000000..866a8ad --- /dev/null +++ b/src/views/log/RunningLog/List.vue @@ -0,0 +1,368 @@ + + + + + \ No newline at end of file