forked from github/dataease
Merge pull request #3876 from dataease/pr@dev@fix_link_down_pdf
fix(公共链接): 导出pdf出现loading
This commit is contained in:
commit
c86c94a372
@ -623,17 +623,28 @@ export default {
|
|||||||
|
|
||||||
document.getElementById('preview-canvas-main').style.height = (scrollHeight + 'px')
|
document.getElementById('preview-canvas-main').style.height = (scrollHeight + 'px')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(document.getElementById(domId)).then(canvas => {
|
const timer = setInterval(() => {
|
||||||
const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量
|
const containerDom = document.getElementById(domId)
|
||||||
this.dataLoading = false
|
const masks = containerDom.getElementsByClassName('el-loading-mask')
|
||||||
this.$emit('change-load-status', false)
|
const mapLoadingArr = containerDom.getElementsByClassName('.symbol-map-loading')
|
||||||
this.exporting = false
|
if (masks?.length) {
|
||||||
this.backScreenShot = false
|
const hideMasks = [...masks].filter(item => item.style?.display === 'none')
|
||||||
if (snapshot !== '') {
|
if (masks.length === hideMasks.length && !mapLoadingArr?.length) {
|
||||||
this.snapshotInfo = snapshot
|
html2canvas(containerDom).then(canvas => {
|
||||||
this.pdfExportShow = true
|
const snapshot = canvas.toDataURL('image/jpeg', 1) // 是图片质量
|
||||||
|
this.dataLoading = false
|
||||||
|
this.$emit('change-load-status', false)
|
||||||
|
this.exporting = false
|
||||||
|
this.backScreenShot = false
|
||||||
|
if (snapshot !== '') {
|
||||||
|
this.snapshotInfo = snapshot
|
||||||
|
this.pdfExportShow = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
clearInterval(timer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
}, 1000)
|
||||||
}, 2500)
|
}, 2500)
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user