|
|
@ -218,7 +218,7 @@ const resetFields = (formEl: FormInstance | undefined) => { |
|
|
|
|
|
|
|
|
//20250117 李文轩 二维码表格 |
|
|
//20250117 李文轩 二维码表格 |
|
|
const qrCodesPrintDialogFlag = ref(false) |
|
|
const qrCodesPrintDialogFlag = ref(false) |
|
|
const tableRefs = reactive({}); |
|
|
let tableRefs = reactive({}); |
|
|
const tablesData = ref({}) |
|
|
const tablesData = ref({}) |
|
|
function getDetailQrCodes(val:any) { |
|
|
function getDetailQrCodes(val:any) { |
|
|
return request({ |
|
|
return request({ |
|
|
@ -256,6 +256,7 @@ async function downloadTables() { |
|
|
}); |
|
|
}); |
|
|
//ElMessage('This is a message.') |
|
|
//ElMessage('This is a message.') |
|
|
const zip = new JSZip(); |
|
|
const zip = new JSZip(); |
|
|
|
|
|
console.log(tableRefs) |
|
|
for (const [tableKey, element] of Object.entries(tableRefs)) { |
|
|
for (const [tableKey, element] of Object.entries(tableRefs)) { |
|
|
try { |
|
|
try { |
|
|
const canvas = await html2canvas(element); |
|
|
const canvas = await html2canvas(element); |
|
|
@ -286,8 +287,14 @@ async function downloadTables() { |
|
|
link.download = fileName; |
|
|
link.download = fileName; |
|
|
loadingInstance.close() |
|
|
loadingInstance.close() |
|
|
link.click(); |
|
|
link.click(); |
|
|
|
|
|
tableRefs = {} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
function closeQrDownload(){ |
|
|
|
|
|
qrCodesPrintDialogFlag.value = false |
|
|
|
|
|
tableRefs = {} |
|
|
|
|
|
console.log(tableRefs) |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
@ 作者: 秦东 |
|
|
@ 作者: 秦东 |
|
|
@ 时间: 2024-04-01 11:36:07 |
|
|
@ 时间: 2024-04-01 11:36:07 |
|
|
@ -1657,8 +1664,8 @@ const diGuiJilian = (val: any, options: any[]) => { |
|
|
</div> |
|
|
</div> |
|
|
<template #footer> |
|
|
<template #footer> |
|
|
<div class="dialog-footer"> |
|
|
<div class="dialog-footer"> |
|
|
<el-button type="primary" plain @click="downloadTables">下载</el-button> |
|
|
<!-- <el-button type="primary" plain @click="downloadTables">下载</el-button> --> |
|
|
<el-button type="primary" plain @click="qrCodesPrintDialogFlag = false"> |
|
|
<el-button type="primary" plain @click="closeQrDownload"> |
|
|
确定 |
|
|
确定 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
|