forked from github/dataease
Merge pull request #12301 from dataease/pr@dev-v2@fix_export
Pr@dev v2@fix export
This commit is contained in:
commit
391dc4440c
@ -274,7 +274,7 @@ const onWrapperClick = e => {
|
||||
}
|
||||
initOpenHandler(newWindow)
|
||||
} catch (e) {
|
||||
console.warn(t('visualization.url_check_error') + ':' + url)
|
||||
console.warn('url 格式错误:' + url)
|
||||
}
|
||||
} else if (config.value.events.type === 'refreshDataV') {
|
||||
useEmitt().emitter.emit('componentRefresh')
|
||||
|
@ -146,6 +146,7 @@ import { exportPivotExcel } from '@/views/chart/components/js/panel/common/commo
|
||||
import { useRequestStoreWithOut } from '@/store/modules/request'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
import { activeWatermarkCheckUser } from '@/components/watermark/watermark'
|
||||
import { getCanvasStyle } from '@/utils/style'
|
||||
const downLoading = ref(false)
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const dialogShow = ref(false)
|
||||
@ -208,14 +209,14 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||
const authShow = computed(() => editMode.value === 'edit' || dvInfo.value.weight > 3)
|
||||
|
||||
const customExport = computed(() => {
|
||||
const style = canvasStyleData.value ? getCanvasStyle(canvasStyleData.value, 'canvas-main') : {}
|
||||
if (downLoading.value) {
|
||||
const bashStyle = pixel.value.split(' * ')
|
||||
return {
|
||||
width: bashStyle[0] + 'px!important',
|
||||
height: bashStyle[1] + 'px!important'
|
||||
}
|
||||
style['width'] = bashStyle[0] + 'px!important'
|
||||
style['height'] = bashStyle[1] + 'px!important'
|
||||
return style
|
||||
} else {
|
||||
return {}
|
||||
return style
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -9,7 +9,6 @@ import { groupSizeStyleAdaptor } from '@/utils/style'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { canvasStyleData, curComponent } = storeToRefs(dvMainStore)
|
||||
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
|
||||
|
||||
const props = defineProps({
|
||||
propValue: {
|
||||
type: Array,
|
||||
|
@ -1,7 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { toRefs } from 'vue'
|
||||
import { ref, toRefs } from 'vue'
|
||||
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
||||
import { toPercent } from '@/utils/translate'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import UserViewEnlarge from '@/components/visualization/UserViewEnlarge.vue'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const userViewEnlargeRef = ref(null)
|
||||
|
||||
const props = defineProps({
|
||||
propValue: {
|
||||
@ -43,7 +47,6 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const { propValue, dvInfo, searchCount, scale, canvasViewInfo } = toRefs(props)
|
||||
|
||||
const customGroupStyle = item => {
|
||||
return {
|
||||
width: toPercent(item.groupStyle.width),
|
||||
@ -52,6 +55,16 @@ const customGroupStyle = item => {
|
||||
left: toPercent(item.groupStyle.left)
|
||||
}
|
||||
}
|
||||
|
||||
const userViewEnlargeOpen = (opt, item) => {
|
||||
userViewEnlargeRef.value.dialogInit(
|
||||
dvMainStore.canvasStyleData,
|
||||
canvasViewInfo.value[item.id],
|
||||
item,
|
||||
opt,
|
||||
{ scale: scale.value }
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -69,8 +82,10 @@ const customGroupStyle = item => {
|
||||
:show-position="showPosition"
|
||||
:search-count="searchCount"
|
||||
:scale="scale"
|
||||
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
||||
/>
|
||||
</div>
|
||||
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user