Unverified 提交 e17b72db authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

Merge pull request #2116 from dataease/pr@dev@refactor_excel-export

refactor: 修改视图导出明细后置
...@@ -517,7 +517,7 @@ public class PanelGroupService { ...@@ -517,7 +517,7 @@ public class PanelGroupService {
} }
response.setContentType("application/vnd.ms-excel"); response.setContentType("application/vnd.ms-excel");
//文件名称 //文件名称
response.setHeader("Content-disposition", "attachment;filename=" + request.getViewName() + ".xlsx"); response.setHeader("Content-disposition", "attachment;filename=" + request.getViewName() + ".xls");
wb.write(outputStream); wb.write(outputStream);
outputStream.flush(); outputStream.flush();
outputStream.close(); outputStream.close();
......
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
const link = document.createElement('a') const link = document.createElement('a')
link.style.display = 'none' link.style.display = 'none'
link.href = URL.createObjectURL(blob) link.href = URL.createObjectURL(blob)
link.download = excelName + '.xlsx' // 下载的文件名 link.download = excelName + '.xls' // 下载的文件名
document.body.appendChild(link) document.body.appendChild(link)
link.click() link.click()
document.body.removeChild(link) document.body.removeChild(link)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论