下载文件的id中带有','字符,下载时去除

This commit is contained in:
zhaokaiyao@91isoft.com
2021-08-07 11:23:13 +08:00
parent 07940a5b8c
commit 13d969a4a7
@@ -836,29 +836,26 @@ export default {
methods: { methods: {
downloadFile (fileType) { downloadFile (fileType) {
if(fileType === 'fbgbjbd'){ if(fileType === 'fbgbjbd'){
if(this.fbgbjbdFileId.search(',')){ window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.fbgbjbdFileId.replace(",","");
this.fbgbjbdFileId=this.fbgbjbdFileId.replace(",","");
console.log(this.fbgbjbdFileId);
}
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.fbgbjbdFileId
}else if(fileType === 'xgd'){ }else if(fileType === 'xgd'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.xgdFileId
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.xgdFileId.replace(",","");
}else if(fileType === 'bpg'){ }else if(fileType === 'bpg'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.bpgFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.bpgFileId.replace(",","");
}else if(fileType === 'ssg'){ }else if(fileType === 'ssg'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.ssgFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.ssgFileId.replace(",","");
}else if(fileType === 'zqyjg'){ }else if(fileType === 'zqyjg'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.zqyjgFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.zqyjgFileId.replace(",","");
}else if(fileType === 'jdwj'){ }else if(fileType === 'jdwj'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.jdwjFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.jdwjFileId.replace(",","");
}else if(fileType === 'kwj'){ }else if(fileType === 'kwj'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.kwjFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.kwjFileId.replace(",","");
}else if(fileType === 'glwj'){ }else if(fileType === 'glwj'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.glwjFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.glwjFileId.replace(",","");
}else if(fileType === 'ca'){ }else if(fileType === 'ca'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.caFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.caFileId.replace(",","");
}else if(fileType === 'zbjbd'){ }else if(fileType === 'zbjbd'){
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.zbjbdFileId window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + this.zbjbdFileId.replace(",","");
} }
}, },
popoverHide (checkedIds, checkedData) { popoverHide (checkedIds, checkedData) {