diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index b196979682..512deeccfc 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -71,12 +71,17 @@ const props = defineProps({ terminal: { type: String, default: 'pc' + }, + drillLength: { + type: Number, + required: false, + default: 0 } }) const emit = defineEmits(['onPointClick', 'onChartClick', 'onDrillFilters', 'onJumpClick']) -const { view, showPosition, scale, terminal } = toRefs(props) +const { view, showPosition, scale, terminal, drillLength } = toRefs(props) const isError = ref(false) const errMsg = ref('') @@ -458,6 +463,7 @@ const trackMenuCalc = itemId => { } let linkageCount = 0 let jumpCount = 0 + let drillCount = 0 const sourceInfo = view.value.id + '#' + itemId if (nowPanelTrackInfo.value[sourceInfo]) { linkageCount++ @@ -470,7 +476,11 @@ const trackMenuCalc = itemId => { (!mobileInPc.value || inMobile.value) && trackMenuInfo.push('jump') linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage') - view.value.drillFields.length && trackMenuInfo.push('drill') + // 判断是否有下钻 同时判断下钻到第几层 + if (view.value.drillFields.length && view.value.drillFields[drillLength.value].id === itemId) { + drillCount++ + } + drillCount && trackMenuInfo.push('drill') // 如果同时配置jump linkage drill 切配置联动时同时下钻 在实际只显示两个 '跳转' '联动和下钻' if (trackMenuInfo.length === 3 && props.element.actionSelection.linkageActive === 'auto') { trackMenuInfo = ['jump', 'linkageAndDrill'] diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index 1abc251bb9..d27b719c85 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -152,6 +152,8 @@ const state = reactive({ drillClickDimensionList: [] }) +const drillClickLength = computed(() => state.drillClickDimensionList.length) + const titleAlign = computed(() => { if (!titleShow.value) { return 'flex-start' @@ -911,6 +913,7 @@ const loadPluginCategory = data => { :scale="scale" :show-position="showPosition" :element="element" + :drill-length="drillClickLength" v-else-if="showChartView(ChartLibraryType.S2)" ref="chartComponent" @onPointClick="onPointClick"