From c7f7bf6120cad215184f625800acf66e607de01f Mon Sep 17 00:00:00 2001 From: yangk Date: Mon, 25 May 2026 11:05:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(timesheetPreAlloc):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=88=86=E9=85=8D=E6=98=8E=E7=BB=86=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在界面中新增导出分配明细按钮 - 实现 handleExportDetail 方法处理明细导出逻辑 - 支持选中数据时仅导出选中项的分配明细 - 添加时间戳确保导出文件名唯一性 - 集成权限控制以保护导出功能访问 --- src/views/oa/erp/timesheetPreAlloc/index.vue | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/views/oa/erp/timesheetPreAlloc/index.vue b/src/views/oa/erp/timesheetPreAlloc/index.vue index 3baf36d..7e1e0c2 100644 --- a/src/views/oa/erp/timesheetPreAlloc/index.vue +++ b/src/views/oa/erp/timesheetPreAlloc/index.vue @@ -66,7 +66,12 @@ - 导出 + 导出 + + + + 导出分配明细 + @@ -632,6 +637,18 @@ const handleExport = () => { ); }; +const handleExportDetail = () => { + proxy?.download( + 'oa/erp/timesheetPreAlloc/exportDetail', + { + ...queryParams.value, + // 如果选中了数据,则只导出选中的数据的分配明细 + allocIds: ids.value.length > 0 ? ids.value.join(',') : undefined + }, + `timesheetPreAllocDetail_${new Date().getTime()}.xlsx` + ); +}; + onMounted(async () => { await Promise.all([loadTargetProjectOptions(), loadQuerySourceProjectOptions()]); await getList();