diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - name: 'Dashboard', - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - }] - }, - { - path: '/', - component: Layout, - redirect: 'gasDashboard', - name: 'GasDashboard', - // hidden: true, - children: [{ - path: 'gasDashboard', - component: () => import('@/views/gasDashboard/index'), - name: 'GasDashboard', - meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - // { - // path: 'gasDashboard', - // component: Layout, - // redirect: '/gasDashboard', - // meta: { - // title: '动力管线首页', - // icon: 'icon-config', // 图标 - // permission: ['/gasDashboard']// 权限名称 - // }, - // children: [ - // { - // path: '/gasDashboard', - // component: () => import('@/views/gasDashboard/index'), - // name: 'gasDashboard', - // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } - // } - // ] - // }, + { + path: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + component: Layout, + redirect: '/gasDashboard', + meta: { + title: '动力管线首页', + icon: 'icon-config', // 图标 + permission: ['/gasDashboard']// 权限名称 + }, + children: [ + { + path: '/gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'gasDashboard', + meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + } + ] + }, { path: 'gasOverview', component: Layout, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/src/router/index.js b/src/router/index.js index 4f3dbe0..a007ca0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,7 +8,7 @@ /* Layout */ import Layout from '@/layout/Layout' -import {systemRouters} from './modules/system.js' +import { systemRouters } from './modules/system.js' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -54,28 +54,15 @@ { path: '/', component: Layout, - redirect: 'dashboard', + redirect: '/dashboard', name: 'Dashboard', - // hidden: true, - children: [{ - path: 'dashboard', - component: () => import('@/views/dashboard/index'), - name: 'Dashboard', - meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } - }] - }, - { - path: '/', - component: Layout, - redirect: 'gasDashboard', - name: 'GasDashboard', - // hidden: true, - children: [{ - path: 'gasDashboard', - component: () => import('@/views/gasDashboard/index'), - name: 'GasDashboard', - meta: { title: '动力管线首页', icon: 'dashboard', noCache: true, affix: true } - }] + hidden: true + // children: [{ + // path: 'dashboard', + // component: () => import('@/views/dashboard/index'), + // name: 'Dashboard', + // meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } + // }] } ] // 实例化vue的时候直挂载constantRouter @@ -88,24 +75,42 @@ // 异步挂载路由 // 动态需要根据权限加载的路由表 export const asyncRouterMap = [ - // { - // path: 'gasDashboard', - // component: Layout, - // redirect: '/gasDashboard', - // meta: { - // title: '动力管线首页', - // icon: 'icon-config', // 图标 - // permission: ['/gasDashboard']// 权限名称 - // }, - // children: [ - // { - // path: '/gasDashboard', - // component: () => import('@/views/gasDashboard/index'), - // name: 'gasDashboard', - // meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } - // } - // ] - // }, + { + path: '/dashboard', + component: Layout, + redirect: '/waterDashboard', + meta: { + title: '供水首页', + icon: 'icon-config', // 图标 + permission: ['/dashboard']// 权限名称 + }, + children: [ + { + path: '/waterDashboard', + component: () => import('@/views/dashboard/index'), + name: 'waterDashboard', + meta: { title: '供水管理首页', icon: 'icon-config', permission: ['/dashboard'] } + } + ] + }, + { + path: '/dashboard', + component: Layout, + redirect: '/gasDashboard', + meta: { + title: '动力管线首页', + icon: 'icon-config', // 图标 + permission: ['/gasDashboard']// 权限名称 + }, + children: [ + { + path: '/gasDashboard', + component: () => import('@/views/gasDashboard/index'), + name: 'gasDashboard', + meta: { title: '动力管线首页', icon: 'icon-config', permission: ['/gasDashboard'] } + } + ] + }, { path: 'gasOverview', component: Layout, @@ -129,17 +134,16 @@ component: Layout, redirect: '/overview', meta: { - title: '运行状态总览', + title: '供水管线总览', icon: 'icon-config', // 图标 - permission: ['/overview/wellList']// 权限名称 + permission: ['/overview']// 权限名称 }, children: [ { path: '/overview', component: () => import('@/views/overview/overviewSimple'), - // component: () => import('@/views/overview/oo'), name: 'overview', - meta: { title: '运行状态总览', icon: 'icon-config', permission: ['/overview/wellList'] } + meta: { title: '供水管线总览', icon: 'icon-config', permission: ['/overview'] } } ] }, @@ -288,13 +292,13 @@ path: '/dataAnalyse', name: 'DataAnalyse', component: () => import('@/views/dataStatics/dataStatics'), - meta: { title: '数据分析', icon: 'icon-config' , permission: ['/dataAnalyse'] } + meta: { title: '数据分析', icon: 'icon-config', permission: ['/dataAnalyse'] } }, { path: '/deviceStatics', name: 'DeviceStatics', component: () => import('@/views/deviceStatics/deviceStatics'), - meta: { title: '设备统计', icon: 'icon-config' , permission: ['/deviceStatics'] } + meta: { title: '设备统计', icon: 'icon-config', permission: ['/deviceStatics'] } }, { path: '/alarmStatics', diff --git a/static/project.config.json b/static/project.config.json index be2f8d7..7b9a3c3 100644 --- a/static/project.config.json +++ b/static/project.config.json @@ -1,5 +1,5 @@ { - "title": "场区供水管理系统", + "title": "场区能源管理系统", "baseUrl": "http://111.198.10.15:20104/", "mainPage": "http://111.198.10.15:11404/dcms/#", "singleSys": true,