Skip to content

Commit 2e15cf2

Browse files
committed
chore: 拆分仪表盘路由为工作台和分析页
1 parent 84ad0d5 commit 2e15cf2

File tree

19 files changed

+33
-8
lines changed

19 files changed

+33
-8
lines changed

src/assets/icons/area-chart.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/config.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/insert-chart.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/line-chart.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/icons/pie-chart.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/components/Breadcrumb/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ let home: RouteLocationMatched | null = null
2525
const getHome = () => {
2626
if (!home) {
2727
const cloneRoutes = JSON.parse(JSON.stringify(routes)) as RouteLocationMatched[]
28-
const obj = findTree(cloneRoutes, (i) => i.path === '/home')
28+
const obj = findTree(cloneRoutes, (i) => i.path === '/dashboard/workplace')
2929
home = obj.item
3030
}
3131
}

src/router/index.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,22 @@ export const constantRoutes: RouteRecordRaw[] = [
3535
},
3636
{
3737
path: '/',
38+
name: 'Dashboard',
3839
component: Layout,
39-
redirect: '/home',
40-
meta: { hidden: false },
40+
redirect: '/dashboard/workplace',
41+
meta: { title: '仪表盘', icon: 'dashboard', hidden: false },
4142
children: [
4243
{
43-
path: '/home',
44-
name: 'Home',
45-
component: () => import('@/views/home/index.vue'),
46-
meta: { title: '首页', icon: 'dashboard', affix: true, hidden: false }
44+
path: '/dashboard/workplace',
45+
name: 'Workplace',
46+
component: () => import('@/views/dashboard/workplace/index.vue'),
47+
meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true }
48+
},
49+
{
50+
path: '/dashboard/analysis',
51+
name: 'Analysis',
52+
component: () => import('@/views/dashboard/analysis/index.vue'),
53+
meta: { title: '分析页', icon: 'insert-chart', hidden: false }
4754
}
4855
]
4956
},
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<template>
2+
<div id="home" class="gi_page home">
3+
分析页面开发中...
4+
</div>
5+
</template>
6+
7+
<script setup lang="ts">
8+
defineOptions({ name: 'Analysis' })
9+
</script>
10+
11+
<style lang="scss" scoped>
12+
</style>

0 commit comments

Comments
 (0)