mirror of
https://github.com/dataease/dataease.git
synced 2026-06-17 04:51:43 +08:00
fix(图表): 修复下钻最后一层后继续下钻没有提示
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user