导入导出

This commit is contained in:
yaojian
2026-03-06 11:49:01 +08:00
parent 9bbfc6e736
commit c70f302247
16 changed files with 1663 additions and 237 deletions

View File

@@ -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('模板下载失败,请先维护模板文件');
}
};