Merge pull request #3296 from dataease/pr@dev@refactor_view-detail-export

refactor(视图): 导出视图明细变更为xlsx格式
This commit is contained in:
xuwei-fit2cloud 2022-10-08 16:35:34 +08:00 committed by GitHub
commit 192d1f1b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -664,7 +664,7 @@ public class PanelGroupService {
}
response.setContentType("application/vnd.ms-excel");
//文件名称
response.setHeader("Content-disposition", "attachment;filename=" + request.getViewName() + ".xls");
response.setHeader("Content-disposition", "attachment;filename=" + request.getViewName() + ".xlsx");
wb.write(outputStream);
outputStream.flush();
outputStream.close();

View File

@ -61,7 +61,7 @@ export default {
type: String,
default: 'details'
}
},
data() {
return {
@ -231,7 +231,7 @@ export default {
const link = document.createElement('a')
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
link.download = excelName + '.xls' //
link.download = excelName + '.xlsx' //
document.body.appendChild(link)
link.click()
document.body.removeChild(link)