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

refactor: 修改视图导出明细后置
This commit is contained in:
王嘉豪 2022-04-14 15:57:48 +08:00 committed by GitHub
commit e17b72dbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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)