Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety
Commits
59af78cf
Commit
59af78cf
authored
Aug 16, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
飞过去显示infowindow
parent
eb4de9ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
15 deletions
+56
-15
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+1
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+28
-13
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+27
-1
No files found.
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
View file @
59af78cf
...
@@ -134,7 +134,7 @@ export default {
...
@@ -134,7 +134,7 @@ export default {
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
$router
.
push
({
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
$router
.
push
({
path
:
"/realtimeData/realtimedetail"
,
path
:
"/realtimeData/realtimedetail"
,
query
:
{
query
:
{
alarm
Id
:
this
.
obj
.
polyline
.
getExtData
().
lineData
.
pipeId
,
device
Id
:
this
.
obj
.
polyline
.
getExtData
().
lineData
.
pipeId
,
}
,
}
,
}
);
}
);
}
,
}
,
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
59af78cf
...
@@ -227,18 +227,22 @@ class gaodeMap {
...
@@ -227,18 +227,22 @@ class gaodeMap {
// // console.log(Card)
// // console.log(Card)
// // e.target.content = this.getMarketContent(data);
// // e.target.content = this.getMarketContent(data);
// });
// });
marker
.
on
(
"mouseover"
,
e
=>
{
// marker.on("mouseover", e => {
that
.
markerType
=
markerType
;
// that.markerType = markerType;
e
.
target
.
content
=
this
.
getMarketContent
(
data
);
// e.target.content = this.getMarketContent(data);
infoWindow
.
setContent
(
e
.
target
.
content
);
// infoWindow.setContent(e.target.content);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
// infoWindow.open(map, e.target.getPosition());
that
.
boxCollision
(
infoWindow
.
dom
);
// that.boxCollision(infoWindow.dom);
// that.addCloneDome(e.target, infoWindow);
// // that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// // infoWindow.close();
that
.
workerManInfoWindow
=
infoWindow
;
// that.workerManInfoWindow = infoWindow;
});
// });
marker
.
markerType
=
markerType
;
marker
.
data
=
data
;
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mousedown"
,
e
=>
{
marker
.
on
(
"mousedown"
,
e
=>
{
console
.
log
(
data
);
//
console.log(data);
that
.
closeInfoWindow
();
that
.
closeInfoWindow
();
if
(
marker
.
workerPoint
)
return
;
if
(
marker
.
workerPoint
)
return
;
that
.
workerManView
({
that
.
workerManView
({
...
@@ -342,7 +346,18 @@ class gaodeMap {
...
@@ -342,7 +346,18 @@ class gaodeMap {
return
marker
;
return
marker
;
}
}
wokerManOpen
=
(
e
)
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
data
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
this
.
workerManInfoWindow
=
e
.
target
.
infoWindow
;
}
// 鼠标移入设备时候实行的函数
infoOpen
=
e
=>
{
infoOpen
=
e
=>
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
...
@@ -350,7 +365,7 @@ class gaodeMap {
...
@@ -350,7 +365,7 @@ class gaodeMap {
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
this
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
this
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
}
console
.
log
(
"that
.markerType"
,
this
.
markerType
);
// console.log("this
.markerType", this.markerType);
// 警告状态这样就要换infowindow
// 警告状态这样就要换infowindow
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
getExtData
(),
e
.
target
.
getExtData
(),
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
59af78cf
...
@@ -724,13 +724,14 @@ export default {
...
@@ -724,13 +724,14 @@ export default {
this
.
polylineInfoWindowShow
(
iten
,
lat
,
lng
);
this
.
polylineInfoWindowShow
(
iten
,
lat
,
lng
);
}
else
if
(
item
.
value
==
9
)
{
}
else
if
(
item
.
value
==
9
)
{
// 工作人员
// 工作人员
this
.
workerManInfoWindowShow
(
iten
,
lat
,
lng
);
}
else
{
}
else
{
// 其他设备
// 其他设备
this
.
diveceInfoWindowShow
(
iten
,
lat
,
lng
);
this
.
diveceInfoWindowShow
(
iten
,
lat
,
lng
);
}
}
},
},
// 如果是线条出现infowindow
// 如果是线条
飞过去
出现infowindow
polylineInfoWindowShow
(
iten
,
lat
,
lng
)
{
polylineInfoWindowShow
(
iten
,
lat
,
lng
)
{
const
target
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
const
target
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
return
item
.
getExtData
().
lineData
.
pipeId
==
iten
.
deviceId
;
return
item
.
getExtData
().
lineData
.
pipeId
==
iten
.
deviceId
;
...
@@ -770,6 +771,30 @@ export default {
...
@@ -770,6 +771,30 @@ export default {
this
.
gaoMap
.
infoOpen
(
e
);
this
.
gaoMap
.
infoOpen
(
e
);
};
};
},
},
// workerMan,值班人员飞过去后侠士infowindow
workerManInfoWindowShow
(
iten
,
lat
,
lng
)
{
// console.log("iten",iten.userId)
const
target
=
this
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
return
item
.
getExtData
().
userId
==
iten
.
userId
;
})[
0
];
console
.
log
(
"target"
,
target
);
const
e
=
{
target
,
lnglat
:
iten
.
path
,
};
// 如果是原地不动,就直接执行
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
==
lat
)
{
this
.
gaoMap
.
wokerManOpen
(
e
);
return
;
}
// 因为地图移动的时候infowindow无法显示
this
.
gaoMap
.
handleInfoWindowOpenFunc
=
()
=>
{
this
.
gaoMap
.
wokerManOpen
(
e
);
};
},
// 向右的箭头的动画
arrowRightChange
(
item
)
{
arrowRightChange
(
item
)
{
const
index
=
this
.
arrowRightNum
.
indexOf
(
item
.
value
);
const
index
=
this
.
arrowRightNum
.
indexOf
(
item
.
value
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
...
@@ -864,6 +889,7 @@ export default {
...
@@ -864,6 +889,7 @@ export default {
this
.
allList
[
3
]
=
lljArr
;
this
.
allList
[
3
]
=
lljArr
;
this
.
allList
[
4
]
=
ylbArr
;
this
.
allList
[
4
]
=
ylbArr
;
},
},
// 值班人员
workerManClassify
(
workManData
)
{
workerManClassify
(
workManData
)
{
const
workManArr
=
workManData
.
map
((
item
,
index
)
=>
{
const
workManArr
=
workManData
.
map
((
item
,
index
)
=>
{
return
{
return
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment