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
5b34823b
authored
2020-10-21 15:42:53 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
宗地双击事件
1 parent
7d23a82e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
src/components/lineTree/lineItem.vue
src/components/lineTree/lineTree.vue
src/components/lineTree/lineItem.vue
View file @
5b34823
...
...
@@ -15,6 +15,7 @@
<div
class=
"row-flex-start basic_banner"
@
click=
"itemClick(item)"
@
dblclick=
"dbclick(item)"
:class=
"
{
active_color: item.expand,
}"
...
...
@@ -70,14 +71,25 @@ export default {
default
:
false
,
},
},
data
()
{
return
{
time
:
null
}
},
methods
:
{
itemClick
(
item
)
{
let
self
=
this
;
// 开启延时器,300ms的间隔区分单击和双击,解决双击时执行两次单击事件
clearTimeout
(
self
.
time
);
self
.
time
=
setTimeout
(()
=>
{
item
.
expand
=
!
item
.
expand
;
this
.
$emit
(
"itemClick"
,
item
);
self
.
$emit
(
"itemClick"
,
item
);
if
(
!
item
.
children
)
{
this
.
$emit
(
"valClick"
,
item
);
self
.
$emit
(
"valClick"
,
item
);
}
},
300
);
},
// 右键点击事件
openMenu
(
e
,
item
)
{
if
(
item
.
zdbsm
)
{
var
x
=
e
.
pageX
;
...
...
@@ -100,6 +112,13 @@ export default {
// this.left = x;
// this.visible = true;
},
// 左键双击事件
dbclick
(
item
)
{
clearTimeout
(
this
.
time
);
if
(
item
.
zdbsm
||
item
.
zrzbsm
)
{
this
.
$router
.
push
(
"/zd"
);
}
},
closeMenu
()
{
this
.
$emit
(
"changeVisible"
,
false
);
// this.visible = false;
...
...
src/components/lineTree/lineTree.vue
View file @
5b34823
...
...
@@ -119,7 +119,6 @@ export default {
},
// 根据id展开树的具体项
expandTreeItemById
(
idList
)
{
debugger
;
let
_this
=
this
;
function
loopTree
(
list
)
{
list
.
forEach
((
x
)
=>
{
...
...
@@ -221,6 +220,13 @@ export default {
position
:
relative
;
color
:
#ffffff
;
cursor
:
pointer
;
moz-user-select
:
-moz-none
;
-moz-user-select
:
none
;
-o-user-select
:
none
;
-khtml-user-select
:
none
;
-webkit-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
.layer_text
{
flex
:
1
;
}
...
...
Please
register
or
sign in
to post a comment