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
6fa087fa
authored
2020-12-17 15:03:43 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
左侧目录树相同宗地下的幢信息双击时不再重新加载目录树数据
1 parent
e245eead
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
30 deletions
src/components/lineTree/lineItem.vue
src/components/lineTree/lineTree.vue
src/store/index.js
src/views/Home.vue
src/components/lineTree/lineItem.vue
View file @
6fa087f
...
...
@@ -15,7 +15,7 @@
<div
class=
"row-flex-start basic_banner"
@
click=
"itemClick(item)"
@
dblclick=
"dbclick(item)"
@
dblclick=
"dbclick(item
,item.zdbsm
)"
:class=
"
{
active_color: item.expand,
}"
...
...
@@ -48,6 +48,8 @@
active_color: item.expand,
curPage:$route.query.bsm
&&
$route.query.bsm==item.bsm
}"
:ref="($route.query.bsm
&&
$route.query.bsm==item.bsm)?'curZxx':''"
:data-zdbsm="item.zdbsm"
>
<img
class=
"qsztImg"
v-if=
"item.qszt=='0'"
:src=
"linshi"
/>
<img
class=
"qsztImg"
v-if=
"item.qszt=='1'"
:src=
"zhengshi"
/>
...
...
@@ -104,7 +106,11 @@ export default {
}
},
mounted
(){
// console.log(this.$refs.curZxx,'this.$refs.curZxx');
if
(
this
.
$refs
.
curZxx
){
console
.
log
(
this
.
$refs
.
curZxx
[
0
].
dataset
.
zdbsm
);
this
.
$store
.
state
.
oldZdbsm
=
this
.
$refs
.
curZxx
[
0
].
dataset
.
zdbsm
;
}
},
methods
:
{
itemClick
(
item
)
{
...
...
@@ -174,8 +180,9 @@ export default {
}
},
// 左键双击事件
dbclick
(
item
,)
{
dbclick
(
item
,
bsm
)
{
clearTimeout
(
this
.
time
);
this
.
$store
.
state
.
newZdbsm
=
bsm
;
//此处不要将$router移到if的外面,因为可能是双击行政区,就不知道去哪儿了
if
(
item
.
type
==
'zd'
)
{
this
.
$store
.
state
.
zdbsm
=
item
.
bsm
;
...
...
src/components/lineTree/lineTree.vue
View file @
6fa087f
...
...
@@ -137,20 +137,20 @@ export default {
}
},
components
:
{
lineItem
,
Create
,
ImportGeo
,
sxdr
},
mixins
:[
geoUtils
,
featureUpdate
],
mixins
:[
geoUtils
,
featureUpdate
],
data
()
{
return
{
sxdrVisible
:
false
,
selectedDetail
:
{},
timer
:
{},
formatData
:
[]
,
formatData
:
this
.
$store
.
state
.
treeData
,
visible
:
false
,
top
:
0
,
left
:
0
,
isZD
:
true
,
zdData
:{},
currentClickZdGeo
:
""
,
improtDialog
:
false
,
currentClickZdGeo
:
""
,
improtDialog
:
false
,
dialogVisible
:
false
,
//控制楼盘表
lpbvisible
:
false
,
...
...
@@ -167,9 +167,7 @@ export default {
watch
:
{
pd
(
n
,
o
)
{
this
.
formatData
=
this
.
preDealData
(
n
);
console
.
log
(
this
.
formatData
);
},
lpbvisible
(
value
)
{
if
(
value
)
{
document
.
body
.
addEventListener
(
"click"
,
this
.
closeMenu
);
...
...
@@ -194,7 +192,6 @@ export default {
// }
},
created
()
{
console
.
log
(
"lineTree create"
);
this
.
preDealData
(
this
.
pd
);
// this.expandTreeItemById(["6b5af49d803f97baf06afb897de257f5"]);
},
...
...
@@ -302,8 +299,6 @@ export default {
},
itemClick
(
item
)
{
// item.expand = item.expand == undefined? true:!item.expand;
console
.
log
(
item
,
'item'
);
console
.
log
(
this
.
formatData
,
'this.formatData'
);
this
.
formatData
.
forEach
(
i
=>
{
if
(
i
.
bsm
!=
item
.
bsm
){
i
.
expand
=
false
...
...
@@ -337,11 +332,9 @@ export default {
})
}
})
console
.
log
(
this
.
formatData
,
'formatData'
);
},
//自然幢右键点击事件
openMenu
(
e
,
item
){
console
.
log
(
item
,
'右键item'
);
this
.
lpbleft
=
e
.
pageX
;
this
.
lpbtop
=
e
.
pageY
;
this
.
zdData
=
item
;
...
...
src/store/index.js
View file @
6fa087f
...
...
@@ -50,6 +50,8 @@ const store = new Vuex.Store({
zrzh
:
''
,
//自然幢号
dzbsm
:
''
,
// 多幢bsm
treeData
:[],
// 树数据
oldZdbsm
:
''
,
newZdbsm
:
''
,
},
modules
:
{
user
,
...
...
src/views/Home.vue
View file @
6fa087f
...
...
@@ -11,7 +11,7 @@
<span
class=
"logo-text"
v-show=
"!textLogo"
>
不动产权籍调查系统
</span>
</div>
<div
class=
"treeModule"
:style=
"
{height:treeHeight+'px'}">
<LineTree
:pd=
"pd"
@
itemClick=
"itemClick"
></LineTree>
<LineTree
:pd=
"pd"
v-if=
"lineTreeVisible"
@
itemClick=
"itemClick"
></LineTree>
</div>
</el-aside>
<el-container
class=
"calcWidth"
>
...
...
@@ -137,11 +137,12 @@ export default {
"/announcement_template"
:
"PSH019"
,
"/business_management"
:
"PSH020"
,
},
pd
:
[]
,
pd
:
this
.
$store
.
state
.
treeData
,
dialogVisible
:
false
,
isMap
:
false
,
isMap
:
false
,
treeHeight
:
0
,
routerInfo
:
null
routerInfo
:
null
,
lineTreeVisible
:
false
,
};
},
computed
:
{
...
...
@@ -192,10 +193,15 @@ export default {
"$store.state.treeData"
:
function
(
val
)
{
console
.
log
(
val
,
'val'
);
this
.
pd
=
val
;
}
},
'$store.state.treeZdbsm'
:
function
(
val
)
{
console
.
log
(
val
,
'val'
);
},
},
mounted
(){
this
.
$nextTick
(()
=>
{
this
.
lineTreeVisible
=
true
})
},
created
()
{
if
(
this
.
$route
.
meta
)
{
...
...
@@ -313,24 +319,35 @@ export default {
getTree
(
bsm
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
this
.
$store
.
state
.
newZdbsm
=
''
;
}
});
},
getRightTreeByZrzbsm
(
bsm
)
{
getTreeByBsm
(
bsm
,
"zrz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
}
});
if
(
this
.
$store
.
state
.
newZdbsm
!=
this
.
$store
.
state
.
oldZdbsm
)
{
getTreeByBsm
(
bsm
,
"zrz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
this
.
$store
.
state
.
treeData
=
res
.
result
;
}
});
}
else
{
}
},
getRightTreeByDzbsm
(
bsm
)
{
getTreeByBsm
(
bsm
,
"dz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
}
});
if
(
this
.
$store
.
state
.
newZdbsm
!=
this
.
$store
.
state
.
oldZdbsm
)
{
getTreeByBsm
(
bsm
,
"dz"
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
pd
=
res
.
result
;
this
.
$store
.
state
.
treeData
=
res
.
result
;
}
});
}
else
{
}
},
getRightTreeByHbsm
(
bsm
)
{
...
...
@@ -402,6 +419,7 @@ export default {
getTreeList
(){
getTreeList
().
then
((
res
)
=>
{
this
.
pd
=
res
.
result
;
this
.
$store
.
state
.
newZdbsm
=
''
;
})
},
goBack
(){
...
...
Please
register
or
sign in
to post a comment