From 4254a9ea2b23cf5751ca58965679b963215bfa5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Fri, 5 Jun 2026 11:30:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=8B=E9=92=BB=E6=9C=80=E5=90=8E=E4=B8=80=E5=B1=82=E5=90=8E?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=B8=8B=E9=92=BB=E6=B2=A1=E6=9C=89=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/indicator/DeIndicator.vue | 6 ++++++ .../components/views/components/ChartComponentG2Plot.vue | 6 ++++++ .../chart/components/views/components/ChartComponentS2.vue | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/custom-component/indicator/DeIndicator.vue b/core/core-frontend/src/custom-component/indicator/DeIndicator.vue index c1ebbd4504..bb5a414e42 100644 --- a/core/core-frontend/src/custom-component/indicator/DeIndicator.vue +++ b/core/core-frontend/src/custom-component/indicator/DeIndicator.vue @@ -15,6 +15,8 @@ import { valueFormatter } from '@/views/chart/components/js/formatter' import { storeToRefs } from 'pinia' import { isDashboard, trackBarStyleCheck } from '@/utils/canvasUtils' import ViewTrackBar from '@/components/visualization/ViewTrackBar.vue' +import { hasNextDrillLevel } from '@/views/chart/components/views/util/drill' +import { ElMessage } from 'element-plus-secondary' const props = defineProps({ // 公共参数集 @@ -522,6 +524,10 @@ const action = param => { pointClickTrans() // 联动 跳转 if (trackMenu.value.length < 2) { + if (view.value.drillFields.length > 0 && trackMenu.value.length === 0) { + ElMessage.error(t('chart.last_layer')) + return + } // 只有一个事件直接调用 trackClick(trackMenu.value[0]) } else { diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue index db83b17dd0..45393556ff 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentG2Plot.vue @@ -30,6 +30,8 @@ import { L7ChartView } from '@/views/chart/components/js/panel/types/impl/l7' import { useI18n } from '@/hooks/web/useI18n' import { ExportImage } from '@antv/l7' import { configEmptyDataStyle } from '@/views/chart/components/js/panel/common/common_antv' +import { hasNextDrillLevel } from '@/views/chart/components/views/util/drill' +import { ElMessage } from 'element-plus-secondary' const { t } = useI18n() const dvMainStore = dvMainStoreWithOut() const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, embeddedCallBack, inMobile } = @@ -490,6 +492,10 @@ const action = param => { group: state.pointParam.data.group ? state.pointParam.data.group : 'NO_DATA' } if (trackMenu.value.length < 2) { + if (view.value.drillFields.length > 0 && trackMenu.value.length === 0) { + ElMessage.error(t('chart.last_layer')) + return + } // 只有一个事件直接调用 trackClick(trackMenu.value[0]) } else { 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 0af0b65e23..1ed440ea17 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 @@ -21,7 +21,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' import ViewTrackBar from '@/components/visualization/ViewTrackBar.vue' import { storeToRefs } from 'pinia' import { S2ChartView } from '@/views/chart/components/js/panel/types/impl/s2' -import { ElPagination } from 'element-plus-secondary' +import { ElMessage, ElPagination } from 'element-plus-secondary' import ChartError from '@/views/chart/components/views/components/ChartError.vue' import { defaultsDeep, cloneDeep, debounce } from 'lodash-es' import { BASE_VIEW_CONFIG } from '../../editor/util/chart' @@ -388,6 +388,10 @@ const action = param => { pointClickTrans() // 下钻 联动 跳转 if (trackMenu.value.length < 2) { + if (view.value.drillFields.length > 0 && trackMenu.value.length === 0) { + ElMessage.error(t('chart.last_layer')) + return + } // 只有一个事件直接调用 trackClick(trackMenu.value[0]) } else {