From 07115c646c94999193b1a001095a465283feca91 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Sat, 3 Aug 2024 01:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E5=A2=9E=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/views/system/log/difflog/index.vue | 6 +++--- Web/src/views/system/log/exlog/index.vue | 16 ++++++++++++++-- Web/src/views/system/log/oplog/index.vue | 12 ++++++++++++ Web/src/views/system/log/vislog/index.vue | 2 +- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Web/src/views/system/log/difflog/index.vue b/Web/src/views/system/log/difflog/index.vue index ea22e620..3c2a79c7 100644 --- a/Web/src/views/system/log/difflog/index.vue +++ b/Web/src/views/system/log/difflog/index.vue @@ -5,12 +5,12 @@ - + - + @@ -79,7 +79,7 @@ - + diff --git a/Web/src/views/system/log/exlog/index.vue b/Web/src/views/system/log/exlog/index.vue index f02a222e..3dd1c5a1 100644 --- a/Web/src/views/system/log/exlog/index.vue +++ b/Web/src/views/system/log/exlog/index.vue @@ -5,12 +5,12 @@ - + - + @@ -64,6 +64,7 @@ @@ -123,6 +124,7 @@ import { auth } from '/@/utils/authFunction'; import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table'; import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook'; import { Local } from '/@/utils/storage'; +import { downloadByData, getFileName } from '/@/utils/download'; import VueJsonPretty from 'vue-json-pretty'; import 'vue-json-pretty/lib/styles.css'; import { StringToObj } from '/@/utils/json-utils'; @@ -268,6 +270,16 @@ const handleView = async ({ row }: any) => { state.detail.returnResult = StringToObj(data?.result?.returnResult); state.visible = true; }; + +// 导出日志 +const exportLog = async () => { + options.loading = true; + var res = await getAPI(SysLogExApi).apiSysLogExExportPost(state.queryParams, { responseType: 'blob' }); + options.loading = false; + + var fileName = getFileName(res.headers); + downloadByData(res.data as any, fileName); +};