123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517 |
- import { createRouter, createWebHashHistory } from 'vue-router'
- import Layout from '@/layout'
- export const constantRoutes = [
- {
- path: '/login',
- component: () =>
- import('@/views/login'),
- hidden: true,
- },
- {
- path: '/403',
- name: '403',
- component: () =>
- import('@/views/403'),
- hidden: true,
- },
- {
- path: '/404',
- name: '404',
- component: () =>
- import('@/views/404'),
- hidden: true,
- },
- {
- path: '/401',
- name: '401',
- component: () =>
- import('@/views/401'),
- hidden: true,
- },
- ]
- export const asyncRoutes = [
- // {
- // path: '/',
- // component: Layout,
- // redirect: '/index',
- // meta: {
- // title: '首页',
- // icon: 'home',
- // affix: true,
- // },
- // children: [{
- // path: 'index',
- // name: 'Index',
- // component: () =>
- // import ('@/views/index'),
- // meta: {
- // title: '首页',
- // icon: 'home',
- // affix: true,
- // },
- // }, ],
- // },
- {
- path: '/',
- redirect: '/index',
- meta: {
- title: '告警管理',
- icon: 'alarmManage',
- affix: true,
- },
- component: Layout,
- children: [{
- meta: {
- title: '告警管理',
- icon: 'alarmManage',
- affix: true,
- },
- path: 'index',
- component: () =>
- import('@/views/alarmManage/index'),
- },
- ]
- },
- {
- path: '/siteManage',
- redirect: '/siteManage/index',
- meta: {
- title: '站点管理',
- icon: 'siteManage',
- },
- component: Layout,
- children: [{
- meta: {
- title: '站点管理',
- icon: 'siteManage',
- },
- path: '/siteManage',
- component: () =>
- import('@/views/siteManage/index'),
- selectLeftMenu: '/alarmManage',
- hidden: true
- }]
- },
- {
- path: '/stationManage',
- redirect: '/stationManage/index',
- meta: {
- title: '台区管理',
- icon: 'stationManage',
- },
- component: Layout,
- children: [{
- meta: {
- title: '台区管理',
- icon: 'stationManage',
- },
- path: '/stationManage',
- component: () =>
- import('@/views/stationManage/index'),
- hidden: true
- }]
- },
- /**
- * deviceManage 设备管理
- * powerEquip 电力监测设备
- * videoEquip 视频监测设备
- * communicateEquip 通信设备
- * channelList 通道列表
- * attribTemplate 属性模板
- */
- {
- meta: { icon: 'deviceManage', title: '设备管理', },
- path: '/deviceManage',
- component: Layout,
- redirect: '/deviceManage/powerEquip',
- children: [{
- meta: { icon: 'powerEquip', title: '设备管理', },
- path: 'powerEquip',
- component: () =>
- import('@/views/deviceManage/powerEquip/index.vue'),
- },
- // {
- // title: 'index-layout.menu.deviceManage.videoEquip',
- // path: 'videoEquip',
- // component: () => import('@/views/deviceManage/videoEquip/index.vue'),
- // },
- // {
- // title: 'index-layout.menu.deviceManage.communicateEquip',
- // path: 'communicateEquip',
- // component: () => import('@/views/deviceManage/communicateEquip/index.vue'),
- // },
- // {
- // title: 'index-layout.menu.deviceManage.channelList',
- // path: 'channelList',
- // component: () => import('@/views/deviceManage/channelList/index.vue'),
- // },
- {
- meta: { icon: 'attribTemplate', title: '属性模板', },
- path: 'attribTemplate',
- component: () =>
- import('@/views/deviceManage/attribTemplate/index.vue'),
- }
- ]
- },
- /**
- * dataManage 数据管理
- * sameAnalysis 同比分析报表
- * chainAnalysis 环比分析报表
- * handOpera 手动抄表
- * energyReport 用能月报
- * demandAnalysis 需量分析
- * consumConfig 能耗分析配置
- */
- {
- meta: { icon: 'dataManage', title: '数据管理', },
- path: '/dataManage',
- component: Layout,
- redirect: '/dataManage/sameAnalysis',
- children: [{
- meta: { icon: 'sameAnalysis', title: '同比分析报表', },
- path: 'sameAnalysis',
- component: () =>
- import('@/views/dataManage/sameAnalysis/index.vue'),
- },
- {
- meta: { icon: 'chainAnalysis', title: '环比分析报表', },
- path: 'chainAnalysis',
- component: () =>
- import('@/views/dataManage/chainAnalysis/index.vue'),
- },
- {
- meta: { icon: 'handOpera', title: '手动抄表', },
- title: 'index-layout.menu.dataManage.handOpera',
- path: 'handOpera',
- component: () =>
- import('@/views/dataManage/handOpera/index.vue'),
- },
- {
- meta: { icon: 'energyReport', title: '用能月报', },
- title: 'index-layout.menu.dataManage.energyReport',
- path: 'energyReport',
- component: () =>
- import('@/views/dataManage/energyReport/index.vue'),
- },
- {
- meta: { icon: 'demandAnalysis', title: '需量分析', },
- title: 'index-layout.menu.dataManage.demandAnalysis',
- path: 'demandAnalysis',
- component: () =>
- import('@/views/dataManage/demandAnalysis/index.vue'),
- },
- {
- meta: { icon: 'consumConfig', title: '能耗分析配置', },
- title: 'index-layout.menu.dataManage.consumConfig',
- path: 'consumConfig',
- component: () =>
- import('@/views/dataManage/consumConfig/index.vue'),
- }
- ]
- },
- /**
- * powerQuality 电能质量
- * harmonicReport 谐波报表
- * realTimeMonitoring 实时监测
- * asseReport 评估报告
- * unbalanceAnalysis 三相不平衡分析
- */
- {
- meta: { icon: 'powerQuality', title: '电能质量', },
- path: '/powerQuality',
- component: Layout,
- redirect: '/powerQuality/harmonicReport',
- children: [{
- meta: { icon: 'harmonicReport', title: '谐波报表', },
- path: 'harmonicReport',
- component: () =>
- import('@/views/powerQuality/harmonicReport/index.vue'),
- },
- {
- meta: { icon: 'realTimeMonitoring', title: '实时监测', },
- path: 'realTimeMonitoring',
- component: () =>
- import('@/views/powerQuality/realTimeMonitoring/index.vue'),
- },
- {
- meta: { icon: 'asseReport', title: '评估报告', },
- path: 'asseReport',
- component: () =>
- import('@/views/powerQuality/asseReport/index.vue'),
- },
- {
- meta: { icon: 'unbalanceAnalysis', title: '三相不平衡分析', },
- path: 'unbalanceAnalysis',
- component: () =>
- import('@/views/powerQuality/unbalanceAnalysis/index.vue'),
- },
- ]
- },
- /**
- * monthReport 月度报告
- */
- {
- path: '/monthReport',
- redirect: '/monthReport',
- meta: { title: '月度报告', icon: 'monthReport', },
- component: Layout,
- children: [{
- meta: { title: '月度报告', icon: 'monthReport', },
- path: '/monthReport',
- component: () =>
- import('@/views/monthReport/index'),
- hidden: true
- },
- {
- meta: { title: '月报模板', icon: 'reportModel', },
- path: '/reportModel',
- component: () =>
- import('@/views/monthReport/reportModel'),
- hidden: true
- }
- ]
- },
- {
- path: '/planOutage',
- redirect: '/planOutage',
- meta: { title: '计划停电', icon: 'planOutage', },
- component: Layout,
- children: [{
- meta: { title: '计划停电', icon: 'planOutage', },
- path: '/planOutage',
- component: () =>
- import('@/views/planOutage/index'),
- hidden: true
- }],
- },
- /**
- * patrolManage 巡检管理
- * patrolPlan 巡检计划
- * patrolRecord 巡检记录
- * patrolContent 巡检内容
- * checkEntries 检查条目
- */
- {
- meta: { title: '巡检管理', icon: 'patrolManage', },
- path: '/patrolManage',
- component: Layout,
- redirect: '/patrolManage/patrolPlan',
- name: 'patrolManage',
- children: [{
- meta: { title: '巡检计划', icon: 'patrolPlan' },
- path: 'patrolPlan',
- name: 'patrolPlan',
- component: () =>
- import('@/views/patrolManage/patrolPlan/index.vue'),
- },
- {
- meta: { title: '巡检记录', icon: 'patrolRecord' },
- path: 'patrolRecord',
- name: 'patrolRecord',
- component: () =>
- import('@/views/patrolManage/patrolRecord/index.vue'),
- },
- {
- meta: { title: '巡检内容', icon: '巡检内容' },
- path: 'patrolContent',
- name: 'patrolContent',
- component: () =>
- import('@/views/patrolManage/patrolContent/index.vue'),
- },
- {
- meta: { title: '检查条目', icon: '检查条目' },
- path: 'checkEntries',
- name: 'checkEntries',
- component: () =>
- import('@/views/patrolManage/checkEntries/index.vue'),
- },
- ]
- },
- /**
- * operManage 运维管理
- * siteAchives 现场档案
- * defectManage 缺陷管理
- * workManage 工单管理
- * operStatistics 运维统计
- * workStatistics 工作量统计
- */
- {
- meta: { title: '运维管理', icon: 'operManage', },
- path: '/operManage',
- component: Layout,
- redirect: '/operManage/siteAchives',
- name: 'operManage',
- children: [{
- meta: { title: '现场档案', icon: 'siteAchives', },
- path: 'siteAchives',
- component: () =>
- import('@/views/operManage/siteAchives/index.vue'),
- },
- {
- meta: { title: '缺陷管理', icon: 'defectManage', },
- path: 'defectManage',
- component: () =>
- import('@/views/operManage/defectManage/index.vue'),
- },
- {
- meta: { title: '工单管理', icon: 'workManage', },
- path: 'workManage',
- component: () =>
- import('@/views/operManage/workManage/index.vue'),
- },
- {
- meta: { title: '运维统计', icon: 'operStatistics', },
- path: 'operStatistics',
- component: () =>
- import('@/views/operManage/operStatistics/index.vue'),
- },
- {
- meta: { title: '工作量统计', icon: 'workStatistics', },
- path: 'workStatistics',
- component: () =>
- import('@/views/operManage/workStatistics/index.vue'),
- },
- ]
- },
- /**
- * systemManage 系统管理
- * userManage 用户管理
- * rolePermission 权限管理
- */
- {
- meta: { title: '系统管理', icon: 'systemManage', },
- path: '/systemManage',
- component: Layout,
- redirect: '/systemManage/userManage',
- children: [{
- meta: { title: '用户管理', icon: 'userManage', },
- path: 'userManage',
- component: () =>
- import('@/views/systemManage/userManage/index.vue'),
- },
- {
- meta: { title: '权限管理', icon: 'rolePermission', },
- path: 'rolePermission',
- component: () =>
- import('@/views/systemManage/rolePermission/index.vue'),
- },
- ]
- },
- {
- path: '/vab',
- component: Layout,
- redirect: '/vab/table',
- alwaysShow: true,
- meta: {
- title: '组件',
- icon: 'apps-line',
- },
- children: [{
- path: 'table',
- name: 'Table',
- component: () =>
- import('@/views/vab/table'),
- meta: {
- title: '表格',
- icon: 'table-2',
- },
- },
- {
- path: 'icon',
- name: 'Icon',
- component: () =>
- import('@/views/vab/icon'),
- meta: {
- title: '图标',
- icon: 'remixicon-line',
- },
- },
- ],
- },
- // {
- // path: '/test',
- // component: Layout,
- // redirect: '/test/test',
- // meta: {
- // title: '动态路由测试',
- // icon: 'test-tube-line',
- // },
- // children: [
- // {
- // path: 'test',
- // name: 'Test',
- // component: () => import('@/views/test'),
- // meta: {
- // title: '动态路由测试',
- // icon: 'test-tube-line',
- // },
- // },
- // ],
- // },
- // {
- // path: '/error',
- // name: 'Error',
- // component: Layout,
- // redirect: '/error/403',
- // meta: {
- // title: '错误页',
- // icon: 'error-warning-line',
- // },
- // children: [
- // {
- // path: '403',
- // name: 'Error403',
- // component: () => import('@/views/403'),
- // meta: {
- // title: '403',
- // icon: 'error-warning-line',
- // },
- // },
- // {
- // path: '404',
- // name: 'Error404',
- // component: () => import('@/views/404'),
- // meta: {
- // title: '404',
- // icon: 'error-warning-line',
- // },
- // },
- // ],
- // },
- {
- path: '/*',
- redirect: '/404',
- hidden: true,
- },
- ]
- const router = createRouter({
- history: createWebHashHistory(),
- routes: constantRoutes,
- })
- export default router
|