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
bbdc2c9d
Commit
bbdc2c9d
authored
Sep 13, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gis地图样式以及功能全部调整完毕
parent
6ef6b7b8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
85 additions
and
23 deletions
+85
-23
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+2
-1
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+1
-1
markerInfoWindow.vue
...fety-web/src/components/PopWindowGis/markerInfoWindow.vue
+1
-1
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+4
-2
troubleInfoWindowWarn.vue
...web/src/components/PopWindowGis/troubleInfoWindowWarn.vue
+1
-1
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+34
-12
Right.vue
...ety-web/src/views/enterprise/mapView/components/Right.vue
+6
-2
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+36
-3
No files found.
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
View file @
bbdc2c9d
...
@@ -128,7 +128,8 @@ export default {
...
@@ -128,7 +128,8 @@ export default {
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
// window底部的数据拦
// window底部的数据拦
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
bottomDataShow
=
true
;
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
domAllShow
();
}
,
}
,
deviceMore
()
{
deviceMore
()
{
console
.
log
(
this
.
obj
.
polyline
.
getExtData
().
lineData
);
console
.
log
(
this
.
obj
.
polyline
.
getExtData
().
lineData
);
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
View file @
bbdc2c9d
...
@@ -200,7 +200,7 @@ export default {
...
@@ -200,7 +200,7 @@ export default {
}
,
}
,
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
bottomDataShow
=
true
;
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
domAllShow
()
}
,
}
,
}
,
}
,
}
;
}
;
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindow.vue
View file @
bbdc2c9d
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
},
},
close
()
{
close
()
{
this
.
map
.
clearInfoWindow
();
this
.
map
.
clearInfoWindow
();
this
.
data
.
class
.
view
.
bottomDataShow
=
true
;
this
.
data
.
class
.
view
.
domAllShow
()
},
},
},
},
};
};
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
View file @
bbdc2c9d
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<span
class=
"dot-left"
></span>
<span
class=
"dot-left"
></span>
<div
class=
"top display-default"
>
<div
class=
"top display-default"
>
<div
class=
"left text ddd"
:title=
"data.deviceName"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"left text ddd"
:title=
"data.deviceName"
>
{{
data
.
deviceName
}}
</div>
<div
class=
"right text"
>
<div
class=
"right text"
>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"close"
/>
<img
src=
"../../assets/images/closeBtn.png"
alt=
""
@
click=
"close"
/>
</div>
</div>
...
@@ -135,7 +137,7 @@ export default {
...
@@ -135,7 +137,7 @@ export default {
},
},
close
()
{
close
()
{
this
.
map
.
clearInfoWindow
();
this
.
map
.
clearInfoWindow
();
this
.
data
.
class
.
view
.
bottomDataShow
=
true
;
this
.
data
.
class
.
view
.
domAllShow
()
;
},
},
// CreateWorkCallBack(e) {
// CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // console.log("生成工单后传过来的参数", e);
...
...
gassafety-web/src/components/PopWindowGis/troubleInfoWindowWarn.vue
View file @
bbdc2c9d
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
// },
// },
close
()
{
close
()
{
this
.
map
.
clearInfoWindow
();
this
.
map
.
clearInfoWindow
();
this
.
data
.
class
.
view
.
bottomDataShow
=
true
;
this
.
data
.
class
.
view
.
domAllShow
()
;
},
},
deviceMore
()
{
deviceMore
()
{
this
.
data
.
class
.
view
.
$router
.
push
({
this
.
data
.
class
.
view
.
$router
.
push
({
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
bbdc2c9d
...
@@ -80,7 +80,7 @@ class gaodeMap {
...
@@ -80,7 +80,7 @@ class gaodeMap {
this
.
closeInfoWindow
();
this
.
closeInfoWindow
();
this
.
polyLinesColorClear
();
this
.
polyLinesColorClear
();
this
.
view
.
bottomDataShow
=
true
;
this
.
domAllShow
()
;
if
(
this
.
lineType
!=
1
||
this
.
lineFlag
)
return
;
if
(
this
.
lineType
!=
1
||
this
.
lineFlag
)
return
;
// 除了这里,还要利用vue页面的window事件辅助,当组件出来的时候,就得利用window事件
// 除了这里,还要利用vue页面的window事件辅助,当组件出来的时候,就得利用window事件
if
(
this
.
newLineObj
)
{
if
(
this
.
newLineObj
)
{
...
@@ -139,13 +139,13 @@ class gaodeMap {
...
@@ -139,13 +139,13 @@ class gaodeMap {
// 卫星图
// 卫星图
if
(
!
bool
)
{
if
(
!
bool
)
{
if
(
this
.
satellite
)
return
;
if
(
this
.
satellite
)
return
;
this
.
satellite
=
new
AMap
.
TileLayer
.
Satellite
()
this
.
satellite
=
new
AMap
.
TileLayer
.
Satellite
()
;
this
.
myMap
.
addLayer
(
this
.
satellite
);
this
.
myMap
.
addLayer
(
this
.
satellite
);
}
else
{
}
else
{
if
(
this
.
satellite
)
{
if
(
this
.
satellite
)
{
this
.
myMap
.
removeLayer
(
this
.
satellite
);
this
.
myMap
.
removeLayer
(
this
.
satellite
);
this
.
satellite
=
null
;
this
.
satellite
=
null
;
}
}
}
}
}
}
...
@@ -284,6 +284,7 @@ class gaodeMap {
...
@@ -284,6 +284,7 @@ class gaodeMap {
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mouseover"
,
this
.
wokerManOpen
);
marker
.
on
(
"mouseout"
,
e
=>
{
marker
.
on
(
"mouseout"
,
e
=>
{
e
.
target
.
infoWindow
.
close
();
e
.
target
.
infoWindow
.
close
();
this
.
domAllShow
()
});
});
marker
.
on
(
"mousedown"
,
e
=>
{
marker
.
on
(
"mousedown"
,
e
=>
{
...
@@ -969,8 +970,15 @@ class gaodeMap {
...
@@ -969,8 +970,15 @@ class gaodeMap {
boxCollision
(
infowindowDom
)
{
boxCollision
(
infowindowDom
)
{
// gis地图页面的bottomdata组件
// gis地图页面的bottomdata组件
const
{
const
{
Bottom
:
{
$el
:
pageDom
}
Bottom
:
{
$el
:
pageDomBottom
},
Right
:
{
$el
:
pageDomRight
}
}
=
this
.
view
.
$refs
;
}
=
this
.
view
.
$refs
;
this
.
mathWho
(
infowindowDom
,
pageDomBottom
,
"bottomDataShow"
,
"bottom"
);
this
.
mathWho
(
infowindowDom
,
pageDomRight
,
"rightDataShow"
,
"right"
);
}
// domAttr view里的属性
//attr 存储在类里的值
mathWho
(
infowindowDom
,
pageDom
,
domAttr
,
attr
)
{
let
{
let
{
offsetTop
:
ay
,
offsetTop
:
ay
,
offsetLeft
:
ax
,
offsetLeft
:
ax
,
...
@@ -985,20 +993,34 @@ class gaodeMap {
...
@@ -985,20 +993,34 @@ class gaodeMap {
}
=
infowindowDom
.
getBoundingClientRect
();
}
=
infowindowDom
.
getBoundingClientRect
();
// 如果组件消失了ay回变成0,所以要记录一下,当它为0的时候取记录的值
// 如果组件消失了ay回变成0,所以要记录一下,当它为0的时候取记录的值
if
(
ay
!=
0
)
{
if
(
ay
!=
0
)
{
this
.
ay
=
ay
;
// this.ay = ay;
this
[
attr
+
"y"
]
=
ay
;
}
else
{
// ay = this.ay;
ay
=
this
[
attr
+
"y"
];
}
if
(
ax
!=
0
)
{
// this.ax = ax;
this
[
attr
+
"x"
]
=
ax
;
}
else
{
}
else
{
ay
=
this
.
ay
;
// ax = this.ax;
ax
=
this
[
attr
+
"x"
];
}
}
console
.
log
(
"ay"
,
ay
);
console
.
log
(
"ay"
,
ay
);
if
(
by
+
bh
>=
ay
)
{
if
(
by
+
bh
>=
ay
&&
bx
+
bw
>=
ax
)
{
console
.
log
(
"隐藏"
);
console
.
log
(
"隐藏"
);
this
.
view
.
bottomDataShow
=
false
;
this
.
view
[
domAttr
]
=
false
;
}
else
{
}
else
{
console
.
log
(
"显示"
);
console
.
log
(
"显示"
);
this
.
view
.
bottomDataShow
=
true
;
this
.
view
[
domAttr
]
=
true
;
}
}
}
// if((by+bh) -ay <0)
domAllShow
()
{
this
.
view
.
bottomDataShow
=
true
;
this
.
view
.
rightDataShow
=
true
;
}
}
// 把map里的in佛window转化成vue里的dom
// 把map里的in佛window转化成vue里的dom
addCloneDome
(
target
,
infoWindow
)
{
addCloneDome
(
target
,
infoWindow
)
{
target
.
cloneDom
=
infoWindow
.
dom
.
cloneNode
(
true
);
target
.
cloneDom
=
infoWindow
.
dom
.
cloneNode
(
true
);
...
...
gassafety-web/src/views/enterprise/mapView/components/Right.vue
View file @
bbdc2c9d
...
@@ -66,11 +66,12 @@ export default {
...
@@ -66,11 +66,12 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.wrapper
{
.wrapper
{
width
:
30
0px
;
width
:
27
0px
;
height
:
8
00px
;
height
:
7
00px
;
position
:
absolute
;
position
:
absolute
;
top
:
40px
;
top
:
40px
;
right
:
0
;
right
:
0
;
bottom
:
0
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
// right: 10px;
// right: 10px;
// top: 131px;
// top: 131px;
...
@@ -102,6 +103,9 @@ export default {
...
@@ -102,6 +103,9 @@ export default {
background-image
:
url(../../../../assets/images/listBg.png)
;
background-image
:
url(../../../../assets/images/listBg.png)
;
margin-right
:
10px
;
margin-right
:
10px
;
display
:
flex
;
display
:
flex
;
&
:last-child
{
margin-bottom
:
0px
!
important
;
}
&
.three
{
&
.three
{
margin-right
:
0px
;
margin-right
:
0px
;
}
}
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
bbdc2c9d
...
@@ -73,7 +73,10 @@
...
@@ -73,7 +73,10 @@
/>
/>
<Bottom
<Bottom
v-show=
"bottomDataShow"
v-show=
"bottomDataShow"
:class=
"{ classShow: !bottomDataShow }"
:class=
"{
classShow: !bottomDataShow,
bottomMarginRight: bottomMarginRight,
}"
ref=
"Bottom"
ref=
"Bottom"
:list=
"rightBototmData"
:list=
"rightBototmData"
/>
/>
...
@@ -265,7 +268,7 @@
...
@@ -265,7 +268,7 @@
</template>
</template>
<!-- 无数据 -->
<!-- 无数据 -->
<
template
v-else
>
<
template
v-else
>
<div
style=
"padding-left: 5px;
color:#fff;
"
>
暂无数据
</div>
<div
style=
"padding-left: 5px;
color: #fff
"
>
暂无数据
</div>
</
template
>
</
template
>
</div>
</div>
</el-collapse-transition>
</el-collapse-transition>
...
@@ -389,6 +392,8 @@ export default {
...
@@ -389,6 +392,8 @@ export default {
rightBototmData
:
[],
rightBototmData
:
[],
bottomDataShow
:
true
,
bottomDataShow
:
true
,
rightDataShow
:
true
,
rightDataShow
:
true
,
// 如果右边与下面重叠了,bottom要往左移
bottomMarginRight
:
false
,
// 是否显示生成工单弹框
// 是否显示生成工单弹框
createWorkOpen
:
false
,
createWorkOpen
:
false
,
//隐患工单
//隐患工单
...
@@ -419,6 +424,7 @@ export default {
...
@@ -419,6 +424,7 @@ export default {
window
.
removeEventListener
(
"resize"
,
this
.
onResize
);
window
.
removeEventListener
(
"resize"
,
this
.
onResize
);
window
.
addEventListener
(
"resize"
,
this
.
onResize
);
window
.
addEventListener
(
"resize"
,
this
.
onResize
);
this
.
initMap
();
this
.
initMap
();
// });
// });
},
},
watch
:
{
watch
:
{
...
@@ -433,7 +439,22 @@ export default {
...
@@ -433,7 +439,22 @@ export default {
this
.
boxHeight
=
document
.
body
.
clientHeight
-
80
;
this
.
boxHeight
=
document
.
body
.
clientHeight
-
80
;
this
.
boxWidth
=
document
.
body
.
clientWidth
;
this
.
boxWidth
=
document
.
body
.
clientWidth
;
console
.
log
(
"挂在"
);
console
.
log
(
"挂在"
);
const
{
Bottom
:
{
$el
:
pageDomBottom
},
Right
:
{
$el
:
pageDomRight
},
}
=
this
.
$refs
;
// 右边的底
const
RightBottom
=
pageDomRight
.
offsetTop
+
pageDomRight
.
offsetHeight
;
// 下边的上边
const
bottomTop
=
pageDomBottom
.
offsetTop
;
if
(
RightBottom
>
bottomTop
){
// 重叠了,bottom右移动
this
.
bottomMarginRight
=
true
;
}
},
},
initMap
()
{
initMap
()
{
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
this
.
gaoMap
=
gaoMap
;
...
@@ -792,6 +813,8 @@ export default {
...
@@ -792,6 +813,8 @@ export default {
leftBarChange
(
item
)
{
leftBarChange
(
item
)
{
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
this
.
gaoMap
.
closeInfoWindow
();
this
.
gaoMap
.
closeInfoWindow
();
this
.
domAllShow
();
this
.
gaoMap
.
polyLinesColorClear
();
this
.
gaoMap
.
polyLinesColorClear
();
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
if
(
index
>=
0
)
{
if
(
index
>=
0
)
{
...
@@ -875,6 +898,7 @@ export default {
...
@@ -875,6 +898,7 @@ export default {
}
}
},
},
panToo
(
iten
,
item
)
{
panToo
(
iten
,
item
)
{
this
.
domAllShow
();
// 如果没打对勾,就啥也不干
// 如果没打对勾,就啥也不干
if
(
!
this
.
leftBarNum
.
includes
(
item
.
value
))
return
;
if
(
!
this
.
leftBarNum
.
includes
(
item
.
value
))
return
;
// 点击的时候允许infowindow消失
// 点击的时候允许infowindow消失
...
@@ -1029,6 +1053,7 @@ export default {
...
@@ -1029,6 +1053,7 @@ export default {
}
else
{
}
else
{
this
.
arrowRightNum
.
push
(
item
.
value
);
this
.
arrowRightNum
.
push
(
item
.
value
);
}
}
this
.
domAllShow
();
},
},
// 管道储存
// 管道储存
...
@@ -1381,6 +1406,10 @@ export default {
...
@@ -1381,6 +1406,10 @@ export default {
this
.
gaoMap
.
lineFlag
=
false
;
this
.
gaoMap
.
lineFlag
=
false
;
// this.gaoMap.createNewLine();
// this.gaoMap.createNewLine();
},
},
domAllShow
()
{
this
.
bottomDataShow
=
true
;
this
.
rightDataShow
=
true
;
},
refreshMap
()
{
refreshMap
()
{
// this.changeBtnDataClear();
// this.changeBtnDataClear();
this
.
keyWord
=
""
;
this
.
keyWord
=
""
;
...
@@ -1452,8 +1481,8 @@ export default {
...
@@ -1452,8 +1481,8 @@ export default {
drawerClick
()
{
drawerClick
()
{
console
.
log
(
"drawerClick"
);
console
.
log
(
"drawerClick"
);
this
.
gaoMap
.
polyLinesColorClear
();
this
.
gaoMap
.
polyLinesColorClear
();
this
.
gaoMap
.
closeInfoWindow
();
this
.
gaoMap
.
closeInfoWindow
();
this
.
domAllShow
();
},
},
},
},
...
@@ -1482,6 +1511,10 @@ export default {
...
@@ -1482,6 +1511,10 @@ export default {
bottom
:
0
;
bottom
:
0
;
width
:
100%
;
width
:
100%
;
}
}
// 如果right与bottom 重叠,则bottom左移动
.bottomMarginRight
{
right
:
280px
;
}
// .btn-wrapper {
// .btn-wrapper {
// position: fixed;
// position: fixed;
// right: 32px;
// right: 32px;
...
...
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