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 @@ + + +