fix(evaluation-report): 等待导出视图渲染完成
This commit is contained in:
parent
e8aefff16b
commit
3198ad6131
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ pnpm-debug
|
|||||||
auto-*.d.ts
|
auto-*.d.ts
|
||||||
.idea
|
.idea
|
||||||
.history
|
.history
|
||||||
|
.omc/
|
||||||
|
|||||||
@ -92,8 +92,10 @@ const open = async (id: number, prisonerId?: number) => {
|
|||||||
reportId.value = id
|
reportId.value = id
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
await loadReportDetail(id)
|
await loadReportDetail(id)
|
||||||
|
// 等待视图渲染完成,避免导出时 DOM 仍为空
|
||||||
|
await nextTick()
|
||||||
try {
|
try {
|
||||||
exportToWord()
|
await exportToWord()
|
||||||
} catch {
|
} catch {
|
||||||
} finally {
|
} finally {
|
||||||
handleClose()
|
handleClose()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user