diff --git a/.gitignore b/.gitignore index 848638a9..2554533b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ pnpm-debug auto-*.d.ts .idea .history +.omc/ diff --git a/src/views/prison/evaluation-report/report/CreateReportOutput.vue b/src/views/prison/evaluation-report/report/CreateReportOutput.vue index 97bf2fbf..fb1c7a81 100644 --- a/src/views/prison/evaluation-report/report/CreateReportOutput.vue +++ b/src/views/prison/evaluation-report/report/CreateReportOutput.vue @@ -92,8 +92,10 @@ const open = async (id: number, prisonerId?: number) => { reportId.value = id dialogVisible.value = true await loadReportDetail(id) + // 等待视图渲染完成,避免导出时 DOM 仍为空 + await nextTick() try { - exportToWord() + await exportToWord() } catch { } finally { handleClose()