Skip to content

Commit

Permalink
chore: 拆分仪表盘路由为工作台和分析页
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Oct 13, 2024
1 parent 84ad0d5 commit 2e15cf2
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/assets/icons/area-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/config.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/insert-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/line-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/pie-chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/profit-model-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/Breadcrumb/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let home: RouteLocationMatched | null = null
const getHome = () => {
if (!home) {
const cloneRoutes = JSON.parse(JSON.stringify(routes)) as RouteLocationMatched[]
const obj = findTree(cloneRoutes, (i) => i.path === '/home')
const obj = findTree(cloneRoutes, (i) => i.path === '/dashboard/workplace')
home = obj.item
}
}
Expand Down
19 changes: 13 additions & 6 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,22 @@ export const constantRoutes: RouteRecordRaw[] = [
},
{
path: '/',
name: 'Dashboard',
component: Layout,
redirect: '/home',
meta: { hidden: false },
redirect: '/dashboard/workplace',
meta: { title: '仪表盘', icon: 'dashboard', hidden: false },
children: [
{
path: '/home',
name: 'Home',
component: () => import('@/views/home/index.vue'),
meta: { title: '首页', icon: 'dashboard', affix: true, hidden: false }
path: '/dashboard/workplace',
name: 'Workplace',
component: () => import('@/views/dashboard/workplace/index.vue'),
meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true }
},
{
path: '/dashboard/analysis',
name: 'Analysis',
component: () => import('@/views/dashboard/analysis/index.vue'),
meta: { title: '分析页', icon: 'insert-chart', hidden: false }
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions src/views/dashboard/analysis/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div id="home" class="gi_page home">
分析页面开发中...
</div>
</template>

<script setup lang="ts">
defineOptions({ name: 'Analysis' })
</script>

<style lang="scss" scoped>
</style>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import FastCard from './components/FastCard.vue'
import NoticeCard from './components/NoticeCard.vue'
import SponsorCard from './components/SponsorCard.vue'
defineOptions({ name: 'Home' })
defineOptions({ name: 'Workplace' })
const open = (url: string) => {
window.open(url, '_blank')
Expand Down

0 comments on commit 2e15cf2

Please sign in to comment.