导入导出
This commit is contained in:
@@ -106,11 +106,13 @@ const downExcelTemp = async () => {
|
||||
window.URL.revokeObjectURL(url);
|
||||
document.body.removeChild(link);
|
||||
} else {
|
||||
// 使用后端接口下载
|
||||
const fileName = prop.tempUrl?.split('/').pop() || 'template.xlsx';
|
||||
// 使用后端接口下载,文件名使用导入功能名称
|
||||
const title = prop.title?.replace('导入', '') || '导入模板';
|
||||
const fileName = `${title}模板.xlsx`;
|
||||
await other.downBlobFile(other.adaptationUrl(prop.tempUrl), {}, fileName);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('模板下载失败:', error);
|
||||
useMessage().error('模板下载失败,请先维护模板文件');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user