From f380a6bf4ed0fffd132dc12598d49b1062b8fe5b Mon Sep 17 00:00:00 2001 From: baoyu <102349094+Bytq@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86/=E8=AF=91=E6=96=87=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=94=B3=E8=AF=B7=20=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.vue | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue index 7bd6c5704..f8129e208 100644 --- a/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue +++ b/src/pages/regulatoryRepository/standardTranslationAcquisitionRequest/index.vue @@ -193,7 +193,7 @@ - + @@ -354,19 +354,24 @@ export default { this.$refs.selections.clearSelection() }) }, - exportData (name) { - let params = { + exportName(name) { + const params = { ...this.StandardApplyForEOPage, exportFileName: name, - ids: this.selectedList.length > 0 ? this.selectedList.join(',') : '' - } - let url = '/api/lawss/standardApplyFor/exportStandardApplyForEOExcel?' - for (let key in params) { - url += `${key}=${params[key]}&` - } - window.open(url.slice(0, -1)) - }, + ids: this.selectedList.length > 0 ? this.selectedList.join(',') : '', + }; + const url = '/api/lawss/standardApplyFor/exportStandardApplyForEOExcel?' + const formattedParams = Object.keys(params).map((key) => `${key}=${params[key]}`).join('&') + + const link = document.createElement('a') + link.href = `${url}${formattedParams}` + link.download = name + '.xlsx' + + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + }, exportList () { this.$refs.exportDialogRef.openModel() },