|
|
@ -247,15 +247,6 @@ const submitFormSuccess = (response: any) => { |
|
|
|
} else if (response.code == 0) { |
|
|
|
if (response.data.errorCount > 0) { |
|
|
|
message.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(() => { |
|
|
|
// download.excel(file, 'file_' + new Date().getTime()) |
|
|
|
// 通过url下载文件 |
|
|
|
// const downloadElement = document.createElement('a') |
|
|
|
// console.log(172, getBaseUrl() + import.meta.env.VITE_API_URL + '/' + response.data.errorFile) |
|
|
|
// console.log(172, getBaseUrl() + '/admin-api/opt/profile/' + response.data.errorFile) |
|
|
|
// window.open( |
|
|
|
// getBaseUrl() + '/admin-api' + response.data.errorFile, |
|
|
|
// '222' |
|
|
|
// ) |
|
|
|
fetch(getBaseUrl() + '/admin-api' + response.data.errorFile) |
|
|
|
.then(res => res.blob()) |
|
|
|
.then(blob => { |
|
|
@ -272,9 +263,6 @@ const submitFormSuccess = (response: any) => { |
|
|
|
a.click(); |
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
}); |
|
|
|
// downloadElement.setAttribute('href', getBaseUrl() + import.meta.env.VITE_API_URL + response.data.errorFile ) |
|
|
|
// 点击下载 |
|
|
|
// downloadElement.click() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
message.success('导入成功') |
|
|
|