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 {