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
c2779c29
authored
2020-11-10 11:33:53 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加户的单击事件,获取选中的户bsm
1 parent
5ca85dc2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
7 deletions
src/views/systemZRZ/lpb/bjlp/index.vue
src/views/systemZRZ/lpb/bjlp/lpbContent/index.vue
src/views/systemZRZ/lpb/bjlp/index.vue
View file @
c2779c2
...
...
@@ -290,6 +290,11 @@ export default {
legendToggle
()
{
this
.
legendToggleFlag
=
!
this
.
legendToggleFlag
;
},
//获取选中户bsm
getHbsm
(
data
){
this
.
bsms
=
data
;
// console.log(this.bsms);
}
},
computed
:
{
},
...
...
src/views/systemZRZ/lpb/bjlp/lpbContent/index.vue
View file @
c2779c2
...
...
@@ -13,7 +13,7 @@
<!-- 显示层数 -->
<td
class=
"floor"
>
{{
cs
.
sjc
}}
层
</td>
<!-- 显示户 -->
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
>
{{
hs
.
hh
}}
</td>
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
@
click=
"handleTdClick($event,hs.bsm)"
>
{{
hs
.
hh
}}
</td>
</tr>
</table>
<!-- 幢单元名称 -->
...
...
@@ -37,7 +37,7 @@
<!-- 显示层数 -->
<td
class=
"floor"
>
{{
cs
.
sjc
}}
层
</td>
<!-- 显示户 -->
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
>
{{
hs
.
hh
}}
</td>
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
@
click=
"handleTdClick($event,hs.bsm)"
>
{{
hs
.
hh
}}
</td>
</tr>
</table>
<!-- 幢单元名称 -->
...
...
@@ -53,7 +53,7 @@
<!-- 显示层数 -->
<td
class=
"floor"
>
{{
cs
.
sjc
}}
层
</td>
<!-- 显示户 -->
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
>
{{
hs
.
hh
}}
</td>
<td
v-for=
"(hs,hsIndex) in cs.hs"
:key=
"hsIndex"
@
click=
"handleTdClick($event,hs.bsm)"
>
{{
hs
.
hh
}}
</td>
</tr>
</table>
</div>
...
...
@@ -376,7 +376,8 @@ export default {
ljzWidth
:
10000
,
zdyWidth
:
2000
,
cHeight
:
0
,
loading
:
true
loading
:
true
,
hbsmList
:[]
};
},
created
()
{
...
...
@@ -396,10 +397,7 @@ export default {
getLpb
(
zrzbsm
)
.
then
((
res
=>
{
if
(
res
.
code
==
200
)
{
// console.log(this.lpbData,'前');
this
.
lpbData
=
res
.
result
;
// this.lpbData.zdys.push(this.lpbData.zdys)
// console.log(this.lpbData,'后');
setTimeout
(()
=>
{
//计算逻辑幢宽度 20为marginRight值
this
.
ljzWidth
-=
9980
;
...
...
@@ -422,7 +420,29 @@ export default {
});
}
}))
},
//td点击事件
handleTdClick
(
e
,
bsm
){
//判断点击的户是否选中
if
(
e
.
target
.
className
.
indexOf
(
'tdSelect'
)
==
-
1
){
//未选中
e
.
target
.
className
=
'tdSelect'
;
//加边框
this
.
hbsmList
.
push
(
bsm
)
// 将户bsm放进hbsmList
}
else
{
//选中
e
.
target
.
className
=
''
;
this
.
deleteArrOption
(
this
.
hbsmList
,
bsm
);
}
this
.
$parent
.
getHbsm
(
this
.
hbsmList
);
},
//删除多重数组中的某一项
deleteArrOption
(
arr
,
item
)
{
for
(
var
i
=
arr
.
length
;
i
>
0
;
i
--
)
{
if
(
arr
[
i
-
1
]
==
item
)
{
arr
.
splice
(
i
-
1
,
1
);
}
}
},
},
computed
:
{
createFlagChange
()
{
...
...
@@ -536,6 +556,9 @@ export default {
line-height
:
64px
;
text-align
:
center
;
}
.tdSelect
{
border
:
1px
solid
#0091FF
!important
;
}
}
}
.name
{
...
...
Please
register
or
sign in
to post a comment