forked from github/dataease
fix: 修改log文件名称
This commit is contained in:
parent
5e6e00e84c
commit
fb446e3943
@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -266,7 +267,9 @@ public class LogService {
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
//文件名称
|
||||
response.setHeader("Content-disposition", "attachment;filename=log.xlsx");
|
||||
String fileName = "DataEase操作日志";
|
||||
String encodeFileName = URLEncoder.encode(fileName, "UTF-8");
|
||||
response.setHeader("Content-disposition", "attachment;filename="+encodeFileName+".xlsx");
|
||||
wb.write(outputStream);
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
|
@ -116,7 +116,7 @@ export default {
|
||||
const link = document.createElement('a')
|
||||
link.style.display = 'none'
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.download = 'log.xlsx' // 下载的文件名
|
||||
link.download = 'DataEase操作日志.xlsx' // 下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
Loading…
Reference in New Issue
Block a user