forked from github/dataease
commit
c08a334d5a
@ -5,7 +5,7 @@ import ScrollCfg from '@/views/chart/components/editor/editor-senior/components/
|
||||
import AssistLine from '@/views/chart/components/editor/editor-senior/components/AssistLine.vue'
|
||||
import Threshold from '@/views/chart/components/editor/editor-senior/components/Threshold.vue'
|
||||
import CollapseSwitchItem from '@/components/collapse-switch-item/src/CollapseSwitchItem.vue'
|
||||
import { computed, PropType, ref, toRefs, watch } from 'vue'
|
||||
import { computed, PropType, ref, toRefs, watch, onMounted } from 'vue'
|
||||
import LinkJumpSet from '@/components/visualization/LinkJumpSet.vue'
|
||||
import LinkageSet from '@/components/visualization/LinkageSet.vue'
|
||||
import { canvasSave } from '@/utils/canvasUtils'
|
||||
@ -172,6 +172,10 @@ const linkageActiveChange = () => {
|
||||
dvMainStore.setNowPanelTrackInfo(rsp.data)
|
||||
})
|
||||
}
|
||||
const isDataEaseBi = ref(false)
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -298,7 +302,7 @@ const linkageActiveChange = () => {
|
||||
</div>
|
||||
</collapse-switch-item>
|
||||
<collapse-switch-item
|
||||
v-if="showProperties('jump-set')"
|
||||
v-if="showProperties('jump-set') && !isDataEaseBi"
|
||||
:themes="themes"
|
||||
name="jumpSet"
|
||||
:title="'跳转设置'"
|
||||
|
@ -131,6 +131,7 @@ const renderG2Plot = (chart, chartView: G2PlotChartView<any, any>) => {
|
||||
|
||||
const dynamicAreaId = ref('')
|
||||
const country = ref('')
|
||||
const isDataEaseBi = ref(false)
|
||||
let mapTimer
|
||||
const renderL7Plot = (chart, chartView: L7PlotChartView<any, any>) => {
|
||||
const map = parseJson(chart.customAttr).map
|
||||
@ -205,6 +206,7 @@ const trackClick = trackAction => {
|
||||
dvMainStore.addViewTrackFilter(linkageParam)
|
||||
break
|
||||
case 'jump':
|
||||
if (isDataEaseBi.value) return
|
||||
emit('onJumpClick', jumpParam)
|
||||
break
|
||||
default:
|
||||
@ -227,7 +229,7 @@ const trackMenu = computed(() => {
|
||||
jumpCount++
|
||||
}
|
||||
})
|
||||
jumpCount && view.value?.jumpActive && trackMenuInfo.push('jump')
|
||||
jumpCount && view.value?.jumpActive && !isDataEaseBi.value && trackMenuInfo.push('jump')
|
||||
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
|
||||
view.value.drillFields.length && trackMenuInfo.push('drill')
|
||||
}
|
||||
@ -242,6 +244,7 @@ defineExpose({
|
||||
let resizeObserver
|
||||
const TOLERANCE = 0.01
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
const containerDom = document.getElementById(containerId)
|
||||
const { offsetWidth, offsetHeight } = containerDom
|
||||
const preSize = [offsetWidth, offsetHeight]
|
||||
|
@ -222,6 +222,8 @@ const action = param => {
|
||||
}
|
||||
}
|
||||
|
||||
const isDataEaseBi = ref(false)
|
||||
|
||||
const trackClick = trackAction => {
|
||||
const param = state.pointParam
|
||||
if (!param?.data?.dimensionList) {
|
||||
@ -250,6 +252,7 @@ const trackClick = trackAction => {
|
||||
dvMainStore.addViewTrackFilter(linkageParam)
|
||||
break
|
||||
case 'jump':
|
||||
if (isDataEaseBi.value) return
|
||||
emit('onJumpClick', jumpParam)
|
||||
break
|
||||
default:
|
||||
@ -273,7 +276,7 @@ const trackMenu = computed(() => {
|
||||
jumpCount++
|
||||
}
|
||||
})
|
||||
jumpCount && view.value?.jumpActive && trackMenuInfo.push('jump')
|
||||
jumpCount && view.value?.jumpActive && !isDataEaseBi.value && trackMenuInfo.push('jump')
|
||||
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
|
||||
view.value.drillFields.length && trackMenuInfo.push('drill')
|
||||
return trackMenuInfo
|
||||
@ -301,6 +304,7 @@ const preSize = [0, 0]
|
||||
const TOLERANCE = 1
|
||||
let resizeObserver
|
||||
onMounted(() => {
|
||||
isDataEaseBi.value = !!window.DataEaseBi
|
||||
resizeObserver = new ResizeObserver(([entry] = []) => {
|
||||
const [size] = entry.borderBoxSize || []
|
||||
// 拖动的时候宽高重新计算,误差范围内不重绘,误差先设置为1
|
||||
|
@ -268,7 +268,7 @@ const getSQLPreview = () => {
|
||||
sqlVariableDetails: JSON.stringify(state.variables)
|
||||
})
|
||||
.then(res => {
|
||||
state.plxTableData = res.data.data.map((ele, index) => ({ ...ele, id: index }))
|
||||
state.plxTableData = res.data.data
|
||||
state.fields = generateColumns(res.data.fields)
|
||||
})
|
||||
.finally(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user