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
ff5c535b
authored
2020-11-24 10:00:48 +0800
by
zhaoqian
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
多幢页面跳转,左侧目录树监听
1 parent
599df7a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
src/api/common.js
src/views/Home.vue
src/api/common.js
View file @
ff5c535
...
...
@@ -91,12 +91,13 @@ export function getTree(zdbsm) {
/**
* 根据自然幢BSM获取左侧目录树
*/
export
function
getTreeBy
Zrzbsm
(
zrzbsm
)
{
export
function
getTreeBy
Bsm
(
zrzbsm
,
type
)
{
return
request
({
url
:
'system/xzq/getMenuTreeBy
Zrzb
sm'
,
url
:
'system/xzq/getMenuTreeBy
B
sm'
,
method
:
'get'
,
params
:
{
zrzbsm
bsm
:
zrzbsm
,
type
:
type
}
})
}
...
...
src/views/Home.vue
View file @
ff5c535
...
...
@@ -52,7 +52,7 @@ import Navigation from "../components/IvyElement/navigation";
import
Create
from
"./panel/create/index"
;
import
LineTree
from
"../components/lineTree/lineTree"
;
import
{
setTimeout
}
from
"timers"
;
import
{
getTree
,
getDdicByMC
,
getTreeList
,
getTreeBy
Zrzb
sm
}
from
"../api/common"
;
import
{
getTree
,
getDdicByMC
,
getTreeList
,
getTreeBy
B
sm
}
from
"../api/common"
;
export
default
{
components
:
{
...
...
@@ -144,7 +144,9 @@ export default {
this
.
getRightTree
(
this
.
$store
.
state
.
zdbsm
);
}
else
if
(
newPath
==
"/zrz"
)
{
this
.
getRightTreeByZrzbsm
(
this
.
$store
.
state
.
zrzbsm
);
}
else
{
}
else
if
(
newPath
==
"/dz"
){
this
.
getRightTreeByDzbsm
(
this
.
$store
.
state
.
dzbsm
);
}
else
{
this
.
getTreeList
();
}
},
...
...
@@ -241,12 +243,21 @@ export default {
},
getRightTreeByZrzbsm
(
bsm
)
{
getTreeByZrzbsm
(
bsm
).
then
((
res
)
=>
{
getTreeByBsm
(
bsm
,
"zrz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
}
});
},
getRightTreeByDzbsm
(
bsm
)
{
getTreeByBsm
(
bsm
,
"dz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
}
});
},
sortNavigation
(
data
,
selectId
)
{
let
headTop
=
this
.
headTop
;
data
.
forEach
((
item
,
index
)
=>
{
...
...
Please
register
or
sign in
to post a comment