fix: 日志导出文件使用excel无法打开

This commit is contained in:
fit2cloud-chenyw 2022-06-22 12:16:30 +08:00
parent 5c73127124
commit 67c4c8d55c
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)