Merge pull request #2469 from dataease/pr@dev@fix_log_export

fix: 日志导出文件使用excel无法打开
This commit is contained in:
fit2cloud-chenyw 2022-06-22 12:17:54 +08:00 committed by GitHub
commit 559bcb1ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ public class LogService {
//文件名称
String fileName = "DataEase操作日志";
String encodeFileName = URLEncoder.encode(fileName, "UTF-8");
response.setHeader("Content-disposition", "attachment;filename="+encodeFileName+".xlsx");
response.setHeader("Content-disposition", "attachment;filename="+encodeFileName+".xls");
wb.write(outputStream);
outputStream.flush();
outputStream.close();

View File

@ -118,7 +118,7 @@ export default {
const link = document.createElement('a')
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
link.download = 'DataEase操作日志.xlsx' //
link.download = 'DataEase操作日志.xls' //
document.body.appendChild(link)
link.click()
document.body.removeChild(link)