This commit is contained in:
2025-09-08 09:49:11 +08:00
2 changed files with 24 additions and 17 deletions

View File

@ -645,22 +645,29 @@ const getVolumeFileList = async (type) => {
}
};
const exportFile = () => {
// 导出模版文件
try {
// 创建a标签
const link = document.createElement('a');
// 设置PDF文件路径 - 相对于public目录
link.href = '/catalog.xlsx';
// 设置下载后的文件名
link.download = '设计出图计划导入模版.xlsx';
// 触发点击
document.body.appendChild(link);
link.click();
// 清理
document.body.removeChild(link);
} catch (error) {
alert('下载失败,请重试');
}
proxy?.download(
'/design/volumeCatalog/exportExcel',
{
projectId: currentProject.value?.id
},
`设计出图计划导入模版.xlsx`
);
// // 导出模版文件
// try {
// // 创建a标签
// const link = document.createElement('a');
// // 设置PDF文件路径 - 相对于public目录
// link.href = '/catalog.xlsx';
// // 设置下载后的文件名
// link.download = '设计出图计划导入模版.xlsx';
// // 触发点击
// document.body.appendChild(link);
// link.click();
// // 清理
// document.body.removeChild(link);
// } catch (error) {
// alert('下载失败,请重试');
// }
};
// 切换
const handleClick = (val) => {