From c9015d3ce19c2ab7516efb587d5b2acd2b8ba767 Mon Sep 17 00:00:00 2001 From: 86182 Date: Tue, 18 Oct 2022 11:41:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BApdf=E6=89=93=E4=B8=8D?= =?UTF-8?q?=E5=BC=80=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/phase2/note.js | 4 ++-- src/views/user/Mynotes.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/phase2/note.js b/src/api/phase2/note.js index 327fd5f6..7a0777e4 100644 --- a/src/api/phase2/note.js +++ b/src/api/phase2/note.js @@ -105,7 +105,7 @@ const ids=function (data){ * */ const exportExcel=function (data){ // return ajax.postJsonToFile(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data); - return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data,{responseType: 'blob'}); + return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/exportExcel',data); } /** @@ -115,7 +115,7 @@ const exportExcel=function (data){ * } * */ const exportExcelPre=function (data){ - return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/excel-detail',data,{responseType: 'blob'}); + return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/excel-detail',data); } /** diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index ce9babcd..190482ff 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -300,7 +300,7 @@ export default { this.$message.error('导出失败'); } else { const link = document.createElement('a');// 创建a标签 - let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型 + let blob = new Blob([res],{type: 'application/vnd.pdf;charset=UTF-8'}); // 设置文件类型 link.style.display = "none"; link.href = URL.createObjectURL(blob); // 创建URL link.setAttribute("download", "我的笔记.pdf");