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
d5c4d564
Commit
d5c4d564
authored
Jul 29, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_jzl'
parents
2f8fe801
c5469218
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
58 deletions
+60
-58
lineInfoWindow.vue
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
+1
-1
markerInfoWindow.vue
gassafety-web/src/components/PopWindow/markerInfoWindow.vue
+1
-1
gaodeMap.js
gassafety-web/src/utils/gaodeMap.js
+2
-2
index.vue
gassafety-web/src/views/enterprise/map/index.vue
+56
-54
No files found.
gassafety-web/src/components/PopWindow/lineInfoWindow.vue
View file @
d5c4d564
...
...
@@ -54,7 +54,7 @@
<
span
>
{{
obj
.
inspectionTime
}}
<
/span
>
<
/div
>
<
div
>
<
span
>
备注信息
;
<
/span
>
<
span
>
备注信息
:
<
/span
>
<
span
>
{{
obj
.
remarks
}}
<
/span
>
<
/div
>
<
/div
>
...
...
gassafety-web/src/components/PopWindow/markerInfoWindow.vue
View file @
d5c4d564
...
...
@@ -104,7 +104,7 @@ export default {
.maintain-content
{
width
:
100%
;
height
:
1
09
px
;
height
:
1
30
px
;
padding-left
:
22px
;
padding-top
:
16px
;
box-sizing
:
border-box
;
...
...
gassafety-web/src/utils/gaodeMap.js
View file @
d5c4d564
...
...
@@ -391,7 +391,7 @@ class gaodeMap {
let
polyline
=
new
AMap
.
Polyline
({
path
,
strokeColor
:
"#F7FE38"
,
strokeWeight
:
8
,
strokeWeight
:
4
,
strokeOpacity
:
0.9
,
zIndex
:
50
,
bubble
:
true
,
...
...
@@ -500,7 +500,7 @@ class gaodeMap {
map
.
remove
(
this
.
markerOverlays
);
this
.
mouseTool
.
polyline
({
// bubbles:false,
strokeWeight
:
9
,
strokeWeight
:
4
,
strokeColor
:
"#80d8ff"
,
extData
:
{
type
:
"newLine"
,
...
...
gassafety-web/src/views/enterprise/map/index.vue
View file @
d5c4d564
...
...
@@ -69,17 +69,11 @@
id=
"tipinput"
class=
"search-input"
/>
<el-button
icon=
"el-icon-search"
class=
"search-but"
@
click=
"search()"
<el-button
icon=
"el-icon-search"
class=
"search-but"
@
click=
"search()"
>
搜索
</el-button
>
<el-button
icon=
"el-icon-refresh"
class=
"refresh-but"
@
click=
"refreshMap()"
>
重置
</el-button
<el-button
icon=
"el-icon-refresh"
class=
"refresh-but"
@
click=
"refreshMap()"
>
重置
</el-button
>
<div
class=
"leftBar-wrapper"
>
...
...
@@ -157,7 +151,7 @@ export default {
this
.
initMap
();
},
methods
:
{
initMap
(){
initMap
()
{
let
gaoMap
=
new
gaodeMap
(
"石家庄"
);
this
.
gaoMap
=
gaoMap
;
window
.
addEventListener
(
"click"
,
this
.
barClose
);
...
...
@@ -169,7 +163,7 @@ export default {
// 左边的Bar修改值
leftBarChange
(
item
)
{
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
const
index
=
this
.
leftBarNum
.
indexOf
(
item
.
value
);
if
(
index
>=
0
)
{
this
.
leftBarNum
.
splice
(
index
,
1
);
...
...
@@ -181,44 +175,37 @@ export default {
if
(
this
.
leftBarNum
.
includes
(
1
))
{
this
.
gaoMap
.
lineShow
(
true
);
}
else
{
}
else
{
this
.
gaoMap
.
lineShow
(
false
);
}
// console.log("marks",this.gaoMap.markers)
// this.gaoMap.markerShow();
if
(
this
.
leftBarNum
.
includes
(
2
))
{
this
.
gaoMap
.
markerShow
(
1
,
true
)
}
else
{
this
.
gaoMap
.
markerShow
(
1
,
false
)
this
.
gaoMap
.
markerShow
(
1
,
true
);
}
else
{
this
.
gaoMap
.
markerShow
(
1
,
false
);
}
if
(
this
.
leftBarNum
.
includes
(
3
))
{
this
.
gaoMap
.
markerShow
(
2
,
true
)
}
else
{
this
.
gaoMap
.
markerShow
(
2
,
false
)
this
.
gaoMap
.
markerShow
(
2
,
true
);
}
else
{
this
.
gaoMap
.
markerShow
(
2
,
false
);
}
if
(
this
.
leftBarNum
.
includes
(
4
))
{
this
.
gaoMap
.
markerShow
(
3
,
true
)
}
else
{
this
.
gaoMap
.
markerShow
(
3
,
false
)
this
.
gaoMap
.
markerShow
(
3
,
true
);
}
else
{
this
.
gaoMap
.
markerShow
(
3
,
false
);
}
if
(
this
.
leftBarNum
.
includes
(
7
))
{
this
.
gaoMap
.
markerShow
(
4
,
true
)
}
else
{
this
.
gaoMap
.
markerShow
(
4
,
false
)
if
(
this
.
leftBarNum
.
includes
(
7
))
{
this
.
gaoMap
.
markerShow
(
4
,
true
);
}
else
{
this
.
gaoMap
.
markerShow
(
4
,
false
);
}
},
addDevice
()
{
if
(
this
.
iconClass
==
"icon-create"
)
{
this
.
targetNum
=
this
.
targetNum
!=
1
?
1
:
0
;
}
else
{
...
...
@@ -226,7 +213,6 @@ export default {
this
.
targetNum
=
0
;
this
.
createReset
();
this
.
gaoMap
.
newLineReset
();
}
}
if
(
this
.
targetNum
==
1
&&
this
.
createValue
==
1
)
{
...
...
@@ -250,7 +236,7 @@ export default {
this
.
iconClass
=
item
.
icon
;
this
.
createValue
=
item
.
value
;
this
.
createLabel
=
item
.
label
;
if
(
this
.
targetNum
==
1
&&
this
.
createValue
==
1
)
{
// 0是初始,1是新建 2是编辑 3删除
this
.
gaoMap
.
lineType
=
1
;
...
...
@@ -263,7 +249,6 @@ export default {
// 如果不是管道了,把之前的管道清空
this
.
gaoMap
.
newLineReset
();
// this.createReset();
// 其他
this
.
gaoMap
.
draw
(
this
.
createValue
.
toString
());
...
...
@@ -285,7 +270,7 @@ export default {
this
.
gaoMap
.
linePolyEditorAllClose
();
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
mapOperateType
=
"normal"
;
}
else
{
}
else
{
// 如果正在新建线条,则清空
this
.
gaoMap
.
newLineReset
();
this
.
deviceType
=
false
;
...
...
@@ -294,7 +279,7 @@ export default {
// this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
}
// 关闭当前的infowindow
// 关闭当前的infowindow
this
.
gaoMap
.
closeInfoWindow
();
this
.
createReset
();
},
...
...
@@ -304,7 +289,7 @@ export default {
if
(
this
.
targetNum
!=
3
)
{
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
mapOperateType
=
"normal"
;
}
else
{
}
else
{
// 如果正在新建线条,则清空
this
.
gaoMap
.
newLineReset
();
// 清空所有正在编辑状态的线
...
...
@@ -315,7 +300,7 @@ export default {
//this.gaoMap.placeSearch.clear();
this
.
gaoMap
.
closeAddMarker
();
}
// 关闭当前的infowindow
// 关闭当前的infowindow
this
.
gaoMap
.
closeInfoWindow
();
this
.
createReset
();
},
...
...
@@ -358,37 +343,50 @@ export default {
},
getPipeList
(
queryParams
)
{
pipeAllInfoList
(
queryParams
).
then
((
res
)
=>
{
console
.
log
(
"管道"
,
res
);
if
(
res
.
code
==
200
)
{
this
.
gaoMap
.
addPolyline
(
res
.
data
);
}
console
.
log
(
"管道"
,
res
);
if
(
res
.
code
==
200
)
{
this
.
gaoMap
.
addPolyline
(
res
.
data
);
}
});
},
searchClear
()
{
this
.
iconClass
=
"icon-create"
;
this
.
createValue
=
0
;
this
.
createLabel
=
"新建"
;
this
.
targetNum
=
0
;
this
.
gaoMap
.
lineType
=
0
;
this
.
gaoMap
.
newLineReset
();
this
.
gaoMap
.
linePolyEditorAllClose
();
this
.
gaoMap
.
closeAddMarker
();
this
.
gaoMap
.
removeMarkerDragg
();
this
.
gaoMap
.
mapOperateType
=
"normal"
;
map
.
remove
(
this
.
gaodeMap
.
markerOverlays
);
},
search
()
{
this
.
searchClear
();
map
.
clearMap
();
this
.
gaoMap
.
placeSearch
.
clear
();
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
if
(
!
(
!
this
.
gaoMap
.
searchSelectAdcode
&&
!
this
.
gaoMap
.
searchSelectName
))
{
this
.
gaoMap
.
placeSearch
.
setCity
(
this
.
gaoMap
.
searchSelectAdcode
);
this
.
gaoMap
.
placeSearch
.
search
(
this
.
gaoMap
.
searchSelectName
);
this
.
getDeviceInfo
({
"deviceName"
:
this
.
gaoMap
.
searchSelectName
});
this
.
getDeviceInfo
({
deviceName
:
this
.
gaoMap
.
searchSelectName
});
this
.
gaoMap
.
polyLines
=
[];
this
.
getPipeList
({
"pipeName"
:
this
.
gaoMap
.
searchSelectName
});
this
.
getPipeList
({
pipeName
:
this
.
gaoMap
.
searchSelectName
});
this
.
gaoMap
.
searchSelectAdcode
=
undefined
;
this
.
gaoMap
.
searchSelectName
=
undefined
;
}
else
{
}
else
{
this
.
gaoMap
.
placeSearch
.
search
(
this
.
keyWord
);
this
.
getDeviceInfo
({
"deviceName"
:
this
.
keyWord
});
this
.
getDeviceInfo
({
deviceName
:
this
.
keyWord
});
this
.
gaoMap
.
polyLines
=
[];
this
.
getPipeList
({
"pipeName"
:
this
.
keyWord
});
this
.
getPipeList
({
pipeName
:
this
.
keyWord
});
}
},
// 新建下拉列表关闭 window点击事件
barClose
()
{
console
.
log
(
"window"
);
this
.
deviceType
=
false
;
// 关闭当前线条的infowindow
this
.
gaoMap
.
closeInfoWindow
()
this
.
gaoMap
.
closeInfoWindow
()
;
// 如果没有选择的时候点window 则高亮消失
if
(
this
.
targetNum
==
1
&&
this
.
iconClass
==
"icon-create"
)
{
this
.
targetNum
=
0
;
...
...
@@ -399,10 +397,14 @@ export default {
this
.
gaoMap
.
lineFlag
=
false
;
// this.gaoMap.createNewLine();
},
refreshMap
(){
refreshMap
()
{
this
.
iconClass
=
"icon-create"
;
this
.
createValue
=
0
;
this
.
createLabel
=
"新建"
;
this
.
targetNum
=
0
;
map
.
clearMap
();
this
.
initMap
();
}
}
,
},
beforeDestroy
()
{
...
...
@@ -647,7 +649,7 @@ input[type="radio"] {
background-color
:
#053b6a
;
}
.refresh-but
{
.refresh-but
{
position
:
fixed
;
top
:
100px
;
left
:
28%
;
...
...
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