diff --git a/src/views/monitor/filelog/filelog.api.ts b/src/views/monitor/filelog/filelog.api.ts index 7a68630..168299d 100644 --- a/src/views/monitor/filelog/filelog.api.ts +++ b/src/views/monitor/filelog/filelog.api.ts @@ -3,41 +3,47 @@ import { useMessage } from '/@/hooks/web/useMessage'; const { createConfirm } = useMessage(); enum Api { - logFilesList = '/health-system/service/log/files', - logFilesDelete = '/health-system/service/log/file/delete', - logFilesLDown = '/health-system/service/log/file/down', + logFilesList = '/service/log/files', + logFilesDelete = '/service/log/file/delete', + logFilesLDown = '/service/log/file/down', } -export const logFilesListApi = (params: any) => defHttp.get({ url: Api.logFilesList, params: params }); +export const logFilesListApi = (params: any) => defHttp.get({ url: '/' + params.service + Api.logFilesList, params: params }); + //文档删除 export const logFilesDeleteApi = (params: any, handleSuccess: Function) => { - createConfirm({ - iconType: 'warning', - title: '确认删除', - content: '是否删除数据', - okText: '确认', - cancelText: '取消', - onOk: () => { - return defHttp - .get( - { - url: Api.logFilesDelete, - params, - }, - { joinParamsToUrl: true } - ) - .then(() => { - handleSuccess(); - }); - }, - }); + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + const { service } = params; + const url = '/' + service + Api.logFilesDelete; + return defHttp + .get( + { + url: url, + params, + }, + { joinParamsToUrl: true } + ) + .then(() => { + handleSuccess(); + }); + }, + }); +}; +export const logFilesLDownApi = (params: any) => { + const { service } = params; + const url = '/' + service + Api.logFilesLDown; + return defHttp.get( + { + url: url, + params: params, + responseType: 'blob', + }, + { isTransformResponse: false } + ); }; -export const logFilesLDownApi = (params: any) => - defHttp.get( - { - url: Api.logFilesLDown, - params: params, - responseType: 'blob', - }, - { isTransformResponse: false } - ); diff --git a/src/views/monitor/filelog/filelog.data.ts b/src/views/monitor/filelog/filelog.data.ts index b63599f..8ebd45a 100644 --- a/src/views/monitor/filelog/filelog.data.ts +++ b/src/views/monitor/filelog/filelog.data.ts @@ -1,12 +1,30 @@ import { BasicColumn, FormSchema } from '/@/components/Table'; export const columns: BasicColumn[] = [ - { - title: '文件名', - dataIndex: 'fileName', - align: 'center', - width: 100, - }, + { + title: '文件名', + dataIndex: 'fileName', + align: 'center', + width: 100, + }, + { + title: '最新修改时间', + dataIndex: 'lastModified', + align: 'center', + width: 100, + }, + { + title: '文件大小', + dataIndex: 'fileSize', + align: 'center', + width: 100, + }, + { + title: '实例地址', + dataIndex: 'instance', + align: 'center', + width: 100, + }, ]; export const searchFormSchema: FormSchema[] = [ { diff --git a/src/views/monitor/filelog/index.vue b/src/views/monitor/filelog/index.vue index ccc521a..b5f18a8 100644 --- a/src/views/monitor/filelog/index.vue +++ b/src/views/monitor/filelog/index.vue @@ -1,79 +1,74 @@ -