From a92276fb2d71e7650a85742ecb4f5e59fe2d76ed Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 21 Oct 2024 17:43:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E3=80=90=E6=95=B0=E6=8D=AE=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=B8=AD=E5=BF=83=E3=80=91=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../visualized/data/dataset/ExportExcel.vue | 33 ++----------------- 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue b/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue index 8f58f11960..d68b8aa2f4 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/ExportExcel.vue @@ -242,39 +242,12 @@ const callbackExportSuc = () => { const downLoadAll = () => { if (multipleSelection.value.length === 0) { tableData.value.forEach(item => { - downloadFile(item.id) - .then(res => { - const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) - const link = document.createElement('a') - link.style.display = 'none' - link.href = URL.createObjectURL(blob) - link.download = item.fileName // 下载的文件名 - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - URL.revokeObjectURL(link.href) - }) - .finally(() => { - exportDatasetLoading.value = false - }) + window.open(PATH_URL + '/exportCenter/download/' + item.id) }) return } multipleSelection.value.map(ele => { - downloadFile(ele.id) - .then(res => { - const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) - const link = document.createElement('a') - link.style.display = 'none' - link.href = URL.createObjectURL(blob) - link.download = ele.fileName // 下载的文件名 - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - }) - .finally(() => { - exportDatasetLoading.value = false - }) + window.open(PATH_URL + '/exportCenter/download/' + ele.id) }) } const showMsg = item => { @@ -290,7 +263,7 @@ const timestampFormatDate = value => { } import { PATH_URL } from '@/config/axios/service' const downloadClick = item => { - window.open(PATH_URL + '/exportCenter/download/' + item.id, '_blank') + window.open(PATH_URL + '/exportCenter/download/' + item.id) } const retry = item => {