From 18a79615d7566c00ab7685aa344c5e7d2cea3fa8 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 7 Sep 2023 14:28:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BB=BA=E8=AE=AE=E5=9C=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=AF=BC=E5=87=BA=E6=97=B6=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=A1=AE=E8=AE=A4=E6=8C=89=E9=92=AE=E5=90=8E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=81=AE=E7=BD=A9=E5=B1=82=E6=88=96=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=EF=BC=8C=E5=87=BA=E9=94=99?= =?UTF-8?q?=E6=97=B6=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/utils/request.js | 9 --------- core/frontend/src/views/dataset/data/ViewTable.vue | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/core/frontend/src/utils/request.js b/core/frontend/src/utils/request.js index ebf24943b8..35733609da 100644 --- a/core/frontend/src/utils/request.js +++ b/core/frontend/src/utils/request.js @@ -109,15 +109,6 @@ service.interceptors.response.use(response => { config.loading && tryHideLoading(store.getters.currentPath) let msg = '' - if (error?.response?.config?.url === 'dataset/table/exportDataset') { - checkAuth(error.response) - var reader = new FileReader() - reader.readAsText(error.response.data, 'utf-8') - reader.onload = () => { - $error((JSON.parse(reader.result) || {}).message) - } - return Promise.reject() - } if (error.response) { checkAuth(error.response) diff --git a/core/frontend/src/views/dataset/data/ViewTable.vue b/core/frontend/src/views/dataset/data/ViewTable.vue index 6d75c04484..aa55f0983d 100644 --- a/core/frontend/src/views/dataset/data/ViewTable.vue +++ b/core/frontend/src/views/dataset/data/ViewTable.vue @@ -235,6 +235,7 @@ {{ $t('dataset.confirm') }} @@ -282,6 +283,7 @@ export default { name: '' }, fields: [], + exportDatasetLoading: false, filedList: [], data: [], syncStatus: '', @@ -490,6 +492,7 @@ export default { return } this.table.expressionTree = JSON.stringify({ items, logic }) + this.exportDatasetLoading = true exportDataset(this.table).then((res) => { const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) const link = document.createElement('a') @@ -499,6 +502,8 @@ export default { document.body.appendChild(link) link.click() document.body.removeChild(link) + }).finally(() => { + this.exportDatasetLoading = false }) } } else {