将右侧的字段拖拽到这里 或 点击
-
+
添加查询条件
diff --git a/core/core-frontend/src/pages/mobile/App.vue b/core/core-frontend/src/pages/mobile/App.vue
new file mode 100644
index 0000000000..c5b3d681cf
--- /dev/null
+++ b/core/core-frontend/src/pages/mobile/App.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/core/core-frontend/src/pages/mobile/main.ts b/core/core-frontend/src/pages/mobile/main.ts
new file mode 100644
index 0000000000..9d1af0c023
--- /dev/null
+++ b/core/core-frontend/src/pages/mobile/main.ts
@@ -0,0 +1,28 @@
+import { createApp } from 'vue'
+import '../../assets/font/index.css'
+import '@/style/index.less'
+import '@/plugins/svg-icon'
+import 'normalize.css/normalize.css'
+import App from './App.vue'
+import { setupI18n } from '@/plugins/vue-i18n'
+import { setupStore } from '@/store'
+import { setupRouter } from '@/router/mobile'
+import { setupElementPlus, setupElementPlusIcons } from '@/plugins/element-plus'
+// 注册数据大屏组件
+import { setupCustomComponent } from '@/custom-component'
+import { installDirective } from '@/directive'
+import '@/utils/DateUtil'
+import '@/permissionMobile'
+const setupAll = async () => {
+ const app = createApp(App)
+ installDirective(app)
+ await setupI18n(app)
+ setupStore(app)
+ setupRouter(app)
+ setupElementPlus(app)
+ setupCustomComponent(app)
+ setupElementPlusIcons(app)
+ app.mount('#app')
+}
+
+setupAll()
diff --git a/core/core-frontend/src/permissionMobile.ts b/core/core-frontend/src/permissionMobile.ts
new file mode 100644
index 0000000000..79a5d90835
--- /dev/null
+++ b/core/core-frontend/src/permissionMobile.ts
@@ -0,0 +1,44 @@
+import router from './router/mobile'
+import { useUserStoreWithOut } from '@/store/modules/user'
+import { useNProgress } from '@/hooks/web/useNProgress'
+import { usePageLoading } from '@/hooks/web/usePageLoading'
+import { useCache } from '@/hooks/web/useCache'
+import { getRoleRouters } from '@/api/common'
+import { usePermissionStoreWithOut } from '@/store/modules/permission'
+import { interactiveStoreWithOut } from '@/store/modules/interactive'
+const permissionStore = usePermissionStoreWithOut()
+const { wsCache } = useCache()
+const userStore = useUserStoreWithOut()
+
+const { start, done } = useNProgress()
+const interactiveStore = interactiveStoreWithOut()
+
+const { loadStart, loadDone } = usePageLoading()
+
+router.beforeEach(async (to, _, next) => {
+ start()
+ loadStart()
+ if (wsCache.get('user.token')) {
+ if (!userStore.getUid) {
+ await userStore.setUser()
+ }
+ if (to.path === '/login') {
+ next({ path: '/index' })
+ } else {
+ const roleRouters = (await getRoleRouters()) || []
+ const routers: any[] = roleRouters as AppCustomRouteRecordRaw[]
+ routers.forEach(item => (item['top'] = true))
+ await permissionStore.generateRoutes(routers as AppCustomRouteRecordRaw[])
+ permissionStore.setIsAddRouters(true)
+ await interactiveStore.initInteractive(true)
+ next()
+ }
+ } else {
+ next('/login') // 否则全部重定向到登录页
+ }
+})
+
+router.afterEach(() => {
+ done()
+ loadDone()
+})
diff --git a/core/core-frontend/src/router/mobile.ts b/core/core-frontend/src/router/mobile.ts
new file mode 100644
index 0000000000..4bdfd964ea
--- /dev/null
+++ b/core/core-frontend/src/router/mobile.ts
@@ -0,0 +1,45 @@
+import { createRouter, createWebHashHistory } from 'vue-router'
+import type { RouteRecordRaw } from 'vue-router'
+import type { App } from 'vue'
+
+export const routes: AppRouteRecordRaw[] = [
+ {
+ path: '/',
+ name: '/',
+ redirect: '/index',
+ hidden: true,
+ meta: {}
+ },
+ {
+ path: '/index',
+ name: 'index',
+ component: () => import('@/views/mobile/index.vue'),
+ hidden: true,
+ meta: {}
+ },
+ {
+ path: '/login',
+ name: 'login',
+ hidden: true,
+ meta: {},
+ component: () => import('@/views/mobile/login/index.vue')
+ },
+ {
+ path: '/panel',
+ name: 'panel',
+ hidden: true,
+ meta: {},
+ component: () => import('@/views/mobile/panel/index.vue')
+ }
+]
+
+const router = createRouter({
+ history: createWebHashHistory(),
+ routes: routes as RouteRecordRaw[]
+})
+
+export const setupRouter = (app: App
) => {
+ app.use(router)
+}
+
+export default router
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 0ed6f0c9ea..199ea5864d 100644
--- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
+++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts
@@ -29,6 +29,7 @@ export const dvMainStore = defineStore('dataVisualization', {
datasetAreaCollapse: false
},
editMode: 'edit', // 编辑器模式 edit preview
+ mobileInPc: false,
canvasStyleData: { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null },
// 当前展示画布缓存数据
componentDataCache: null,
@@ -196,6 +197,9 @@ export const dvMainStore = defineStore('dataVisualization', {
setEditMode(mode) {
this.editMode = mode
},
+ setMobileInPc(mobileInPc) {
+ this.mobileInPc = mobileInPc
+ },
setInEditorStatus(status) {
this.isInEditor = status
diff --git a/core/core-frontend/src/store/modules/permission.ts b/core/core-frontend/src/store/modules/permission.ts
index 5aca217d58..94f9d0092d 100644
--- a/core/core-frontend/src/store/modules/permission.ts
+++ b/core/core-frontend/src/store/modules/permission.ts
@@ -104,6 +104,7 @@ const hasCurrentRouter = (locations, routers, index) => {
kids = router.children
return router.path === location || '/' + location === router.path
})
+
if (isvalid && index < locations.length - 1) {
return hasCurrentRouter(locations, kids, index + 1)
}
diff --git a/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue
new file mode 100644
index 0000000000..afa589bd54
--- /dev/null
+++ b/core/core-frontend/src/views/dashboard/MobileConfigPanel.vue
@@ -0,0 +1,205 @@
+
+
+
+
+
+
+
+
+
+
+
{{ dvInfo.name }}
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue
index 5006c219e1..43a016d28b 100644
--- a/core/core-frontend/src/views/dashboard/index.vue
+++ b/core/core-frontend/src/views/dashboard/index.vue
@@ -5,6 +5,8 @@ import { storeToRefs } from 'pinia'
import findComponent from '../../utils/components'
import DvSidebar from '../../components/visualization/DvSidebar.vue'
import router from '@/router'
+import MobileConfigPanel from './MobileConfigPanel.vue'
+import { useEmitt } from '@/hooks/web/useEmitt'
import DbToolbar from '@/components/dashboard/DbToolbar.vue'
import ViewEditor from '@/views/chart/components/editor/index.vue'
import { getDatasetTree } from '@/api/dataset'
@@ -29,7 +31,6 @@ const eventCheck = e => {
}
const dvMainStore = dvMainStoreWithOut()
const snapshotStore = snapshotStoreWithOut()
-
const {
componentData,
curComponent,
@@ -68,8 +69,20 @@ const checkPer = async resourceId => {
await interactiveStore.setInteractive(request)
return check(wsCache.get('panel-weight'), resourceId, 4)
}
+
+const mobileConfig = ref(false)
+
+const onMobileConfig = () => {
+ mobileConfig.value = true
+}
// 全局监听按键事件
onMounted(async () => {
+ useEmitt({
+ name: 'mobileConfig',
+ callback: () => {
+ onMobileConfig()
+ }
+ })
window.addEventListener('storage', eventCheck)
const { resourceId, opt, pid, createType } = window.DataEaseBi || router.currentRoute.value.query
const checkResult = await checkPer(resourceId)
@@ -123,7 +136,7 @@ onUnmounted(() => {
-
+
{
+
diff --git a/core/core-frontend/src/views/mobile/home/index.vue b/core/core-frontend/src/views/mobile/home/index.vue
new file mode 100644
index 0000000000..8ca5e62a5d
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/home/index.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/index.vue b/core/core-frontend/src/views/mobile/index.vue
new file mode 100644
index 0000000000..7806149233
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/index.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
(showLoading = val)">
+
(showLoading = val)"
+ @hiddenTabbar="val => (hiddenTabbar = val)"
+ >
+
+ 首页
+ 目录
+ 我的
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/login/index.vue b/core/core-frontend/src/views/mobile/login/index.vue
new file mode 100644
index 0000000000..c4dfd5cc82
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/login/index.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/panel/MobileInPc.vue b/core/core-frontend/src/views/mobile/panel/MobileInPc.vue
new file mode 100644
index 0000000000..47de2ffd8f
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/panel/MobileInPc.vue
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/panel/index.vue b/core/core-frontend/src/views/mobile/panel/index.vue
new file mode 100644
index 0000000000..36f29b1d91
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/panel/index.vue
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/mobile/personal/index.vue b/core/core-frontend/src/views/mobile/personal/index.vue
new file mode 100644
index 0000000000..c4dfd5cc82
--- /dev/null
+++ b/core/core-frontend/src/views/mobile/personal/index.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+