文件下载 重命名优化

This commit is contained in:
zhanglipeng
2021-10-11 08:53:37 +08:00
parent fc207d9489
commit fe1fe00ecb
4 changed files with 24 additions and 10 deletions

View File

@ -106,13 +106,15 @@ export function selectMoeDictLabel(datas, value) {
}
// 通用下载方法
export function download(fileName) {
export function download(fileName, fileUrlPath) {
window.location.href =
baseURL +
"/common/download?fileName=" +
encodeURI(fileName) +
"&fileUrlPath=" +
encodeURI(fileUrlPath) +
"&delete=" +
true;
false;
}
// 字符串格式化(%s )

View File

@ -187,7 +187,8 @@ export default {
//下载
handleDown(row) {
var url = row.fileurl;
window.open(this.apiurl + url);
//window.open(this.apiurl + url);
this.download(row.name,row.fileurl);
},
//预览
handleView(row) {