workbranch改为application

This commit is contained in:
limengnan 2025-05-07 16:30:13 +08:00
parent 9efc52137a
commit 869e1bb9cb
6 changed files with 23 additions and 23 deletions

View File

@ -190,7 +190,7 @@ service.interceptors.response.use(
}) })
if (response.data.code === 80001) { if (response.data.code === 80001) {
localStorage.clear() localStorage.clear()
let queryRedirectPath = '/workbranch/index' let queryRedirectPath = '/application/index'
if (router.currentRoute.value.fullPath) { if (router.currentRoute.value.fullPath) {
queryRedirectPath = router.currentRoute.value.fullPath as string queryRedirectPath = router.currentRoute.value.fullPath as string
} }
@ -248,7 +248,7 @@ service.interceptors.response.use(
localStorage.clear() localStorage.clear()
const flag = header.get('DE-GATEWAY-FLAG') const flag = header.get('DE-GATEWAY-FLAG')
localStorage.setItem('DE-GATEWAY-FLAG', flag.toString()) localStorage.setItem('DE-GATEWAY-FLAG', flag.toString())
let queryRedirectPath = '/workbranch/index' let queryRedirectPath = '/application/index'
if (router.currentRoute.value.fullPath) { if (router.currentRoute.value.fullPath) {
queryRedirectPath = router.currentRoute.value.fullPath as string queryRedirectPath = router.currentRoute.value.fullPath as string
} }

View File

@ -73,7 +73,7 @@ router.beforeEach(async (to, from, next) => {
await userStore.setUser() await userStore.setUser()
} }
if (to.path === '/login') { if (to.path === '/login') {
next({ path: '/workbranch/index' }) next({ path: '/application/index' })
} else { } else {
permissionStore.setCurrentPath(to.path) permissionStore.setCurrentPath(to.path)
if (permissionStore.getIsAddRouters) { if (permissionStore.getIsAddRouters) {

View File

@ -1,11 +1,11 @@
import { isExternal } from '@/utils/validate' import { isExternal } from '@/utils/validate'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import { XpackComponent } from '@/components/plugin' import { XpackComponent } from '@/components/plugin'
// const modules = import.meta.glob('../viewsnew/**/*.vue') const modules = import.meta.glob('../viewsnew/**/*.vue')
// export const Layout = () => import('@/viewsnew/layout/index.vue') export const Layout = () => import('@/viewsnew/layout/index.vue')
const modules = import.meta.glob('../views/**/*.vue') // const modules = import.meta.glob('../views/**/*.vue')
export const Layout = () => import('@/layout/index.vue') // export const Layout = () => import('@/layout/index.vue')
const xpackComName = 'components/plugin' const xpackComName = 'components/plugin'
export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue') export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue')
@ -42,8 +42,8 @@ export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRe
if (route.component === xpackComName) { if (route.component === xpackComName) {
comModule = XpackComponent comModule = XpackComponent
} else if (!route.component.startsWith('Layout')) { } else if (!route.component.startsWith('Layout')) {
comModule = modules[`../views/${route.component}/index.vue`] // comModule = modules[`../views/${route.component}/index.vue`]
// comModule = modules[`../viewsnew/${route.component}/index.vue`] comModule = modules[`../viewsnew/${route.component}/index.vue`]
} }
if (route.component === 'Layout') { if (route.component === 'Layout') {

View File

@ -6,16 +6,16 @@ export const routes: AppRouteRecordRaw[] = [
{ {
path: '/', path: '/',
name: 'index', name: 'index',
redirect: '/workbranch/index', redirect: '/application/index',
component: () => import('@/layout/index.vue'), component: () => import('@/viewsnew/layout/index.vue'),
hidden: true, hidden: true,
meta: {}, meta: {},
children: [ children: [
{ {
path: 'workbranch', path: 'application',
name: 'workbranch', name: 'application',
hidden: true, hidden: true,
component: () => import('@/views/workbranch/index.vue'), component: () => import('@/viewsnew/application/index.vue'),
meta: { hidden: true } meta: { hidden: true }
} }
] ]
@ -171,13 +171,13 @@ export const routes: AppRouteRecordRaw[] = [
meta: {}, meta: {},
component: () => import('@/viewsnew/data-visualization/index.vue') component: () => import('@/viewsnew/data-visualization/index.vue')
}, },
{ // {
path: '/application', // path: '/application',
name: 'application', // name: 'application',
hidden: true, // hidden: true,
meta: {}, // meta: {},
component: () => import('@/viewsnew/application/index.vue') // component: () => import('@/viewsnew/application/index.vue')
}, // },
{ {
path: '/datasetnew', path: '/datasetnew',
name: 'datasetnew', name: 'datasetnew',

View File

@ -17,7 +17,7 @@ export const logoutHandler = (justClean?: boolean) => {
interactiveStore.clear() interactiveStore.clear()
interactiveStore.$reset() interactiveStore.$reset()
removeCache() removeCache()
let queryRedirectPath = '/workbranch/index' let queryRedirectPath = '/application/index'
// 如果redirect参数中有值 // 如果redirect参数中有值
if (router.currentRoute.value.fullPath) { if (router.currentRoute.value.fullPath) {
queryRedirectPath = router.currentRoute.value.fullPath as string queryRedirectPath = router.currentRoute.value.fullPath as string

View File

@ -60,7 +60,7 @@ const rules = reactive<FormRules>({
const activeName = ref('simple') const activeName = ref('simple')
const getCurLocation = () => { const getCurLocation = () => {
let queryRedirectPath = '/workbranch/index' let queryRedirectPath = '/application/index'
if (router.currentRoute.value.query.redirect) { if (router.currentRoute.value.query.redirect) {
queryRedirectPath = router.currentRoute.value.query.redirect as string queryRedirectPath = router.currentRoute.value.query.redirect as string
} }