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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 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 {
...
@@ -75,26 +75,21 @@ export default {
},
},
methods
:
{
methods
:
{
getBreadcrumb
()
{
getBreadcrumb
()
{
const
{
getters
:
{
curBreadCrumb
}}
=
this
.
$root
.
parentVuex
;
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
);
// this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
let
matched
=
this
.
$route
.
matched
.
filter
(
item
=>
item
.
name
);
// this.$route.matched 可以获取到一个数组,包含当前路由的所有嵌套路径片段的路由记录
const
first
=
matched
[
0
];
const
first
=
matched
[
0
];
const
{
meta
,
path
}
=
first
;
const
{
meta
,
path
}
=
first
;
const
basePath
=
'/oEshield#'
;
const
basePath
=
'/oEshield#'
;
let
breadcrumb
=
[];
let
breadcrumb
=
[];
if
(
meta
)
{
if
(
meta
)
{
const
{
title
,
parentTitle
,
parentPath
}
=
meta
;
const
{
title
,
pushState
}
=
meta
;
if
(
parentTitle
)
{
if
(
pushState
&&
title
)
{
breadcrumb
.
push
({
name
:
parentTitle
,
path
:
basePath
+
parentPath
})
}
if
(
title
)
{
breadcrumb
.
push
({
breadcrumb
.
push
({
name
:
title
,
name
:
title
,
path
:
basePath
+
path
path
:
basePath
+
path
})
})
this
.
$root
.
parentVuex
.
dispatch
(
'menu/setBreadCrumb'
,
[...
curBreadCrumb
,
breadcrumb
[
0
]]);
}
}
this
.
$root
.
parentVuex
.
dispatch
(
'menu/setBreadCrumb'
,
breadcrumb
);
}
}
},
},
toggle
(){
toggle
(){
...
...
src/pages/monitor/editFence.vue
View file @
7a3d512
...
@@ -820,7 +820,8 @@ export default{
...
@@ -820,7 +820,8 @@ export default{
message
:
'提交成功'
,
message
:
'提交成功'
,
type
:
'success'
type
:
'success'
});
});
this
.
$router
.
push
({
path
:
"fenceManagement"
})
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -840,7 +841,8 @@ export default{
...
@@ -840,7 +841,8 @@ export default{
});
});
}
}
this
.
submitting
=
false
;
this
.
submitting
=
false
;
this
.
$router
.
push
({
path
:
"fenceManagement"
})
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
});
});
}
}
...
@@ -851,7 +853,8 @@ export default{
...
@@ -851,7 +853,8 @@ export default{
},
},
cancel
(){
cancel
(){
this
.
$router
.
push
({
path
:
"fenceManagement"
})
window
.
history
.
go
(
-
1
);
// this.$router.push({path:"fenceManagement"})
},
},
getParams
(){
getParams
(){
const
form
=
this
.
form
;
const
form
=
this
.
form
;
...
...
src/router/index.js
View file @
7a3d512
...
@@ -240,8 +240,7 @@ const routes = [
...
@@ -240,8 +240,7 @@ const routes = [
name
:
'editFence'
,
name
:
'editFence'
,
meta
:
{
meta
:
{
title
:
'新增围栏'
,
title
:
'新增围栏'
,
parentTitle
:
'试驶线路管理'
,
pushState
:
true
parentPath
:
'/monitor/fenceManagement'
},
},
component
:
editFence
,
component
:
editFence
,
notMenu
:
true
,
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