Commit c868e90d authored by dupengyu's avatar dupengyu

路由调整

parent 61317410
......@@ -36,7 +36,7 @@ export function roleMenuTreeselect(roleId) {
// 新增菜单
export function addMenu(data) {
return request({
url: '/api/menu',
url: '/api/menu/add',
method: 'post',
data: data
})
......
......@@ -22,6 +22,11 @@ export const constantRoutes = [
meta: { title: "登录" },
hidden: true
},
{
path: '/',
component: Layout,
redirect: '/dashboard',
},
// {
// path: '/alarm',
// component: Layout,
......@@ -43,126 +48,126 @@ export const constantRoutes = [
// }
// ]
// },
{
path: '/setting',
component: Layout,
redirect: '/setting/add',
name: 'Setting',
meta: { title: '配置管理', icon: 'setting' },
children: [
{
path: 'add',
name: 'settingAdd',
component: () => import('@/views/setting/add/index'),
meta: { title: '手动添加配置' }
},
{
path: 'auto',
name: 'settingAuto',
component: () => import('@/views/setting/auto/index'),
meta: { title: '自动添加配置' }
},
{
path: 'statistics',
name: 'settingAtatistics',
// {
// path: '/setting',
// component: Layout,
// redirect: '/setting/add',
// name: 'Setting',
// meta: { title: '配置管理', icon: 'setting' },
// children: [
// {
// path: 'add',
// name: 'settingAdd',
// component: () => import('@/views/setting/add/index'),
// meta: { title: '手动添加配置' }
// },
// {
// path: 'auto',
// name: 'settingAuto',
// component: () => import('@/views/setting/auto/index'),
// meta: { title: '自动添加配置' }
// },
// {
// path: 'statistics',
// name: 'settingAtatistics',
component: () => import('@/views/setting/statistics/index'),
meta: { title: '配置信息统计' },
children: [
// component: () => import('@/views/setting/statistics/index'),
// meta: { title: '配置信息统计' },
// children: [
]
},
{
path: 'parameter',
name: 'parameter',
component: () => import('@/views/setting/parameter/index'),
meta: { title: '参数查询' }
},
{
path: "/detail/",
name: "detail",
beforeEnter: (to, from, next) => {
if (to.query.type == 1) {
to.meta.title = '铁路线详情'
}
else if (to.query.type == 2) {
to.meta.title = '站点详情'
}
else if (to.query.type == 3) {
to.meta.title = 'FSU详情'
}
else if (to.query.type == 4) {
to.meta.title = '监测设备详情'
}
else if (to.query.type == 5) {
to.meta.title = '漏缆详情'
}
else if (to.query.type == 6) {
to.meta.title = '天馈线详情'
} else {
to.meta.title = '详情'
}
next()
},
component: () => import('@/views/setting/statistics/detail'),
hidden: true,
},
]
},
{
path: '/monitor',
component: Layout,
redirect: '/dashboard',
name: '监测实时状态',
meta: { title: '监测实时状态', icon: 'system' },
children: [
{
path: 'leakageCable',
name: '漏缆实时状态',
component: () => import('@/views/monitor/leakageCable/index'),
meta: { title: '漏缆实时状态' }
},
// {
// path: 'equipment',
// name: '设备实时状态',
// component: () => import('@/views/monitor/equipment/index'),
// meta: { title: '设备实时状态' }
// }
]
},
{
path: '/jobgroup',
component: Layout,
redirect: '/jobgroup',
name: 'Jobgroup',
meta: { title: '轮询管理', icon: 'history' },
children: [
{
path: 'screen',
name: 'screen',
component: () => import('@/views/jobgroup/screen/index.vue'),
meta: { title: '运行报表' }
},
{
path: 'jobinfo',
name: 'jobinfo',
component: () => import('@/views/jobgroup/jobinfo/index.vue'),
meta: { title: '任务管理' }
},
{
path: 'joblog',
name: 'joblog',
component: () => import('@/views/jobgroup/joblog/index.vue'),
meta: { title: '调度日志' }
},
{
path: 'jobmanage',
name: 'jobmanage',
component: () => import('@/views/jobgroup/jobmanage/index.vue'),
meta: { title: '执行器管理' }
},
]
},
// ]
// },
// {
// path: 'parameter',
// name: 'parameter',
// component: () => import('@/views/setting/parameter/index'),
// meta: { title: '参数查询' }
// },
// {
// path: "detail",
// name: "detail",
// beforeEnter: (to, from, next) => {
// if (to.query.type == 1) {
// to.meta.title = '铁路线详情'
// }
// else if (to.query.type == 2) {
// to.meta.title = '站点详情'
// }
// else if (to.query.type == 3) {
// to.meta.title = 'FSU详情'
// }
// else if (to.query.type == 4) {
// to.meta.title = '监测设备详情'
// }
// else if (to.query.type == 5) {
// to.meta.title = '漏缆详情'
// }
// else if (to.query.type == 6) {
// to.meta.title = '天馈线详情'
// } else {
// to.meta.title = '详情'
// }
// next()
// },
// component: () => import('@/views/setting/statistics/detail'),
// hidden: true,
// },
// ]
// },
// {
// path: '/monitor',
// component: Layout,
// redirect: '/dashboard',
// name: '监测实时状态',
// meta: { title: '监测实时状态', icon: 'system' },
// children: [
// {
// path: 'leakageCable',
// name: '漏缆实时状态',
// component: () => import('@/views/monitor/leakageCable/index'),
// meta: { title: '漏缆实时状态' }
// },
// // {
// // path: 'equipment',
// // name: '设备实时状态',
// // component: () => import('@/views/monitor/equipment/index'),
// // meta: { title: '设备实时状态' }
// // }
// ]
// },
// {
// path: '/jobgroup',
// component: Layout,
// redirect: '/jobgroup',
// name: 'Jobgroup',
// meta: { title: '轮询管理', icon: 'history' },
// children: [
// {
// path: 'screen',
// name: 'screen',
// component: () => import('@/views/jobgroup/screen/index.vue'),
// meta: { title: '运行报表' }
// },
// {
// path: 'jobinfo',
// name: 'jobinfo',
// component: () => import('@/views/jobgroup/jobinfo/index.vue'),
// meta: { title: '任务管理' }
// },
// {
// path: 'joblog',
// name: 'joblog',
// component: () => import('@/views/jobgroup/joblog/index.vue'),
// meta: { title: '调度日志' }
// },
// {
// path: 'jobmanage',
// name: 'jobmanage',
// component: () => import('@/views/jobgroup/jobmanage/index.vue'),
// meta: { title: '执行器管理' }
// },
// ]
// },
// {
// path: '/history',
// component: Layout,
......@@ -196,69 +201,70 @@ export const constantRoutes = [
// }
// ]
// },
{
path: '/backup',
component: Layout,
redirect: '/dashboard',
name: '备份管理',
meta: { title: '备份管理', icon: 'backup' },
children: [
{
path: 'backups',
name: '数据备份',
component: () => import('@/views/backup/backups/index'),
meta: { title: '数据备份' }
},
{
path: 'synchronize',
name: '时间同步',
component: () => import('@/views/backup/synchronize/index'),
meta: { title: '时间同步' }
}
]
}, {
path: '/system',
component: Layout,
redirect: '/dashboard',
name: '系统管理',
meta: { title: '系统管理', icon: 'backup' },
children: [
{
path: 'menu',
name: '菜单管理',
component: () => import('@/views/system/menu/index'),
meta: { title: '菜单管理' }
},
{
path: 'role',
name: '角色管理',
component: () => import('@/views/system/role/index'),
meta: { title: '角色管理' }
},
{
path: 'updateUser',
name: 'UpdateUser',
component: () => import('@/views/system/user/updateUser'),
meta: { title: '个人信息管理', },
// {
// path: '/backup',
// component: Layout,
// redirect: '/dashboard',
// name: '备份管理',
// meta: { title: '备份管理', icon: 'backup' },
// children: [
// {
// path: 'backups',
// name: '数据备份',
// component: () => import('@/views/backup/backups/index'),
// meta: { title: '数据备份' }
// },
// {
// path: 'synchronize',
// name: '时间同步',
// component: () => import('@/views/backup/synchronize/index'),
// meta: { title: '时间同步' }
// }
// ]
// },
// {
// path: '/system',
// component: Layout,
// redirect: '/dashboard',
// name: '系统管理',
// meta: { title: '系统管理', icon: 'backup' },
// children: [
// {
// path: 'menu',
// name: '菜单管理',
// component: () => import('@/views/system/menu/index'),
// meta: { title: '菜单管理' }
// },
// {
// path: 'role',
// name: '角色管理',
// component: () => import('@/views/system/role/index'),
// meta: { title: '角色管理' }
// },
// {
// path: 'updateUser',
// name: 'UpdateUser',
// component: () => import('@/views/system/user/updateUser'),
// meta: { title: '个人信息管理', },
},
{
path: 'userList',
name: 'UserList',
component: () => import('@/views/system/user/userList'),
meta: { title: '用户信息列表', },
// },
// {
// path: 'userList',
// name: 'UserList',
// component: () => import('@/views/system/user/userList'),
// meta: { title: '用户信息列表', },
},
{
path: 'userLog',
name: 'UserLog',
component: () => import('@/views/system/user/userLog'),
meta: { title: '用户操作日志', },
// },
// {
// path: 'userLog',
// name: 'UserLog',
// component: () => import('@/views/system/user/userLog'),
// meta: { title: '用户操作日志', },
}
// }
]
},
// ]
// },
]
export const asyncRoutes = [
......
......@@ -63,15 +63,15 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
}
if (route.component) {
// Layout ParentView 组件特殊处理
if (route.component === 'Layout') {
if (route.component == 'Layout') {
route.component = Layout
}
}
else if (route.component === 'ParentView') {
route.component = ParentView
} else if (route.component === 'InnerLink') {
route.component = InnerLink
}
else {
else {
route.component = loadView(route.component)
}
}
......
......@@ -8,9 +8,9 @@ function resolve(dir) {
const name = defaultSettings.title || '漏缆故障定位监测系统' // page title
const port = process.env.port || process.env.npm_config_port || 8890 // dev port
// const href = 'http://101.126.159.207'
const href = 'http://101.126.159.207'
// const href = 'http://127.0.0.1'
const href = 'http://192.168.0.122'
// const href = 'http://192.168.0.122'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment