forked from github/dataease
fix(数据大屏): 修复分组内图表无法放大问题
This commit is contained in:
parent
8866de1158
commit
4d5cb9194e
@ -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')
|
||||
|
@ -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