Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
cd623270
authored
2020-11-26 16:29:40 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
刷新页面后根据不同路由高亮相对应的导航并获取不同树结构数据
1 parent
43481d0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
src/router/routes.js
src/views/Home.vue
src/router/routes.js
View file @
cd62327
...
...
@@ -30,12 +30,6 @@ const constantRoutes = [
component
:
()
=>
import
(
"@/views/panel/index"
),
},
{
path
:
"/create"
,
name
:
"新建"
,
code
:
"0-2"
,
component
:
()
=>
import
(
"@/views/panel/create/index"
),
},
{
path
:
"/add"
,
name
:
"添加"
,
code
:
"0-6"
,
...
...
@@ -77,12 +71,6 @@ const constantRoutes = [
code
:
"1-5"
,
component
:
()
=>
import
(
"@/views/zd/index"
),
},
{
path
:
"/c"
,
name
:
"层"
,
code
:
"1-7"
,
component
:
()
=>
import
(
"@/views/zrz/c/index"
),
},
],
},
];
...
...
src/views/Home.vue
View file @
cd62327
...
...
@@ -204,7 +204,24 @@ export default {
// this.sortNavigation(this.navigationList, indId);
// }
this
.
getDic
();
this
.
getTreeList
();
//刷新页面后根据不同路由获取不同树结构数据
if
(
this
.
$route
.
path
==
'/zrz'
){
this
.
getRightTreeByZrzbsm
(
this
.
$store
.
state
.
zrzbsm
)
}
else
if
(
this
.
$route
.
path
==
'/zd'
){
this
.
getRightTree
(
this
.
$store
.
state
.
zdbsm
)
}
else
{
this
.
getTreeList
();
}
//刷新页面后根据不同路由高亮相对应的导航
if
(
this
.
$route
.
path
==
'/zrz'
||
this
.
$route
.
path
==
'/zd'
||
this
.
$route
.
path
==
'/dz'
){
}
else
{
this
.
headTop
.
forEach
(
item
=>
{
if
(
item
.
path
==
this
.
$route
.
path
)
{
item
.
select
=
true
;
}
})
}
this
.
$nextTick
(()
=>
{
this
.
treeHeight
=
this
.
$el
.
clientHeight
-
120
;
});
...
...
Please
register
or
sign in
to post a comment