新增通用方法简化下载使用

This commit is contained in:
RuoYi 2021-09-27 10:39:26 +08:00
parent e3a1cd6b8c
commit b1da78d985
3 changed files with 2 additions and 3 deletions

View File

@ -211,6 +211,7 @@ public class FileUtils
.append(percentEncodedFileName);
response.setHeader("Content-disposition", contentDispositionValue.toString());
response.setHeader("download-filename", percentEncodedFileName);
}
/**

View File

@ -107,8 +107,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
"/**/*.js",
"/profile/**"
).permitAll()
.antMatchers("/common/download**").anonymous()
.antMatchers("/common/download/resource**").anonymous()
.antMatchers("/swagger-ui.html").anonymous()
.antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/webjars/**").anonymous()

View File

@ -567,7 +567,7 @@ export default {
this.exportLoading = true;
return export${BusinessName}(queryParams);
}).then(response => {
this.download(response.msg);
this.#[[$download]]#.name(response.msg);
this.exportLoading = false;
}).catch(() => {});
}