From 468126a928a899d3b43bd1783e5170ab59852178 Mon Sep 17 00:00:00 2001 From: tjxt <1325917080@qq.com> Date: Wed, 17 Jul 2024 14:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=A5=E5=BF=97=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/log.js | 100 +++++++++ src/utils/download.js | 26 +++ src/views/system/log/abnormalLog/index.vue | 240 +++++++++++++++++++++ src/views/system/log/businessLog/index.vue | 233 ++++++++++++++++++++ src/views/system/log/logAnalyse/index.vue | 180 ++++++++++++++++ src/views/system/log/logCapacity/index.vue | 61 ++++++ src/views/system/log/systemLog/index.vue | 234 ++++++++++++++++++++ 7 files changed, 1074 insertions(+) create mode 100644 src/api/system/log.js create mode 100644 src/utils/download.js create mode 100644 src/views/system/log/abnormalLog/index.vue create mode 100644 src/views/system/log/businessLog/index.vue create mode 100644 src/views/system/log/logAnalyse/index.vue create mode 100644 src/views/system/log/logCapacity/index.vue create mode 100644 src/views/system/log/systemLog/index.vue diff --git a/src/api/system/log.js b/src/api/system/log.js new file mode 100644 index 00000000..cb89e913 --- /dev/null +++ b/src/api/system/log.js @@ -0,0 +1,100 @@ +import request from '@/utils/request' +//查询业务日志列表 +export function getYwLogs(data) { + return request({ + url: '/system/sys/sysLog/getYwLogs', + method: 'get', + params: data + }) + } + +//备份业务日志列表 +export function downloadYwLogs(data) { + return request({ + url: '/system/sys/sysLog/downloadYwLogs', + method: 'get', + params: data, + responseType: 'blob' + }) + } + +//查询系统日志列表 +export function getSysLogs(data) { + return request({ + url: '/system/sys/sysLog/getSystemLogs', + method: 'get', + params: data + }) +} + +//备份系统日志列表 +export function downloadSysLogs(data) { + return request({ + url: '/system/sys/sysLog/downloadSysLogs', + method: 'get', + params: data, + responseType: 'blob' + }) +} + +//查询异常日志列表 +export function getErrLogs(data) { + return request({ + url: '/system/sys/sysLog/getErrLogs', + method: 'get', + params: data + }) +} + +//备份异常日志列表 +export function downloadErrLogs(data) { + return request({ + url: '/system/sys/sysLog/downloadErrLogs', + method: 'get', + params: data, + responseType: 'blob' + }) +} + +//获取日志分析数据 +export function getAnalyseData(data) { + return request({ + url: '/system/sys/sysLog/getLogStatistics', + method: 'post', + data: data + }) + } + + + //获取日志容量 +export function getLogSize(data) { + return request({ + url: '/system/sys/sysLog/getLogsSet', + method: 'post', + data + }) + } + //设置日志容量 + export function updateLogSize(data) { + return request({ + url: '/system/sys/sysLog/setLogsSet', + method: 'post', + data:data + }) + } + + //添加异常Ip日志 + export function addLogs(data) { + return request({ + url: '/system/sys/sysLog/addLogs', + method: 'post', + data:data + }) + } + + + + + + + diff --git a/src/utils/download.js b/src/utils/download.js new file mode 100644 index 00000000..aba2d534 --- /dev/null +++ b/src/utils/download.js @@ -0,0 +1,26 @@ +// 下载blob文件 +export const downloadFile = ({ fileData, fileType, fileName }) => { + const blob = new Blob([fileData], { + type: fileType + }) + const link = document.createElement('a') + link.href = URL.createObjectURL(blob) + link.download = fileName + link.style.display = 'none' + document.body.appendChild(link) + link.click() + URL.revokeObjectURL(link.href) + document.body.removeChild(link) +} + +// 通用a链接下载 +export const downloadFileByUrl = (url) => { + const link = document.createElement('a') + link.href = url + link.setAttribute('download', '') + link.style.display = 'none' + document.body.appendChild(link) + link.click() + URL.revokeObjectURL(link.href) + document.body.removeChild(link) +} diff --git a/src/views/system/log/abnormalLog/index.vue b/src/views/system/log/abnormalLog/index.vue new file mode 100644 index 00000000..470b83d2 --- /dev/null +++ b/src/views/system/log/abnormalLog/index.vue @@ -0,0 +1,240 @@ + + + diff --git a/src/views/system/log/businessLog/index.vue b/src/views/system/log/businessLog/index.vue new file mode 100644 index 00000000..46b0d445 --- /dev/null +++ b/src/views/system/log/businessLog/index.vue @@ -0,0 +1,233 @@ + + + diff --git a/src/views/system/log/logAnalyse/index.vue b/src/views/system/log/logAnalyse/index.vue new file mode 100644 index 00000000..b3540337 --- /dev/null +++ b/src/views/system/log/logAnalyse/index.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/system/log/logCapacity/index.vue b/src/views/system/log/logCapacity/index.vue new file mode 100644 index 00000000..375ef4e6 --- /dev/null +++ b/src/views/system/log/logCapacity/index.vue @@ -0,0 +1,61 @@ + + + + \ No newline at end of file diff --git a/src/views/system/log/systemLog/index.vue b/src/views/system/log/systemLog/index.vue new file mode 100644 index 00000000..e6034f35 --- /dev/null +++ b/src/views/system/log/systemLog/index.vue @@ -0,0 +1,234 @@ + + +