forked from github/dataease
fix(数据大屏): 修复分组内图表无法放大问题
This commit is contained in:
parent
8866de1158
commit
4d5cb9194e
@ -274,7 +274,7 @@ const onWrapperClick = e => {
|
|||||||
}
|
}
|
||||||
initOpenHandler(newWindow)
|
initOpenHandler(newWindow)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(t('visualization.url_check_error') + ':' + url)
|
console.warn('url 格式错误:' + url)
|
||||||
}
|
}
|
||||||
} else if (config.value.events.type === 'refreshDataV') {
|
} else if (config.value.events.type === 'refreshDataV') {
|
||||||
useEmitt().emitter.emit('componentRefresh')
|
useEmitt().emitter.emit('componentRefresh')
|
||||||
|
@ -9,7 +9,6 @@ import { groupSizeStyleAdaptor } from '@/utils/style'
|
|||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { canvasStyleData, curComponent } = storeToRefs(dvMainStore)
|
const { canvasStyleData, curComponent } = storeToRefs(dvMainStore)
|
||||||
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
|
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
propValue: {
|
propValue: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { toRefs } from 'vue'
|
import { ref, toRefs } from 'vue'
|
||||||
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
||||||
import { toPercent } from '@/utils/translate'
|
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({
|
const props = defineProps({
|
||||||
propValue: {
|
propValue: {
|
||||||
@ -43,7 +47,6 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const { propValue, dvInfo, searchCount, scale, canvasViewInfo } = toRefs(props)
|
const { propValue, dvInfo, searchCount, scale, canvasViewInfo } = toRefs(props)
|
||||||
|
|
||||||
const customGroupStyle = item => {
|
const customGroupStyle = item => {
|
||||||
return {
|
return {
|
||||||
width: toPercent(item.groupStyle.width),
|
width: toPercent(item.groupStyle.width),
|
||||||
@ -52,6 +55,16 @@ const customGroupStyle = item => {
|
|||||||
left: toPercent(item.groupStyle.left)
|
left: toPercent(item.groupStyle.left)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userViewEnlargeOpen = (opt, item) => {
|
||||||
|
userViewEnlargeRef.value.dialogInit(
|
||||||
|
dvMainStore.canvasStyleData,
|
||||||
|
canvasViewInfo.value[item.id],
|
||||||
|
item,
|
||||||
|
opt,
|
||||||
|
{ scale: scale.value }
|
||||||
|
)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -69,8 +82,10 @@ const customGroupStyle = item => {
|
|||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
:search-count="searchCount"
|
:search-count="searchCount"
|
||||||
:scale="scale"
|
:scale="scale"
|
||||||
|
@userViewEnlargeOpen="userViewEnlargeOpen($event, item)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<user-view-enlarge ref="userViewEnlargeRef"></user-view-enlarge>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user