Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7a3d5122
authored
Jun 03, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
ff878714
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
src/App.vue
src/pages/monitor/editFence.vue
src/router/index.js
src/App.vue
View file @
7a3d512
...
...
@@ -75,26 +75,21 @@ export default {
},
methods
:
{
getBreadcrumb
()
{
const
{
getters
:
{
curBreadCrumb
}}
=
this
.
$root
.
parentVuex
;
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
);
// this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const
first
=
matched
[
0
];
const
{
meta
,
path
}
=
first
;
const
basePath
=
'/oEshield#'
;
let
breadcrumb
=
[];
if
(
meta
)
{
const
{
title
,
parentTitle
,
parentPath
}
=
meta
;
if
(
parentTitle
)
{
breadcrumb
.
push
({
name
:
parentTitle
,
path
:
basePath
+
parentPath
})
}
if
(
title
)
{
const
{
title
,
pushState
}
=
meta
;
if
(
pushState
&&
title
)
{
breadcrumb
.
push
({
name
:
title
,
path
:
basePath
+
path
})
this
.
$root
.
parentVuex
.
dispatch
(
'menu/setBreadCrumb'
,
[...
curBreadCrumb
,
breadcrumb
[
0
]]);
}
this
.
$root
.
parentVuex
.
dispatch
(
'menu/setBreadCrumb'
,
breadcrumb
);
}
},
toggle
(){
...
...
src/pages/monitor/editFence.vue
View file @
7a3d512
...
...
@@ -820,7 +820,8 @@ export default{
message
:
'提交成功'
,
type
:
'success'
});
this
.
$router
.
push
({
path
:
"fenceManagement"
})
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
}
else
{
this
.
$message
({
message
:
res
.
message
,
...
...
@@ -840,7 +841,8 @@ export default{
});
}
this
.
submitting
=
false
;
this
.
$router
.
push
({
path
:
"fenceManagement"
})
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
});
}
...
...
@@ -851,7 +853,8 @@ export default{
},
cancel
(){
this
.
$router
.
push
({
path
:
"fenceManagement"
})
window
.
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
},
getParams
(){
const
form
=
this
.
form
;
...
...
src/router/index.js
View file @
7a3d512
...
...
@@ -239,9 +239,8 @@ const routes = [
path
:
'editFence'
,
name
:
'editFence'
,
meta
:
{
title
:
'新增围栏'
,
parentTitle
:
'试驶线路管理'
,
parentPath
:
'/monitor/fenceManagement'
title
:
'新增围栏'
,
pushState
:
true
},
component
:
editFence
,
notMenu
:
true
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment