新增通用方法简化下载使用
This commit is contained in:
parent
e3a1cd6b8c
commit
b1da78d985
@ -211,6 +211,7 @@ public class FileUtils
|
|||||||
.append(percentEncodedFileName);
|
.append(percentEncodedFileName);
|
||||||
|
|
||||||
response.setHeader("Content-disposition", contentDispositionValue.toString());
|
response.setHeader("Content-disposition", contentDispositionValue.toString());
|
||||||
|
response.setHeader("download-filename", percentEncodedFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -107,8 +107,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
"/**/*.js",
|
"/**/*.js",
|
||||||
"/profile/**"
|
"/profile/**"
|
||||||
).permitAll()
|
).permitAll()
|
||||||
.antMatchers("/common/download**").anonymous()
|
|
||||||
.antMatchers("/common/download/resource**").anonymous()
|
|
||||||
.antMatchers("/swagger-ui.html").anonymous()
|
.antMatchers("/swagger-ui.html").anonymous()
|
||||||
.antMatchers("/swagger-resources/**").anonymous()
|
.antMatchers("/swagger-resources/**").anonymous()
|
||||||
.antMatchers("/webjars/**").anonymous()
|
.antMatchers("/webjars/**").anonymous()
|
||||||
|
@ -567,7 +567,7 @@ export default {
|
|||||||
this.exportLoading = true;
|
this.exportLoading = true;
|
||||||
return export${BusinessName}(queryParams);
|
return export${BusinessName}(queryParams);
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.download(response.msg);
|
this.#[[$download]]#.name(response.msg);
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user