mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(图表): 修复含有地图数据的仪表板以及大屏,导出应用模版和样式模版,snapshop快照中地图缺失的问题 #17051
This commit is contained in:
committed by
jianneng-fit2cloud
parent
b608d8f76b
commit
b2afdad156
@@ -189,6 +189,11 @@ const checkTemplate = () => {
|
||||
|
||||
const fileDownload = (downloadType, attachParams) => {
|
||||
downloadStatus.value = true
|
||||
const mapElementIds =
|
||||
state.canvasDataPreview
|
||||
?.filter(ele => mapChartTypes.includes(ele.innerType))
|
||||
.map(ele => ele.id) || []
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-prepare-picture', id))
|
||||
nextTick(() => {
|
||||
const vueDom = previewCanvasContainer.value.querySelector('.canvas-container')
|
||||
download2AppTemplate(downloadType, vueDom, state.dvInfo.name, attachParams, () => {
|
||||
@@ -198,6 +203,7 @@ const fileDownload = (downloadType, attachParams) => {
|
||||
type: state.dvInfo.type === 'dashboard' ? 'panel' : 'screen'
|
||||
}
|
||||
downloadType === 'app' ? exportLogApp(param) : exportLogTemplate(param)
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-unprepare-picture', id))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -119,9 +119,15 @@ const loadCanvasData = (dvId, weight?, ext?) => {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// 地图类图表,需要预先准备图片
|
||||
const mapChartTypes = ['bubble-map', 'flow-map', 'heat-map', 'map', 'symbolic-map']
|
||||
const download = type => {
|
||||
downloadStatus.value = true
|
||||
const mapElementIds =
|
||||
state.canvasDataPreview
|
||||
?.filter(ele => mapChartTypes.includes(ele.innerType))
|
||||
.map(ele => ele.id) || []
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-prepare-picture', id))
|
||||
setTimeout(() => {
|
||||
const vueDom = previewCanvasContainer.value.querySelector('.canvas-container')
|
||||
downloadCanvas2(type, vueDom, state.dvInfo.name, () => {
|
||||
@@ -131,12 +137,17 @@ const download = type => {
|
||||
type: state.dvInfo.type === 'dashboard' ? 'panel' : 'screen'
|
||||
}
|
||||
type === 'img' ? exportLogImg(param) : exportLogPDF(param)
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-unprepare-picture', id))
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
|
||||
const fileDownload = (downloadType, attachParams) => {
|
||||
downloadStatus.value = true
|
||||
const mapElementIds =
|
||||
state.canvasDataPreview
|
||||
?.filter(ele => mapChartTypes.includes(ele.innerType))
|
||||
.map(ele => ele.id) || []
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-prepare-picture', id))
|
||||
nextTick(() => {
|
||||
const vueDom = previewCanvasContainer.value.querySelector('.canvas-container')
|
||||
download2AppTemplate(downloadType, vueDom, state.dvInfo.name, attachParams, () => {
|
||||
@@ -146,6 +157,7 @@ const fileDownload = (downloadType, attachParams) => {
|
||||
type: state.dvInfo.type === 'dashboard' ? 'panel' : 'screen'
|
||||
}
|
||||
downloadType === 'app' ? exportLogApp(param) : exportLogTemplate(param)
|
||||
mapElementIds.forEach(id => useEmitt().emitter.emit('l7-unprepare-picture', id))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user