mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix(仪表板、数据大屏): 修复iframe嵌入图表没有明细下载问题
This commit is contained in:
committed by
xuwei-fit2cloud
parent
2c7f0ebdd4
commit
05efed5052
@@ -363,7 +363,7 @@ const {
|
||||
canvasViewInfo,
|
||||
mobileInPc,
|
||||
dvInfo,
|
||||
isIframe,
|
||||
isPopWindow,
|
||||
hiddenListStatus
|
||||
} = storeToRefs(dvMainStore)
|
||||
|
||||
@@ -634,7 +634,7 @@ const initCurFields = () => {
|
||||
}
|
||||
|
||||
const showDownload = computed(
|
||||
() => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template' && !isIframe.value
|
||||
() => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template' && !isPopWindow.value
|
||||
)
|
||||
// 富文本-End
|
||||
|
||||
|
||||
@@ -43,7 +43,11 @@ const dialogStyle = computed(() => {
|
||||
})
|
||||
|
||||
const previewInit = params => {
|
||||
state.url = params.url
|
||||
if (params.url.includes('?')) {
|
||||
state.url = `${params.url}&popWindow=true`
|
||||
} else {
|
||||
state.url = `${params.url}&popWindow=true`
|
||||
}
|
||||
if (params.size === 'large') {
|
||||
state.fullscreen = true
|
||||
} else if (params.size === 'middle') {
|
||||
|
||||
@@ -197,7 +197,8 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
dataPrepareState: false, //数据准备状态
|
||||
multiplexingStyleAdapt: true, //复用样式跟随主题
|
||||
mainScrollTop: 0, //主画布运动量
|
||||
isIframe: false // 当前是否在iframe中
|
||||
isIframe: false, // 当前是否在iframe中
|
||||
isPopWindow: false // 当前是否在iframe弹框中
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -211,6 +212,9 @@ export const dvMainStore = defineStore('dataVisualization', {
|
||||
setIframeFlag(value) {
|
||||
this.isIframe = value
|
||||
},
|
||||
setIsPopWindow(value) {
|
||||
this.isPopWindow = value
|
||||
},
|
||||
setCanvasAttachInfo(value) {
|
||||
this.canvasAttachInfo = value
|
||||
},
|
||||
|
||||
@@ -177,8 +177,10 @@ onMounted(async () => {
|
||||
const dvId = embeddedStore.dvId || router.currentRoute.value.query.dvId
|
||||
// 检查外部参数
|
||||
const ignoreParams = router.currentRoute.value.query.ignoreParams === 'true'
|
||||
const isPopWindow = router.currentRoute.value.query.popWindow === 'true'
|
||||
const isFrameFlag = window.self !== window.top
|
||||
dvMainStore.setIframeFlag(isFrameFlag)
|
||||
dvMainStore.setIsPopWindow(isPopWindow)
|
||||
const { dvType, callBackFlag, taskId, showWatermark } = router.currentRoute.value.query
|
||||
if (!!taskId) {
|
||||
dvMainStore.setCanvasAttachInfo({ taskId, showWatermark })
|
||||
|
||||
Reference in New Issue
Block a user