Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
web-monitor
Commits
c868e90d
Commit
c868e90d
authored
Jan 16, 2025
by
dupengyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由调整
parent
61317410
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
183 deletions
+189
-183
menu.js
src/api/system/menu.js
+1
-1
index.js
src/router/index.js
+183
-177
peimission.js
src/store/modules/peimission.js
+3
-3
vue.config.js
vue.config.js
+2
-2
No files found.
src/api/system/menu.js
View file @
c868e90d
...
@@ -36,7 +36,7 @@ export function roleMenuTreeselect(roleId) {
...
@@ -36,7 +36,7 @@ export function roleMenuTreeselect(roleId) {
// 新增菜单
// 新增菜单
export
function
addMenu
(
data
)
{
export
function
addMenu
(
data
)
{
return
request
({
return
request
({
url
:
'/api/menu'
,
url
:
'/api/menu
/add
'
,
method
:
'post'
,
method
:
'post'
,
data
:
data
data
:
data
})
})
...
...
src/router/index.js
View file @
c868e90d
...
@@ -22,6 +22,11 @@ export const constantRoutes = [
...
@@ -22,6 +22,11 @@ export const constantRoutes = [
meta
:
{
title
:
"登录"
},
meta
:
{
title
:
"登录"
},
hidden
:
true
hidden
:
true
},
},
{
path
:
'/'
,
component
:
Layout
,
redirect
:
'/dashboard'
,
},
// {
// {
// path: '/alarm',
// path: '/alarm',
// component: Layout,
// component: Layout,
...
@@ -43,126 +48,126 @@ export const constantRoutes = [
...
@@ -43,126 +48,126 @@ export const constantRoutes = [
// }
// }
// ]
// ]
// },
// },
{
//
{
path
:
'/setting'
,
//
path: '/setting',
component
:
Layout
,
//
component: Layout,
redirect
:
'/setting/add'
,
//
redirect: '/setting/add',
name
:
'Setting'
,
//
name: 'Setting',
meta
:
{
title
:
'配置管理'
,
icon
:
'setting'
},
//
meta: { title: '配置管理', icon: 'setting' },
children
:
[
//
children: [
{
//
{
path
:
'add'
,
//
path: 'add',
name
:
'settingAdd'
,
//
name: 'settingAdd',
component
:
()
=>
import
(
'@/views/setting/add/index'
),
//
component: () => import('@/views/setting/add/index'),
meta
:
{
title
:
'手动添加配置'
}
//
meta: { title: '手动添加配置' }
},
//
},
{
//
{
path
:
'auto'
,
//
path: 'auto',
name
:
'settingAuto'
,
//
name: 'settingAuto',
component
:
()
=>
import
(
'@/views/setting/auto/index'
),
//
component: () => import('@/views/setting/auto/index'),
meta
:
{
title
:
'自动添加配置'
}
//
meta: { title: '自动添加配置' }
},
//
},
{
//
{
path
:
'statistics'
,
//
path: 'statistics',
name
:
'settingAtatistics'
,
//
name: 'settingAtatistics',
component
:
()
=>
import
(
'@/views/setting/statistics/index'
),
//
component: () => import('@/views/setting/statistics/index'),
meta
:
{
title
:
'配置信息统计'
},
//
meta: { title: '配置信息统计' },
children
:
[
//
children: [
]
//
]
},
//
},
{
//
{
path
:
'parameter'
,
//
path: 'parameter',
name
:
'parameter'
,
//
name: 'parameter',
component
:
()
=>
import
(
'@/views/setting/parameter/index'
),
//
component: () => import('@/views/setting/parameter/index'),
meta
:
{
title
:
'参数查询'
}
//
meta: { title: '参数查询' }
},
//
},
{
//
{
path
:
"/detail/
"
,
// path: "detail
",
name
:
"detail"
,
//
name: "detail",
beforeEnter
:
(
to
,
from
,
next
)
=>
{
//
beforeEnter: (to, from, next) => {
if
(
to
.
query
.
type
==
1
)
{
//
if (to.query.type == 1) {
to
.
meta
.
title
=
'铁路线详情'
//
to.meta.title = '铁路线详情'
}
//
}
else
if
(
to
.
query
.
type
==
2
)
{
//
else if (to.query.type == 2) {
to
.
meta
.
title
=
'站点详情'
//
to.meta.title = '站点详情'
}
//
}
else
if
(
to
.
query
.
type
==
3
)
{
//
else if (to.query.type == 3) {
to
.
meta
.
title
=
'FSU详情'
//
to.meta.title = 'FSU详情'
}
//
}
else
if
(
to
.
query
.
type
==
4
)
{
//
else if (to.query.type == 4) {
to
.
meta
.
title
=
'监测设备详情'
//
to.meta.title = '监测设备详情'
}
//
}
else
if
(
to
.
query
.
type
==
5
)
{
//
else if (to.query.type == 5) {
to
.
meta
.
title
=
'漏缆详情'
//
to.meta.title = '漏缆详情'
}
//
}
else
if
(
to
.
query
.
type
==
6
)
{
//
else if (to.query.type == 6) {
to
.
meta
.
title
=
'天馈线详情'
//
to.meta.title = '天馈线详情'
}
else
{
//
} else {
to
.
meta
.
title
=
'详情'
//
to.meta.title = '详情'
}
//
}
next
()
//
next()
},
//
},
component
:
()
=>
import
(
'@/views/setting/statistics/detail'
),
//
component: () => import('@/views/setting/statistics/detail'),
hidden
:
true
,
//
hidden: true,
},
//
},
]
//
]
},
//
},
{
//
{
path
:
'/monitor'
,
//
path: '/monitor',
component
:
Layout
,
//
component: Layout,
redirect
:
'/dashboard'
,
//
redirect: '/dashboard',
name
:
'监测实时状态'
,
//
name: '监测实时状态',
meta
:
{
title
:
'监测实时状态'
,
icon
:
'system'
},
//
meta: { title: '监测实时状态', icon: 'system' },
children
:
[
//
children: [
{
//
{
path
:
'leakageCable'
,
//
path: 'leakageCable',
name
:
'漏缆实时状态'
,
//
name: '漏缆实时状态',
component
:
()
=>
import
(
'@/views/monitor/leakageCable/index'
),
//
component: () => import('@/views/monitor/leakageCable/index'),
meta
:
{
title
:
'漏缆实时状态'
}
//
meta: { title: '漏缆实时状态' }
},
//
},
// {
//
// {
// path: 'equipment',
//
// path: 'equipment',
// name: '设备实时状态',
//
// name: '设备实时状态',
// component: () => import('@/views/monitor/equipment/index'),
//
// component: () => import('@/views/monitor/equipment/index'),
// meta: { title: '设备实时状态' }
//
// meta: { title: '设备实时状态' }
// }
//
// }
]
//
]
},
//
},
{
//
{
path
:
'/jobgroup'
,
//
path: '/jobgroup',
component
:
Layout
,
//
component: Layout,
redirect
:
'/jobgroup'
,
//
redirect: '/jobgroup',
name
:
'Jobgroup'
,
//
name: 'Jobgroup',
meta
:
{
title
:
'轮询管理'
,
icon
:
'history'
},
//
meta: { title: '轮询管理', icon: 'history' },
children
:
[
//
children: [
{
//
{
path
:
'screen'
,
//
path: 'screen',
name
:
'screen'
,
//
name: 'screen',
component
:
()
=>
import
(
'@/views/jobgroup/screen/index.vue'
),
//
component: () => import('@/views/jobgroup/screen/index.vue'),
meta
:
{
title
:
'运行报表'
}
//
meta: { title: '运行报表' }
},
//
},
{
//
{
path
:
'jobinfo'
,
//
path: 'jobinfo',
name
:
'jobinfo'
,
//
name: 'jobinfo',
component
:
()
=>
import
(
'@/views/jobgroup/jobinfo/index.vue'
),
//
component: () => import('@/views/jobgroup/jobinfo/index.vue'),
meta
:
{
title
:
'任务管理'
}
//
meta: { title: '任务管理' }
},
//
},
{
//
{
path
:
'joblog'
,
//
path: 'joblog',
name
:
'joblog'
,
//
name: 'joblog',
component
:
()
=>
import
(
'@/views/jobgroup/joblog/index.vue'
),
//
component: () => import('@/views/jobgroup/joblog/index.vue'),
meta
:
{
title
:
'调度日志'
}
//
meta: { title: '调度日志' }
},
//
},
{
//
{
path
:
'jobmanage'
,
//
path: 'jobmanage',
name
:
'jobmanage'
,
//
name: 'jobmanage',
component
:
()
=>
import
(
'@/views/jobgroup/jobmanage/index.vue'
),
//
component: () => import('@/views/jobgroup/jobmanage/index.vue'),
meta
:
{
title
:
'执行器管理'
}
//
meta: { title: '执行器管理' }
},
//
},
]
//
]
},
//
},
// {
// {
// path: '/history',
// path: '/history',
// component: Layout,
// component: Layout,
...
@@ -196,69 +201,70 @@ export const constantRoutes = [
...
@@ -196,69 +201,70 @@ export const constantRoutes = [
// }
// }
// ]
// ]
// },
// },
{
// {
path
:
'/backup'
,
// path: '/backup',
component
:
Layout
,
// component: Layout,
redirect
:
'/dashboard'
,
// redirect: '/dashboard',
name
:
'备份管理'
,
// name: '备份管理',
meta
:
{
title
:
'备份管理'
,
icon
:
'backup'
},
// meta: { title: '备份管理', icon: 'backup' },
children
:
[
// children: [
{
// {
path
:
'backups'
,
// path: 'backups',
name
:
'数据备份'
,
// name: '数据备份',
component
:
()
=>
import
(
'@/views/backup/backups/index'
),
// component: () => import('@/views/backup/backups/index'),
meta
:
{
title
:
'数据备份'
}
// meta: { title: '数据备份' }
},
// },
{
// {
path
:
'synchronize'
,
// path: 'synchronize',
name
:
'时间同步'
,
// name: '时间同步',
component
:
()
=>
import
(
'@/views/backup/synchronize/index'
),
// component: () => import('@/views/backup/synchronize/index'),
meta
:
{
title
:
'时间同步'
}
// meta: { title: '时间同步' }
}
// }
]
// ]
},
{
// },
path
:
'/system'
,
// {
component
:
Layout
,
// path: '/system',
redirect
:
'/dashboard'
,
// component: Layout,
name
:
'系统管理'
,
// redirect: '/dashboard',
meta
:
{
title
:
'系统管理'
,
icon
:
'backup'
},
// name: '系统管理',
children
:
[
// meta: { title: '系统管理', icon: 'backup' },
{
// children: [
path
:
'menu'
,
// {
name
:
'菜单管理'
,
// path: 'menu',
component
:
()
=>
import
(
'@/views/system/menu/index'
),
// name: '菜单管理',
meta
:
{
title
:
'菜单管理'
}
// component: () => import('@/views/system/menu/index'),
},
// meta: { title: '菜单管理' }
{
// },
path
:
'role'
,
// {
name
:
'角色管理'
,
// path: 'role',
component
:
()
=>
import
(
'@/views/system/role/index'
),
// name: '角色管理',
meta
:
{
title
:
'角色管理'
}
// component: () => import('@/views/system/role/index'),
},
// meta: { title: '角色管理' }
{
// },
path
:
'updateUser'
,
// {
name
:
'UpdateUser'
,
// path: 'updateUser',
component
:
()
=>
import
(
'@/views/system/user/updateUser'
),
// name: 'UpdateUser',
meta
:
{
title
:
'个人信息管理'
,
},
// component: () => import('@/views/system/user/updateUser'),
// meta: { title: '个人信息管理', },
},
//
},
{
//
{
path
:
'userList'
,
//
path: 'userList',
name
:
'UserList'
,
//
name: 'UserList',
component
:
()
=>
import
(
'@/views/system/user/userList'
),
//
component: () => import('@/views/system/user/userList'),
meta
:
{
title
:
'用户信息列表'
,
},
//
meta: { title: '用户信息列表', },
},
//
},
{
//
{
path
:
'userLog'
,
//
path: 'userLog',
name
:
'UserLog'
,
//
name: 'UserLog',
component
:
()
=>
import
(
'@/views/system/user/userLog'
),
//
component: () => import('@/views/system/user/userLog'),
meta
:
{
title
:
'用户操作日志'
,
},
//
meta: { title: '用户操作日志', },
}
//
}
]
//
]
},
//
},
]
]
export
const
asyncRoutes
=
[
export
const
asyncRoutes
=
[
...
...
src/store/modules/peimission.js
View file @
c868e90d
...
@@ -63,15 +63,15 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
...
@@ -63,15 +63,15 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
}
}
if
(
route
.
component
)
{
if
(
route
.
component
)
{
// Layout ParentView 组件特殊处理
// Layout ParentView 组件特殊处理
if
(
route
.
component
==
=
'Layout'
)
{
if
(
route
.
component
==
'Layout'
)
{
route
.
component
=
Layout
route
.
component
=
Layout
}
}
else
if
(
route
.
component
===
'ParentView'
)
{
else
if
(
route
.
component
===
'ParentView'
)
{
route
.
component
=
ParentView
route
.
component
=
ParentView
}
else
if
(
route
.
component
===
'InnerLink'
)
{
}
else
if
(
route
.
component
===
'InnerLink'
)
{
route
.
component
=
InnerLink
route
.
component
=
InnerLink
}
}
else
{
else
{
route
.
component
=
loadView
(
route
.
component
)
route
.
component
=
loadView
(
route
.
component
)
}
}
}
}
...
...
vue.config.js
View file @
c868e90d
...
@@ -8,9 +8,9 @@ function resolve(dir) {
...
@@ -8,9 +8,9 @@ function resolve(dir) {
const
name
=
defaultSettings
.
title
||
'漏缆故障定位监测系统'
// page title
const
name
=
defaultSettings
.
title
||
'漏缆故障定位监测系统'
// page title
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
8890
// dev port
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://127.0.0.1'
const
href
=
'http://192.168.0.122'
//
const href = 'http://192.168.0.122'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment