|
|
|
@ -353,7 +353,13 @@ |
|
|
|
|
const fileUrl = `${globalSetting.domainUrl}${getDownWork}?id=${record.id}`; |
|
|
|
|
const extName = record.url.substring(record.url.lastIndexOf('.')); |
|
|
|
|
const previewUrl = `${fileUrl}&fullfilename=${new Date().getTime()}${extName}`; |
|
|
|
|
window.open(previewServerUrl + encodeURIComponent(Base64.encode(previewUrl))); |
|
|
|
|
window.open(previewServerUrl + encodeURIComponent(base64Encode(previewUrl))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function base64Encode(str: string): string { |
|
|
|
|
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { |
|
|
|
|
return String.fromCharCode('0x' + p1); |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function handleDown(record) { |
|
|
|
|