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
4a5ae085
Commit
4a5ae085
authored
Aug 04, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.61.77.35:9999/gengdidi/gassafety
into master
parents
aa9ab514
5499b8db
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
694 additions
and
185 deletions
+694
-185
lineInfoWindow.vue
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
+57
-16
markerInfoWindow.vue
gassafety-web/src/components/PopWindow/markerInfoWindow.vue
+87
-128
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+45
-35
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+258
-0
markerInfoWindow.vue
...fety-web/src/components/PopWindowGis/markerInfoWindow.vue
+203
-0
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+35
-5
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+9
-1
No files found.
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
View file @
4a5ae085
...
@@ -36,23 +36,41 @@
...
@@ -36,23 +36,41 @@
<
/div
>
<
/div
>
<
div
class
=
"pic"
>
<
div
class
=
"pic"
>
<
img
:
src
=
"obj.iconUrl"
alt
=
""
/>
<
img
@
mousedown
.
stop
=
"mousedown"
:
src
=
"obj.iconUrl"
alt
=
""
/>
<
el
-
image
v
-
show
=
"false"
id
=
"img"
ref
=
"previewImg"
:
src
=
"obj.iconUrl"
:
preview
-
src
-
list
=
"bigImageArr"
:
z
-
index
=
"9999999"
><
/el-image
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"maintain-content"
>
<
div
class
=
"maintain-content"
>
<
el
-
col
:
span
=
"11"
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
/el-col
>
<
el
-
col
:
span
=
"13"
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
?
obj
.
inspectionTime
:
"-"
}}
<
/span
>
<
/div
>
<
/el-col
>
<
div
>
<
div
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
/div
>
<
div
>
<
div
>
<
span
>
备注信息:
<
/span
>
<
span
>
备注信息:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
...
@@ -83,8 +101,30 @@ export default {
...
@@ -83,8 +101,30 @@ export default {
created
()
{
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
console
.
log
(
"created"
,
this
.
obj
);
}
,
}
,
mounted
()
{
}
,
computed
:
{
bigImageArr
()
{
return
[
this
.
obj
.
iconUrl
];
}
,
}
,
methods
:
{
methods
:
{
moment
,
moment
,
mousedown
(
e
)
{
return
;
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
console
.
log
(
this
.
$refs
.
previewImg
.
showViewer
);
// 加载出来的dom给个事件阻止冒泡
setTimeout
(()
=>
{
const
dom
=
document
.
getElementsByClassName
(
"el-image-viewer__wrapper"
)[
0
];
dom
.
addEventListener
(
"mousedown"
,
(
e
)
=>
{
e
.
stopPropagation
();
console
.
log
(
"?"
);
}
);
}
);
}
,
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
...
@@ -115,7 +155,7 @@ export default {
...
@@ -115,7 +155,7 @@ export default {
}
}
.
right
{
.
right
{
padding
-
right
:
22
px
;
padding
-
right
:
22
px
;
img
{
img
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
...
@@ -126,7 +166,7 @@ export default {
...
@@ -126,7 +166,7 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
overflow
-
y
:
auto
;
.
eq
-
content
{
.
eq
-
content
{
min
-
height
:
156
px
;
//
min-height: 156px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
13
px
22
px
0
px
22
px
;
padding
:
13
px
22
px
0
px
22
px
;
// border-bottom: 1px solid #e2e2e2;
// border-bottom: 1px solid #e2e2e2;
...
@@ -152,12 +192,13 @@ export default {
...
@@ -152,12 +192,13 @@ export default {
}
}
}
}
.
pic
{
.
pic
{
width
:
1
77
px
;
width
:
1
80
px
;
height
:
1
29
px
;
height
:
1
03
px
;
// background-color: black;
// background-color: black;
img
{
img
{
width
:
100
%
;
width
:
100
%
;
height
:
100
%
;
height
:
100
%
;
// cursor: pointer;
}
}
}
}
}
}
...
@@ -165,9 +206,9 @@ export default {
...
@@ -165,9 +206,9 @@ export default {
.
maintain
-
content
{
.
maintain
-
content
{
width
:
100
%
;
width
:
100
%
;
height
:
119
px
;
max
-
height
:
119
px
;
padding
-
left
:
22
px
;
padding
-
left
:
22
px
;
padding
-
right
:
22
px
;
//
padding-right: 22px;
padding
-
bottom
:
10
px
;
padding
-
bottom
:
10
px
;
// padding-top: 16px;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
...
@@ -180,7 +221,7 @@ export default {
...
@@ -180,7 +221,7 @@ export default {
vertical
-
align
:
top
;
vertical
-
align
:
top
;
display
:
inline
-
block
;
display
:
inline
-
block
;
word
-
break
:
break
-
all
;
word
-
break
:
break
-
all
;
max
-
width
:
2
5
0
px
;
max
-
width
:
2
8
0
px
;
}
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindow/markerInfoWindow.vue
View file @
4a5ae085
...
@@ -21,11 +21,33 @@
...
@@ -21,11 +21,33 @@
</div>
</div>
</div>
</div>
<!-- 维修人员 -->
<!-- 维修人员 -->
<div
class=
"maintain-content"
>
<div
class=
"maintain-content"
>
<div>
管道所在地址:
<span>
{{
data
.
deviceAddr
}}
</span></div>
<el-col
:span=
"11"
>
<div>
安装日期:
<span>
{{
data
.
installationTime
}}
</span></div>
<div>
<div>
最后巡检日期:
<span></span></div>
<span>
安装日期:
</span>
<div>
备注信息:
<span>
{{
data
.
remarks
}}
</span></div>
<span>
{{
moment
(
data
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
</span>
</div>
</el-col>
<el-col
:span=
"13"
>
<div>
<span>
最后巡检日期:
</span>
<span>
{{
data
.
inspectionTime
?
data
.
inspectionTime
:
"-"
}}
</span>
</div>
</el-col>
<div>
<span>
管道所在地址:
</span>
<span>
{{
data
.
pipeAddr
}}
</span>
</div>
<div>
<span>
备注信息:
</span>
<span>
{{
data
.
remarks
}}
</span>
</div>
</div>
</div>
<!-- 报警状态 -->
<!-- 报警状态 -->
<!--
<div
class=
"warn-content"
>
<!--
<div
class=
"warn-content"
>
...
@@ -38,6 +60,7 @@
...
@@ -38,6 +60,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
"moment"
//line移入时的的infowindow
//line移入时的的infowindow
export
default
{
export
default
{
props
:
{
props
:
{
...
@@ -45,21 +68,26 @@ export default {
...
@@ -45,21 +68,26 @@ export default {
title
:
""
,
title
:
""
,
data
:
{},
data
:
{},
map
:
null
map
:
null
},
methods
:{
moment
,
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
.wrapper
{
width
:
406px
;
width
:
406px
;
// height: 488px;
background
:
#fff
;
background
:
#fff
;
border-radius
:
4px
;
border-radius
:
4px
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
overflow
:
hidden
;
//
overflow: hidden;
.top
{
.top
{
width
:
100%
;
width
:
100%
;
height
:
51px
;
height
:
51px
;
background-color
:
#053
B6A
;
background-color
:
#053
b6a
;
.text
{
.text
{
font-weight
:
600
;
font-weight
:
600
;
font-size
:
16px
;
font-size
:
16px
;
...
@@ -70,44 +98,65 @@ export default {
...
@@ -70,44 +98,65 @@ export default {
padding-left
:
22px
;
padding-left
:
22px
;
}
}
.right
{
.right
{
padding-right
:
16px
;
padding-right
:
22px
;
cursor
:
pointer
;
img
{
cursor
:
pointer
;
}
}
}
}
}
.content
{
.eq-content
{
position
:
relative
;
height
:
156px
;
max-height
:
400px
;
box-sizing
:
border-box
;
overflow
:
hidden
;
padding
:
13px
16px
13px
22px
;
overflow-y
:
auto
;
.text-wrapper
{
.eq-content
{
padding-top
:
1px
;
// min-height: 156px;
&
>
div
{
box-sizing
:
border-box
;
margin-bottom
:
6px
;
padding
:
13px
22px
0px
22px
;
}
// border-bottom: 1px solid #e2e2e2;
.eq-text
{
.text-wrapper
{
font-size
:
14px
;
padding-top
:
1px
;
font-weight
:
400
;
&
>
div
{
color
:
#1d1d1d
;
margin-bottom
:
6px
;
opacity
:
1
;
}
.eq-text
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#1d1d1d
;
opacity
:
1
;
&
>
span
{
vertical-align
:
top
;
display
:
inline-block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break
:
break-all
;
max-width
:
100px
;
}
}
}
}
}
.pic
{
.pic
{
width
:
180px
;
width
:
177px
;
height
:
103px
;
height
:
129px
;
// background-color: black;
// background-color: black;
img
{
img
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
// cursor: pointer;
}
}
}
}
}
}
}
.maintain-content
{
.maintain-content
{
width
:
100%
;
width
:
100%
;
height
:
130
px
;
max-height
:
119
px
;
padding-left
:
22px
;
padding-left
:
22px
;
padding-top
:
16px
;
// padding-right: 22px;
padding-bottom
:
10px
;
// padding-top: 16px;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
// border-bottom: 1px solid #e2e2e2;
&
>
div
{
&
>
div
{
margin-bottom
:
8px
;
margin-bottom
:
8px
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -116,7 +165,7 @@ export default {
...
@@ -116,7 +165,7 @@ export default {
vertical-align
:
top
;
vertical-align
:
top
;
display
:
inline-block
;
display
:
inline-block
;
word-break
:
break-all
;
word-break
:
break-all
;
max-width
:
2
5
0px
;
max-width
:
2
8
0px
;
}
}
}
}
}
}
...
@@ -143,102 +192,12 @@ export default {
...
@@ -143,102 +192,12 @@ export default {
}
}
}
}
}
}
.wrapperEditorPage
{
}
.display-default
{
.display-default
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.dot-top
{
font-size
:
0
;
line-height
:
0
;
border-width
:
10px
;
border-color
:
#053B6A
;
border-top-width
:
0
;
border-style
:
dashed
;
border-bottom-style
:
solid
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
/* 向右的箭头 */
.dot-right
{
font-size
:
0
;
line-height
:
0
;
border-width
:
10px
;
border-color
:
#053B6A
;
border-right-width
:
0
;
border-style
:
dashed
;
border-left-style
:
solid
;
border-top-color
:
transparent
;
border-bottom-color
:
transparent
;
}
/* 向下的箭头 */
.dot-bottom
{
font-size
:
0
;
line-height
:
0
;
border-width
:
10px
;
border-color
:
#053B6A
;
border-bottom-width
:
0
;
border-style
:
dashed
;
border-top-style
:
solid
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
/* 向左的箭头 */
.dot-left
{
position
:
absolute
;
left
:
-12px
;
top
:
8px
;
font-size
:
0
;
line-height
:
0
;
border-width
:
13px
;
border-color
:
#053B6A
;
border-left-width
:
0
;
border-style
:
dashed
;
border-right-style
:
solid
;
border-top-color
:
transparent
;
border-bottom-color
:
transparent
;
}
.content
{
max-height
:
480px
;
overflow
:
hidden
;
overflow-y
:
auto
;
.eq-content
{
min-height
:
156px
;
box-sizing
:
border-box
;
padding
:
13px
22px
0px
22px
;
// border-bottom: 1px solid #e2e2e2;
.text-wrapper
{
padding-top
:
1px
;
&
>
div
{
margin-bottom
:
6px
;
}
.eq-text
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#1d1d1d
;
opacity
:
1
;
&
>
span
{
vertical-align
:
top
;
display
:
inline-block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break
:
break-all
;
max-width
:
88px
;
}
}
}
.pic
{
width
:
177px
;
height
:
129px
;
// background-color: black;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
}
</
style
>
</
style
>
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
View file @
4a5ae085
...
@@ -36,9 +36,9 @@
...
@@ -36,9 +36,9 @@
<
/div
>
<
/div
>
<
div
class
=
"pic"
>
<
div
class
=
"pic"
>
<
!--
<
img
:
src
=
"obj.iconUrl"
alt
=
""
/>
--
>
<
img
@
mousedown
.
stop
=
"mousedown"
:
src
=
"obj.iconUrl"
alt
=
""
/
>
<
el
-
image
<
el
-
image
@
mouseover
=
"mousedown
"
v
-
show
=
"false
"
id
=
"img"
id
=
"img"
ref
=
"previewImg"
ref
=
"previewImg"
:
src
=
"obj.iconUrl"
:
src
=
"obj.iconUrl"
...
@@ -49,18 +49,28 @@
...
@@ -49,18 +49,28 @@
<
/div
>
<
/div
>
<
div
class
=
"maintain-content"
>
<
div
class
=
"maintain-content"
>
<
el
-
col
:
span
=
"11"
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
/el-col
>
<
el
-
col
:
span
=
"13"
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
?
obj
.
inspectionTime
:
"-"
}}
<
/span
>
<
/div
>
<
/el-col
>
<
div
>
<
div
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
/div
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
/div
>
<
div
>
<
div
>
<
span
>
备注信息:
<
/span
>
<
span
>
备注信息:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
...
@@ -91,34 +101,33 @@ export default {
...
@@ -91,34 +101,33 @@ export default {
created
()
{
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
console
.
log
(
"created"
,
this
.
obj
);
}
,
}
,
mounted
()
{
mounted
()
{
}
,
console
.
log
(
"stopWindow"
);
this
.
$refs
.
previewImg
.
$el
.
addEventListener
(
"mouseover"
,
(
e
)
=>
{
console
.
log
(
"11"
,
e
);
// e.stopPropagation();
console
.
log
(
"stopWindow"
);
}
);
}
,
computed
:
{
computed
:
{
bigImageArr
()
{
bigImageArr
()
{
return
[
this
.
dialogImage
Url
];
return
[
this
.
obj
.
icon
Url
];
}
,
}
,
}
,
}
,
methods
:
{
methods
:
{
moment
,
moment
,
mousedown
()
{
mousedown
(
e
)
{
console
.
log
(
"?"
);
return
;
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
console
.
log
(
this
.
$refs
.
previewImg
.
showViewer
);
// 加载出来的dom给个事件阻止冒泡
setTimeout
(()
=>
{
const
dom
=
document
.
getElementsByClassName
(
"el-image-viewer__wrapper"
)[
0
];
dom
.
addEventListener
(
"mousedown"
,
(
e
)
=>
{
e
.
stopPropagation
();
console
.
log
(
"?"
);
}
);
}
);
}
,
}
,
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
stopWindow
()
{
console
.
log
(
"阻止window冒泡的图片"
);
}
,
stopw
()
{
console
.
log
(
"stopwindow"
);
}
,
}
,
}
,
}
;
}
;
<
/script
>
<
/script
>
...
@@ -157,7 +166,7 @@ export default {
...
@@ -157,7 +166,7 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
overflow
-
y
:
auto
;
.
eq
-
content
{
.
eq
-
content
{
min
-
height
:
156
px
;
//
min-height: 156px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
13
px
22
px
0
px
22
px
;
padding
:
13
px
22
px
0
px
22
px
;
// border-bottom: 1px solid #e2e2e2;
// border-bottom: 1px solid #e2e2e2;
...
@@ -183,12 +192,13 @@ export default {
...
@@ -183,12 +192,13 @@ export default {
}
}
}
}
.
pic
{
.
pic
{
width
:
1
77
px
;
width
:
1
80
px
;
height
:
1
29
px
;
height
:
1
03
px
;
// background-color: black;
// background-color: black;
#
img
{
img
{
width
:
100
%
;
width
:
100
%
;
height
:
100
%
;
height
:
100
%
;
// cursor: pointer;
}
}
}
}
}
}
...
@@ -196,9 +206,9 @@ export default {
...
@@ -196,9 +206,9 @@ export default {
.
maintain
-
content
{
.
maintain
-
content
{
width
:
100
%
;
width
:
100
%
;
height
:
119
px
;
max
-
height
:
119
px
;
padding
-
left
:
22
px
;
padding
-
left
:
22
px
;
padding
-
right
:
22
px
;
//
padding-right: 22px;
padding
-
bottom
:
10
px
;
padding
-
bottom
:
10
px
;
// padding-top: 16px;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
...
@@ -211,7 +221,7 @@ export default {
...
@@ -211,7 +221,7 @@ export default {
vertical
-
align
:
top
;
vertical
-
align
:
top
;
display
:
inline
-
block
;
display
:
inline
-
block
;
word
-
break
:
break
-
all
;
word
-
break
:
break
-
all
;
max
-
width
:
2
5
0
px
;
max
-
width
:
2
8
0
px
;
}
}
}
}
}
}
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
0 → 100644
View file @
4a5ae085
<
template
>
<div
class=
"wrapper"
>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
obj
.
pipeName
}}
</div>
<div
class=
"right text"
>
<img
@
click=
"close"
src=
"../../assets/images/closeBtn.png"
alt=
""
/>
</div>
</div>
<!-- 报警设备信息 -->
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<!--
<div
:title=
"obj.pipeName"
class=
"eq-text"
>
<span>
管道名称:
</span>
<span>
{{
obj
.
pipeName
}}
</span>
</div>
-->
<div
class=
"eq-text"
>
<span>
管道编号:
</span>
<span>
{{
obj
.
pipeCode
}}
</span>
</div>
<div
class=
"eq-text"
>
<span>
管道长度:
</span>
<span>
{{
`${obj.pipeLength ? obj.pipeLength + "米" : ""
}
`
}}
<
/span
>
<
/div
>
<
div
class
=
"eq-text"
>
<
span
>
管道类型:
<
/span
>
<
span
>
{{
[
"地埋管线"
,
"地表管线"
][
obj
.
pipeType
-
1
]
}}
<
/span
>
<
/div
>
<
div
class
=
"eq-text"
>
<
span
>
管道压力:
<
/span
>
<
span
>
{{
[
"低压"
,
"中压"
,
"次高压"
,
"高压"
][
obj
.
pipePressure
-
1
]
}}
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"pic"
>
<
img
@
mousedown
.
stop
=
"mousedown"
:
src
=
"obj.iconUrl"
alt
=
""
/>
<
el
-
image
v
-
show
=
"false"
id
=
"img"
ref
=
"previewImg"
:
src
=
"obj.iconUrl"
:
preview
-
src
-
list
=
"bigImageArr"
:
z
-
index
=
"9999999"
><
/el-image
>
<
/div
>
<
/div
>
<
div
class
=
"maintain-content"
>
<
el
-
col
:
span
=
"11"
>
<
div
>
<
span
>
安装日期:
<
/span
>
<
span
>
{{
moment
(
obj
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
<
/span
>
<
/div
>
<
/el-col
>
<
el
-
col
:
span
=
"13"
>
<
div
>
<
span
>
最后巡检日期:
<
/span
>
<
span
>
{{
obj
.
inspectionTime
?
obj
.
inspectionTime
:
"-"
}}
<
/span
>
<
/div
>
<
/el-col
>
<
div
>
<
span
>
管道所在地址:
<
/span
>
<
span
>
{{
obj
.
pipeAddr
}}
<
/span
>
<
/div
>
<
div
style
=
"padding: 0"
>
<
span
>
备注信息:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<!--
报警状态
-->
<
div
class
=
"warn-wrapper"
v
-
if
=
"true"
>
<
div
class
=
"warn-content"
>
<
div
>
报警状态:
<
span
>
报警
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
/div
>
<
div
class
=
"btn"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
script
>
//line移入时的的infowindow
import
moment
from
"moment"
;
export
default
{
props
:
{
obj
:
{
typs
:
Object
}
,
}
,
created
()
{
console
.
log
(
"created"
,
this
.
obj
);
}
,
mounted
()
{
}
,
computed
:
{
bigImageArr
()
{
return
[
this
.
obj
.
iconUrl
];
}
,
}
,
methods
:
{
moment
,
mousedown
(
e
)
{
return
;
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
console
.
log
(
this
.
$refs
.
previewImg
.
showViewer
);
// 加载出来的dom给个事件阻止冒泡
setTimeout
(()
=>
{
const
dom
=
document
.
getElementsByClassName
(
"el-image-viewer__wrapper"
)[
0
];
dom
.
addEventListener
(
"mousedown"
,
(
e
)
=>
{
e
.
stopPropagation
();
console
.
log
(
"?"
);
}
);
}
);
}
,
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
}
;
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
wrapper
{
width
:
406
px
;
max
-
height
:
430
px
;
background
:
#
fff
;
border
-
radius
:
4
px
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
overflow
:
hidden
;
.
top
{
width
:
100
%
;
height
:
51
px
;
background
-
color
:
#
FF5A67
;
.
text
{
font
-
weight
:
600
;
font
-
size
:
16
px
;
color
:
#
ffffff
;
line
-
height
:
51
px
;
}
.
left
{
padding
-
left
:
22
px
;
}
.
right
{
padding
-
right
:
22
px
;
img
{
cursor
:
pointer
;
}
}
}
.
content
{
position
:
relative
;
max
-
height
:
300
px
;
overflow
:
hidden
;
overflow
-
y
:
auto
;
padding
-
bottom
:
2
px
;
border
-
bottom
:
1
px
solid
#
eeeeee
;
.
eq
-
content
{
// min-height: 156px;
box
-
sizing
:
border
-
box
;
padding
:
13
px
22
px
0
px
22
px
;
// border-bottom: 1px solid #e2e2e2;
.
text
-
wrapper
{
padding
-
top
:
1
px
;
&
>
div
{
margin
-
bottom
:
6
px
;
}
.
eq
-
text
{
font
-
size
:
14
px
;
font
-
weight
:
400
;
color
:
#
1
d1d1d
;
opacity
:
1
;
&
>
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word
-
break
:
break
-
all
;
max
-
width
:
100
px
;
}
}
}
.
pic
{
width
:
180
px
;
height
:
103
px
;
// background-color: black;
img
{
width
:
100
%
;
height
:
100
%
;
// cursor: pointer;
}
}
}
}
.
maintain
-
content
{
width
:
100
%
;
max
-
height
:
119
px
;
padding
-
left
:
22
px
;
// padding-right: 22px;
// padding-bottom: 10px;
// padding-top: 16px;
box
-
sizing
:
border
-
box
;
// border-bottom: 1px solid #e2e2e2;
&
>
div
{
margin
-
bottom
:
8
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
span
{
vertical
-
align
:
top
;
display
:
inline
-
block
;
word
-
break
:
break
-
all
;
max
-
width
:
280
px
;
}
}
}
.
warn
-
wrapper
{
.
warn
-
content
{
box
-
sizing
:
border
-
box
;
padding
:
10
px
0
2
px
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
color
:
#
FE5966
;
&
>
div
{
font
-
size
:
14
px
;
font
-
weight
:
400
;
margin
-
bottom
:
8
px
;
}
}
.
btn
{
padding
:
16
px
0
;
text
-
align
:
center
;
.
elbtn
{
background
-
color
:
#
053
b6a
;
box
-
shadow
:
0
px
3
px
6
px
rgba
(
0
,
0
,
0
,
0.16
);
width
:
95
px
;
height
:
33
px
;
}
}
}
}
.
wrapperEditorPage
{
}
.
display
-
default
{
display
:
flex
;
justify
-
content
:
space
-
between
;
}
<
/style
>
gassafety-web/src/components/PopWindowGis/markerInfoWindow.vue
0 → 100644
View file @
4a5ae085
<
template
>
<div
class=
"wrapper"
>
<span
class=
"dot-left"
></span>
<div
class=
"top display-default"
>
<div
class=
"left text"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"right text"
>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"map.clearInfoWindow()"
/>
</div>
</div>
<!-- 设备信息 -->
<div
class=
"content"
>
<div
class=
"eq-content display-default"
>
<div
class=
"text-wrapper"
>
<div
class=
"eq-text"
>
设备类型:
<span>
{{
title
}}
</span></div>
<div
class=
"eq-text"
>
设备型号:
<span>
{{
data
.
deviceModel
}}
</span></div>
<div
class=
"eq-text"
>
所属管道:
<span>
{{
data
.
pipeCode
}}
</span></div>
<div
class=
"eq-text"
>
物联网编号:
<span>
{{
data
.
iotNo
}}
</span></div>
</div>
<div
class=
"pic"
>
<img
v-bind:src=
"data.iconUrl"
alt=
""
/>
</div>
</div>
<!-- 维修人员 -->
<div
class=
"maintain-content"
>
<el-col
:span=
"11"
>
<div>
<span>
安装日期:
</span>
<span>
{{
moment
(
data
.
installationTime
).
format
(
"YYYY-MM-DD"
)
}}
</span>
</div>
</el-col>
<el-col
:span=
"13"
>
<div>
<span>
最后巡检日期:
</span>
<span>
{{
data
.
inspectionTime
?
data
.
inspectionTime
:
"-"
}}
</span>
</div>
</el-col>
<div>
<span>
管道所在地址:
</span>
<span>
{{
data
.
pipeAddr
}}
</span>
</div>
<div>
<span>
备注信息:
</span>
<span>
{{
data
.
remarks
}}
</span>
</div>
</div>
<!-- 报警状态 -->
<!--
<div
class=
"warn-content"
>
<div>
报警状态
<span>
报警
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
</div>
-->
</div>
</div>
</
template
>
<
script
>
import
moment
from
"moment"
//line移入时的的infowindow
export
default
{
props
:
{
obj
:
{
typs
:
Object
},
title
:
""
,
data
:
{},
map
:
null
},
methods
:{
moment
,
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
width
:
406px
;
// height: 488px;
background
:
#fff
;
border-radius
:
4px
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
overflow
:
hidden
;
.top
{
width
:
100%
;
height
:
51px
;
background-color
:
#053b6a
;
.text
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#ffffff
;
line-height
:
51px
;
}
.left
{
padding-left
:
22px
;
}
.right
{
padding-right
:
22px
;
img
{
cursor
:
pointer
;
}
}
}
.content
{
position
:
relative
;
max-height
:
400px
;
overflow
:
hidden
;
overflow-y
:
auto
;
.eq-content
{
// min-height: 156px;
box-sizing
:
border-box
;
padding
:
13px
22px
0px
22px
;
// border-bottom: 1px solid #e2e2e2;
.text-wrapper
{
padding-top
:
1px
;
&
>
div
{
margin-bottom
:
6px
;
}
.eq-text
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#1d1d1d
;
opacity
:
1
;
&
>
span
{
vertical-align
:
top
;
display
:
inline-block
;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
word-break
:
break-all
;
max-width
:
100px
;
}
}
}
.pic
{
width
:
180px
;
height
:
103px
;
// background-color: black;
img
{
width
:
100%
;
height
:
100%
;
// cursor: pointer;
}
}
}
}
.maintain-content
{
width
:
100%
;
max-height
:
119px
;
padding-left
:
22px
;
// padding-right: 22px;
padding-bottom
:
10px
;
// padding-top: 16px;
box-sizing
:
border-box
;
// border-bottom: 1px solid #e2e2e2;
&
>
div
{
margin-bottom
:
8px
;
font-size
:
14px
;
font-weight
:
400
;
span
{
vertical-align
:
top
;
display
:
inline-block
;
word-break
:
break-all
;
max-width
:
280px
;
}
}
}
.warn-content
{
height
:
82px
;
box-sizing
:
border-box
;
padding
:
8px
0
0
22px
;
border-bottom
:
1px
solid
#e2e2e2
;
&
>
div
{
font-size
:
14px
;
font-weight
:
400
;
margin-bottom
:
8px
;
}
}
.btn
{
padding-top
:
32px
;
text-align
:
center
;
.elbtn
{
background-color
:
#053b6a
;
box-shadow
:
0px
3px
6px
rgba
(
0
,
0
,
0
,
0
.16
);
width
:
95px
;
height
:
33px
;
}
}
}
.wrapperEditorPage
{
}
.display-default
{
display
:
flex
;
justify-content
:
space-between
;
}
</
style
>
gassafety-web/src/utils/gaodeMapView.js
View file @
4a5ae085
...
@@ -3,9 +3,9 @@ import regulatorBox from "../components/PopWindow/regulatorBox.vue";
...
@@ -3,9 +3,9 @@ import regulatorBox from "../components/PopWindow/regulatorBox.vue";
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
valveWell
from
"../components/PopWindow/valveWell.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
flowMeter
from
"../components/PopWindow/flowMeter.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
pipelineView
from
"../components/PopWindow/pipelineView.vue"
;
import
lineInfoWindow
from
"../components/PopWindowGis/lineInfoWindow.vue"
;
import
lineInfoWindow
from
"../components/PopWindowGis/lineInfoWindow
Warn
.vue"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
{
delDeviceInfo
}
from
"@/api/device/deviceInfo"
;
import
markerInfoWindow
from
"../components/PopWindow/markerInfoWindow.vue"
;
import
markerInfoWindow
from
"../components/PopWindow
Gis
/markerInfoWindow.vue"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
import
workerManInfowindow
from
"../components/PopWindowGis/workerManInfowindow.vue"
;
import
workerManView
from
"../components/PopWindowGis/workerManView.vue"
;
import
workerManView
from
"../components/PopWindowGis/workerManView.vue"
;
...
@@ -204,6 +204,7 @@ class gaodeMap {
...
@@ -204,6 +204,7 @@ class gaodeMap {
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.addCloneDome(e.target, infoWindow);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// infoWindow.close();
that
.
workerManInfoWindow
=
infoWindow
;
that
.
workerManInfoWindow
=
infoWindow
;
...
@@ -307,6 +308,9 @@ class gaodeMap {
...
@@ -307,6 +308,9 @@ class gaodeMap {
map
.
setStatus
(
options
);
map
.
setStatus
(
options
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
// 检测是否碰到底部的bottomData
that
.
boxCollision
(
infoWindow
.
dom
)
// that.addCloneDome(e.target, infoWindow);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// infoWindow.close();
...
@@ -606,6 +610,7 @@ class gaodeMap {
...
@@ -606,6 +610,7 @@ class gaodeMap {
//添加事件
//添加事件
polyline
.
on
(
"mouseover"
,
e
=>
{
polyline
.
on
(
"mouseover"
,
e
=>
{
if
(
this
.
lineType
==
1
)
return
;
if
(
this
.
lineType
==
1
)
return
;
infoWindow
.
open
(
map
,
e
.
lnglat
);
// 上方导航的高
// 上方导航的高
const
topBar
=
81
;
const
topBar
=
81
;
// 坐标导航的宽
// 坐标导航的宽
...
@@ -616,11 +621,11 @@ class gaodeMap {
...
@@ -616,11 +621,11 @@ class gaodeMap {
clientHeight
:
windowClientHeight
clientHeight
:
windowClientHeight
}
=
document
.
body
;
}
=
document
.
body
;
// 弹出的信息窗口的宽高
// 弹出的信息窗口的宽高
const
{
const
{
offsetWidth
:
infoWindowWidth
,
offsetWidth
:
infoWindowWidth
,
offsetHeight
:
infoWindowHeight
offsetHeight
:
infoWindowHeight
}
=
{
offsetWidth
:
406
,
offsetHeight
:
316
}
;
}
=
infoWindow
.
dom
;
// 鼠标碰到线后的位置
// 鼠标碰到线后的位置
const
{
clientX
:
mouseClientX
,
clientY
:
mouseClientY
}
=
e
.
originEvent
;
const
{
clientX
:
mouseClientX
,
clientY
:
mouseClientY
}
=
e
.
originEvent
;
// 鼠标到左边界的距离
// 鼠标到左边界的距离
...
@@ -649,7 +654,6 @@ class gaodeMap {
...
@@ -649,7 +654,6 @@ class gaodeMap {
}
}
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
open
(
map
,
e
.
lnglat
);
// 这个是为了盖住vue里的东西
// 这个是为了盖住vue里的东西
// polyline.cloneDom = infoWindow.dom.cloneNode(true);
// polyline.cloneDom = infoWindow.dom.cloneNode(true);
// polyline.cloneDom.style.top = infoWindow.dom.offsetTop + 80 + "px";
// polyline.cloneDom.style.top = infoWindow.dom.offsetTop + 80 + "px";
...
@@ -660,6 +664,8 @@ class gaodeMap {
...
@@ -660,6 +664,8 @@ class gaodeMap {
// infoWindow.close();
// infoWindow.close();
// this.addCloneDome(polyline, infoWindow);
// this.addCloneDome(polyline, infoWindow);
// infoWindow.close();
// infoWindow.close();
// 检测是否与底部bottondata碰撞
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
showInfoWindow
=
infoWindow
;
this
.
showInfoWindow
=
infoWindow
;
// const
// const
});
});
...
@@ -673,6 +679,30 @@ class gaodeMap {
...
@@ -673,6 +679,30 @@ class gaodeMap {
map
.
add
(
this
.
polyLines
);
map
.
add
(
this
.
polyLines
);
// 缩放地图到合适的视野级别
// 缩放地图到合适的视野级别
// map.setFitView();
// map.setFitView();
}
// 碰撞检测
boxCollision
(
infowindowDom
){
// gis地图页面的bottomdata组件
const
{
RightBototmData
:{
$el
:
pageDom
}
}
=
this
.
view
.
$refs
;
let
{
offsetTop
:
ay
,
offsetLeft
:
ax
,
offsetWidth
:
aw
,
offsetHeight
:
ah
}
=
pageDom
;
let
{
y
:
by
,
x
:
bx
,
width
:
bw
,
height
:
bh
}
=
infowindowDom
.
getBoundingClientRect
();
// 如果组件消失了ay回变成0,所以要记录一下,当它为0的时候取记录的值
if
(
ay
!=
0
){
this
.
ay
=
ay
;
}
else
{
ay
=
this
.
ay
;
}
console
.
log
(
"ay"
,
ay
)
if
(
by
+
bh
>=
ay
){
console
.
log
(
"隐藏"
)
this
.
view
.
bottomDataShow
=
false
;
}
else
{
console
.
log
(
"显示"
)
this
.
view
.
bottomDataShow
=
true
;
}
// if((by+bh) -ay <0)
}
}
// 把map里的in佛window转化成vue里的dom
// 把map里的in佛window转化成vue里的dom
addCloneDome
(
target
,
infoWindow
)
{
addCloneDome
(
target
,
infoWindow
)
{
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
4a5ae085
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
</div>
</div>
</div>
</div>
<RightBototmData
:list=
"rightBototmData"
/>
<RightBototmData
v-show=
"bottomDataShow"
:class=
"{classShow:!bottomDataShow}"
ref=
"RightBototmData"
:list=
"rightBototmData"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -168,6 +168,7 @@ export default {
...
@@ -168,6 +168,7 @@ export default {
keyWord
:
""
,
keyWord
:
""
,
// 右下角的数据data
// 右下角的数据data
rightBototmData
:
[],
rightBototmData
:
[],
bottomDataShow
:
true
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -184,9 +185,11 @@ export default {
...
@@ -184,9 +185,11 @@ export default {
this
.
getPipeList
();
this
.
getPipeList
();
// 右下角数据
// 右下角数据
this
.
rightBottomData
();
this
.
rightBottomData
();
},
},
// 右下角数据
// 右下角数据
async
rightBottomData
()
{
async
rightBottomData
()
{
this
.
gaoMap
.
view
=
this
;
await
countPipeLength
().
then
((
res
)
=>
{
await
countPipeLength
().
then
((
res
)
=>
{
// console.log("管道管道管道管道管道管道", res);
// console.log("管道管道管道管道管道管道", res);
const
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
const
obj
=
{
number
:
res
.
data
,
type
:
"99"
};
...
@@ -443,6 +446,8 @@ export default {
...
@@ -443,6 +446,8 @@ export default {
},
},
// 新建下拉列表关闭 window点击事件
// 新建下拉列表关闭 window点击事件
barClose
()
{
barClose
()
{
// 一点windowbottomData显示
this
.
bottomDataShow
=
true
;
// return;
// return;
console
.
log
(
"window"
);
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
this
.
deviceType
=
false
;
...
@@ -725,5 +730,8 @@ input[type="radio"] {
...
@@ -725,5 +730,8 @@ input[type="radio"] {
color
:
white
;
color
:
white
;
background-color
:
#053b6a
;
background-color
:
#053b6a
;
}
}
.classShow
{
opacity
:
0
;
}
</
style
>
</
style
>
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