diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 764d548..398736b 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -32,18 +32,18 @@ export default { let matched = this.$route.matched.filter(item => item.meta && item.meta.title) const first = matched[0] - if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: '系统首页' }}].concat(matched) + if (!this.isHome(first)) { + matched = [{ path: '/welcome', meta: { title: '预算申报首页' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, - isDashboard(route) { + isHome(route) { const name = route && route.name if (!name) { return false } - return name.trim().toLocaleLowerCase() === '系统首页'.toLocaleLowerCase() + return name.trim().toLocaleLowerCase() === '预算申报首页'.toLocaleLowerCase() }, pathCompile(path) { // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 diff --git a/src/router/index.js b/src/router/index.js index 891265c..9a4d016 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -56,11 +56,20 @@ export const constantRoutes = [{ { path: '/', component: Layout, - redirect: '/dashboard', + redirect: '/welcome', children: [{ + path: 'welcome', + name: '预算申报首页', + component: () => import('@/views/welcome/index'), + meta: { + title: '预算申报首页', + icon: 'dashboard' + } + }, { path: 'dashboard', name: '系统首页', component: () => import('@/views/dashboard/index'), + hidden: true, meta: { title: '系统首页', icon: 'dashboard' diff --git a/src/views/welcome/index.vue b/src/views/welcome/index.vue new file mode 100644 index 0000000..756e58a --- /dev/null +++ b/src/views/welcome/index.vue @@ -0,0 +1,246 @@ + + + + +