Merge remote-tracking branch 'xiaoguangbin/station' into station
This commit is contained in:
commit
28878e942a
|
@ -29,7 +29,8 @@ public class ExportUtil {
|
|||
response.setCharacterEncoding(UTF_8);
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
String name = URLEncoder.encode(fileName, UTF_8);
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + name);
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + name);
|
||||
return response.getOutputStream();
|
||||
}
|
||||
|
||||
|
@ -37,7 +38,8 @@ public class ExportUtil {
|
|||
response.setCharacterEncoding(UTF_8);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
String name = URLEncoder.encode(fileName, UTF_8);
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + name);
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + name);
|
||||
return response.getOutputStream();
|
||||
}
|
||||
|
||||
|
@ -53,7 +55,8 @@ public class ExportUtil {
|
|||
response.setCharacterEncoding(UTF_8);
|
||||
response.setContentType("application/octet-stream");
|
||||
String name = URLEncoder.encode(fileName, UTF_8);
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + name);
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + name);
|
||||
return response.getWriter();
|
||||
}
|
||||
|
||||
|
@ -61,7 +64,8 @@ public class ExportUtil {
|
|||
response.setCharacterEncoding(UTF_8);
|
||||
response.setContentType("text/html");
|
||||
String name = URLEncoder.encode(fileName, UTF_8);
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + name);
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + name);
|
||||
return response.getWriter();
|
||||
}
|
||||
|
||||
|
|
|
@ -4491,6 +4491,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
//设置响应类型
|
||||
response.setContentType("application/octet-stream");
|
||||
//解决中文不能生成文件
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment; fileName=" + URLEncoder.encode(txtFileName,"UTF-8"));
|
||||
fos = response.getOutputStream();
|
||||
fos.write(strBuild.toString().getBytes());
|
||||
|
@ -4643,6 +4644,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
|||
//设置响应类型
|
||||
response.setContentType("application/octet-stream");
|
||||
//解决中文不能生成文件
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
response.setHeader("Content-Disposition", "attachment; fileName=" + URLEncoder.encode(phdFileName,"UTF-8"));
|
||||
fos = response.getOutputStream();
|
||||
fos.write(spectrum.getBytes());
|
||||
|
|
Loading…
Reference in New Issue
Block a user