diff --git a/core/core-frontend/src/router/mobile.ts b/core/core-frontend/src/router/mobile.ts
index 72343698db..a3ea9a8bfe 100644
--- a/core/core-frontend/src/router/mobile.ts
+++ b/core/core-frontend/src/router/mobile.ts
@@ -58,6 +58,20 @@ export const routes: AppRouteRecordRaw[] = [
hidden: true,
meta: {},
component: () => import('@/views/mobile/panel/NotSupport.vue')
+ },
+ {
+ path: '/DashboardEmpty',
+ name: 'DashboardEmpty',
+ hidden: true,
+ meta: {},
+ component: () => import('@/views/mobile/panel/DashboardEmpty.vue')
+ },
+ {
+ path: '/preview',
+ name: 'preview',
+ hidden: true,
+ meta: {},
+ component: () => import('@/views/data-visualization/PreviewCanvasMobile.vue')
}
]
diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
index e50a781ca6..4890dc6b39 100644
--- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
+++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
@@ -35,6 +35,7 @@ export const dvMainStore = defineStore('dataVisualization', {
embeddedCallBack: 'no', // 嵌入模式是否允许反馈参数
editMode: 'preview', // 编辑器模式 edit preview
mobileInPc: false,
+ inMobile: false,
firstLoadMap: [],
canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null },
// 当前展示画布缓存数据
@@ -192,6 +193,9 @@ export const dvMainStore = defineStore('dataVisualization', {
aceSetCanvasData(value) {
this.canvasStyleData = value
},
+ setInMobile(value) {
+ this.inMobile = value
+ },
aceSetCurComponent(value) {
for (let i = 0; i < this.componentData.length; i++) {
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 dea867602a..e74fb4edcf 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
@@ -20,7 +20,7 @@ import { useEmitt } from '@/hooks/web/useEmitt'
import { L7ChartView } from '@/views/chart/components/js/panel/types/impl/l7'
const dvMainStore = dvMainStoreWithOut()
-const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, embeddedCallBack } =
+const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, embeddedCallBack, inMobile } =
storeToRefs(dvMainStore)
const { emitter } = useEmitt()
const props = defineProps({
@@ -328,7 +328,7 @@ const trackClick = trackAction => {
dvMainStore.addViewTrackFilter(linkageParam)
break
case 'jump':
- if (mobileInPc.value) return
+ if (mobileInPc.value && !inMobile.value) return
emit('onJumpClick', jumpParam)
break
default:
@@ -351,7 +351,10 @@ const trackMenu = computed(() => {
jumpCount++
}
})
- jumpCount && view.value?.jumpActive && !mobileInPc.value && trackMenuInfo.push('jump')
+ jumpCount &&
+ view.value?.jumpActive &&
+ (!mobileInPc.value || inMobile.value) &&
+ trackMenuInfo.push('jump')
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
view.value.drillFields.length && trackMenuInfo.push('drill')
// 如果同时配置jump linkage drill 切配置联动时同时下钻 在实际只显示两个 '跳转' '联动和下钻'
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 5ed0625529..5b265206d0 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
@@ -29,8 +29,14 @@ import { useEmitt } from '@/hooks/web/useEmitt'
import { trackBarStyleCheck } from '@/utils/canvasUtils'
const dvMainStore = dvMainStoreWithOut()
-const { nowPanelTrackInfo, nowPanelJumpInfo, mobileInPc, canvasStyleData, embeddedCallBack } =
- storeToRefs(dvMainStore)
+const {
+ nowPanelTrackInfo,
+ nowPanelJumpInfo,
+ mobileInPc,
+ canvasStyleData,
+ embeddedCallBack,
+ inMobile
+} = storeToRefs(dvMainStore)
const { emitter } = useEmitt()
const props = defineProps({
@@ -332,7 +338,7 @@ const trackClick = trackAction => {
dvMainStore.addViewTrackFilter(linkageParam)
break
case 'jump':
- if (mobileInPc.value) return
+ if (mobileInPc.value && !inMobile.value) return
emit('onJumpClick', jumpParam)
break
default:
@@ -356,7 +362,10 @@ const trackMenu = computed(() => {
jumpCount++
}
})
- jumpCount && view.value?.jumpActive && !mobileInPc.value && trackMenuInfo.push('jump')
+ jumpCount &&
+ view.value?.jumpActive &&
+ (!mobileInPc.value || inMobile.value) &&
+ trackMenuInfo.push('jump')
linkageCount && view.value?.linkageActive && trackMenuInfo.push('linkage')
view.value.drillFields.length && trackMenuInfo.push('drill')
// 如果同时配置jump linkage drill 切配置联动时同时下钻 在实际只显示两个 '跳转' '联动和下钻'
diff --git a/core/core-frontend/src/views/data-visualization/PreviewCanvasMobile.vue b/core/core-frontend/src/views/data-visualization/PreviewCanvasMobile.vue
new file mode 100644
index 0000000000..f00d9af9b6
--- /dev/null
+++ b/core/core-frontend/src/views/data-visualization/PreviewCanvasMobile.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/panel/DashboardEmpty.vue b/core/core-frontend/src/views/mobile/panel/DashboardEmpty.vue
new file mode 100644
index 0000000000..ffd51d4f49
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/panel/DashboardEmpty.vue
@@ -0,0 +1,14 @@
+
+ 仪表板未开启移动端,因此无法正常展示
+
+
+
diff --git a/core/core-frontend/src/views/mobile/panel/Mobile.vue b/core/core-frontend/src/views/mobile/panel/Mobile.vue
index c561c5efee..c23f39727b 100644
--- a/core/core-frontend/src/views/mobile/panel/Mobile.vue
+++ b/core/core-frontend/src/views/mobile/panel/Mobile.vue
@@ -53,6 +53,7 @@ const router = useRouter()
let fromPage, cache
onBeforeMount(() => {
dvMainStore.setMobileInPc(true)
+ dvMainStore.setInMobile(true)
const dvId = route.query.dvId as unknown as string
fromPage = route.query.from as unknown as string
cache = route.query.cache as unknown as string
diff --git a/core/core-frontend/src/views/share/link/mobile.vue b/core/core-frontend/src/views/share/link/mobile.vue
index 156e2a394b..6e3d55be11 100644
--- a/core/core-frontend/src/views/share/link/mobile.vue
+++ b/core/core-frontend/src/views/share/link/mobile.vue
@@ -3,22 +3,13 @@
-
+