From 869e1bb9cbe70f1d804df7c397fd65e8672d438f Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Wed, 7 May 2025 16:30:13 +0800 Subject: [PATCH] =?UTF-8?q?workbranch=E6=94=B9=E4=B8=BAapplication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core-frontend/src/config/axios/service.ts | 4 ++-- core/core-frontend/src/permission.ts | 2 +- core/core-frontend/src/router/establish.ts | 12 +++++----- core/core-frontend/src/router/index.ts | 24 +++++++++---------- core/core-frontend/src/utils/logout.ts | 2 +- core/core-frontend/src/views/login/index.vue | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/core/core-frontend/src/config/axios/service.ts b/core/core-frontend/src/config/axios/service.ts index 65177eb..3b10e60 100644 --- a/core/core-frontend/src/config/axios/service.ts +++ b/core/core-frontend/src/config/axios/service.ts @@ -190,7 +190,7 @@ service.interceptors.response.use( }) if (response.data.code === 80001) { localStorage.clear() - let queryRedirectPath = '/workbranch/index' + let queryRedirectPath = '/application/index' if (router.currentRoute.value.fullPath) { queryRedirectPath = router.currentRoute.value.fullPath as string } @@ -248,7 +248,7 @@ service.interceptors.response.use( localStorage.clear() const flag = header.get('DE-GATEWAY-FLAG') localStorage.setItem('DE-GATEWAY-FLAG', flag.toString()) - let queryRedirectPath = '/workbranch/index' + let queryRedirectPath = '/application/index' if (router.currentRoute.value.fullPath) { queryRedirectPath = router.currentRoute.value.fullPath as string } diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index 8dc286b..f116bfd 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -73,7 +73,7 @@ router.beforeEach(async (to, from, next) => { await userStore.setUser() } if (to.path === '/login') { - next({ path: '/workbranch/index' }) + next({ path: '/application/index' }) } else { permissionStore.setCurrentPath(to.path) if (permissionStore.getIsAddRouters) { diff --git a/core/core-frontend/src/router/establish.ts b/core/core-frontend/src/router/establish.ts index fab8e5a..b2edfd5 100644 --- a/core/core-frontend/src/router/establish.ts +++ b/core/core-frontend/src/router/establish.ts @@ -1,11 +1,11 @@ import { isExternal } from '@/utils/validate' import { cloneDeep } from 'lodash' import { XpackComponent } from '@/components/plugin' -// const modules = import.meta.glob('../viewsnew/**/*.vue') -// export const Layout = () => import('@/viewsnew/layout/index.vue') +const modules = import.meta.glob('../viewsnew/**/*.vue') +export const Layout = () => import('@/viewsnew/layout/index.vue') -const modules = import.meta.glob('../views/**/*.vue') -export const Layout = () => import('@/layout/index.vue') +// const modules = import.meta.glob('../views/**/*.vue') +// export const Layout = () => import('@/layout/index.vue') const xpackComName = 'components/plugin' export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue') @@ -42,8 +42,8 @@ export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRe if (route.component === xpackComName) { comModule = XpackComponent } else if (!route.component.startsWith('Layout')) { - comModule = modules[`../views/${route.component}/index.vue`] - // comModule = modules[`../viewsnew/${route.component}/index.vue`] + // comModule = modules[`../views/${route.component}/index.vue`] + comModule = modules[`../viewsnew/${route.component}/index.vue`] } if (route.component === 'Layout') { diff --git a/core/core-frontend/src/router/index.ts b/core/core-frontend/src/router/index.ts index e79af10..8eac464 100644 --- a/core/core-frontend/src/router/index.ts +++ b/core/core-frontend/src/router/index.ts @@ -6,16 +6,16 @@ export const routes: AppRouteRecordRaw[] = [ { path: '/', name: 'index', - redirect: '/workbranch/index', - component: () => import('@/layout/index.vue'), + redirect: '/application/index', + component: () => import('@/viewsnew/layout/index.vue'), hidden: true, meta: {}, children: [ { - path: 'workbranch', - name: 'workbranch', + path: 'application', + name: 'application', hidden: true, - component: () => import('@/views/workbranch/index.vue'), + component: () => import('@/viewsnew/application/index.vue'), meta: { hidden: true } } ] @@ -171,13 +171,13 @@ export const routes: AppRouteRecordRaw[] = [ meta: {}, component: () => import('@/viewsnew/data-visualization/index.vue') }, - { - path: '/application', - name: 'application', - hidden: true, - meta: {}, - component: () => import('@/viewsnew/application/index.vue') - }, + // { + // path: '/application', + // name: 'application', + // hidden: true, + // meta: {}, + // component: () => import('@/viewsnew/application/index.vue') + // }, { path: '/datasetnew', name: 'datasetnew', diff --git a/core/core-frontend/src/utils/logout.ts b/core/core-frontend/src/utils/logout.ts index 02ab177..b6c8f3d 100644 --- a/core/core-frontend/src/utils/logout.ts +++ b/core/core-frontend/src/utils/logout.ts @@ -17,7 +17,7 @@ export const logoutHandler = (justClean?: boolean) => { interactiveStore.clear() interactiveStore.$reset() removeCache() - let queryRedirectPath = '/workbranch/index' + let queryRedirectPath = '/application/index' // 如果redirect参数中有值 if (router.currentRoute.value.fullPath) { queryRedirectPath = router.currentRoute.value.fullPath as string diff --git a/core/core-frontend/src/views/login/index.vue b/core/core-frontend/src/views/login/index.vue index d57e04a..20470eb 100644 --- a/core/core-frontend/src/views/login/index.vue +++ b/core/core-frontend/src/views/login/index.vue @@ -60,7 +60,7 @@ const rules = reactive({ const activeName = ref('simple') const getCurLocation = () => { - let queryRedirectPath = '/workbranch/index' + let queryRedirectPath = '/application/index' if (router.currentRoute.value.query.redirect) { queryRedirectPath = router.currentRoute.value.query.redirect as string }