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
f82316af
Commit
f82316af
authored
Aug 16, 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
4d7aa47a
59af78cf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1062 additions
and
469 deletions
+1062
-469
llj.gif
gassafety-web/src/assets/images/llj.gif
+0
-0
ylb.gif
gassafety-web/src/assets/images/ylb.gif
+0
-0
lineInfoWindow.vue
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
+16
-4
lineInfoWindowWarn.vue
...ty-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
+18
-6
markerInfoWindow.vue
...fety-web/src/components/PopWindowGis/markerInfoWindow.vue
+11
-1
markerInfoWindowWarn.vue
...-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
+10
-3
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+166
-121
index.vue
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
+0
-1
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+841
-333
No files found.
gassafety-web/src/assets/images/llj.gif
0 → 100644
View file @
f82316af
2.86 KB
gassafety-web/src/assets/images/ylb.gif
0 → 100644
View file @
f82316af
2.8 KB
gassafety-web/src/components/PopWindowGis/lineInfoWindow.vue
View file @
f82316af
...
@@ -81,7 +81,10 @@
...
@@ -81,7 +81,10 @@
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
div
>
详细信息:
<
span
>
管线两端设备压差较大,管线可能泄漏
<
/span></
div
>
<
/div> --
>
<
/div> --
>
<
div
class
=
"btn"
>
<
div
class
=
"btn"
>
<
span
@
mousedown
.
stop
=
"deviceMore"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
/span
>
<!--
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button> --
>
<!--
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
生成工单
<
/el-button> --
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -107,7 +110,7 @@ export default {
...
@@ -107,7 +110,7 @@ export default {
methods
:
{
methods
:
{
moment
,
moment
,
mousedown
(
e
)
{
mousedown
(
e
)
{
console
.
log
(
"?"
)
console
.
log
(
"?"
)
;
return
;
return
;
// console.log(this.$refs.previewImg)
// console.log(this.$refs.previewImg)
this
.
$refs
.
previewImg
.
showViewer
=
true
;
this
.
$refs
.
previewImg
.
showViewer
=
true
;
...
@@ -126,6 +129,15 @@ export default {
...
@@ -126,6 +129,15 @@ export default {
close
()
{
close
()
{
this
.
obj
.
polyline
.
infoWindow
.
close
();
this
.
obj
.
polyline
.
infoWindow
.
close
();
}
,
}
,
deviceMore
()
{
console
.
log
(
this
.
obj
.
polyline
.
getExtData
().
lineData
)
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
$router
.
push
({
path
:
"/realtimeData/realtimedetail"
,
query
:
{
deviceId
:
this
.
obj
.
polyline
.
getExtData
().
lineData
.
pipeId
,
}
,
}
);
}
,
}
,
}
,
}
;
}
;
<
/script
>
<
/script
>
...
@@ -141,7 +153,7 @@ export default {
...
@@ -141,7 +153,7 @@ export default {
.
top
{
.
top
{
width
:
100
%
;
width
:
100
%
;
height
:
51
px
;
height
:
51
px
;
background
-
color
:
#
053
B6A
;
background
-
color
:
#
053
b6a
;
.
text
{
.
text
{
font
-
weight
:
600
;
font
-
weight
:
600
;
font
-
size
:
16
px
;
font
-
size
:
16
px
;
...
@@ -230,7 +242,7 @@ export default {
...
@@ -230,7 +242,7 @@ export default {
box
-
sizing
:
border
-
box
;
box
-
sizing
:
border
-
box
;
padding
:
10
px
0
2
px
22
px
;
padding
:
10
px
0
2
px
22
px
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
border
-
bottom
:
1
px
solid
#
e2e2e2
;
color
:
#
FE
5966
;
color
:
#
fe
5966
;
&
>
div
{
&
>
div
{
font
-
size
:
14
px
;
font
-
size
:
14
px
;
font
-
weight
:
400
;
font
-
weight
:
400
;
...
...
gassafety-web/src/components/PopWindowGis/lineInfoWindowWarn.vue
View file @
f82316af
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
@
click
.
stop
=
"stopPropatation"
class
=
"btn"
>
<
div
@
click
.
stop
=
"stopPropatation"
class
=
"btn"
>
<
span
>
<
span
@
mousedown
.
stop
=
"deviceMore"
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
el
-
button
class
=
"elbtn"
type
=
"primary"
>
设备详情
<
/el-button
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"orderId"
@
mousedown
.
stop
=
"createWork"
>
<
span
v
-
if
=
"orderId"
@
mousedown
.
stop
=
"createWork"
>
...
@@ -160,17 +160,29 @@ export default {
...
@@ -160,17 +160,29 @@ export default {
}
,
}
,
CreateWorkCallBack
()
{
CreateWorkCallBack
()
{
console
.
log
(
"polylineCallBack"
);
console
.
log
(
"polylineCallBack"
);
const
polyline
=
this
.
obj
.
polyline
.
getExtData
().
lineData
.
view
.
gaoMap
.
polyLines
.
filter
(
const
polyline
=
this
.
obj
.
polyline
(
item
)
=>
{
.
getExtData
()
return
item
.
getExtData
().
lineData
.
alarmId
==
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmId
;
.
lineData
.
view
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
}
return
(
)[
0
];
item
.
getExtData
().
lineData
.
alarmId
==
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmId
);
}
)[
0
];
console
.
log
(
"polyline.getExtData()"
,
polyline
.
getExtData
().
lineData
);
console
.
log
(
"polyline.getExtData()"
,
polyline
.
getExtData
().
lineData
);
let
options
=
polyline
.
getExtData
();
let
options
=
polyline
.
getExtData
();
// 暂时传值,到时候回重新刷新
// 暂时传值,到时候回重新刷新
options
.
lineData
.
orderId
=
"1"
;
options
.
lineData
.
orderId
=
"1"
;
polyline
.
setExtData
(
options
);
polyline
.
setExtData
(
options
);
}
,
}
,
deviceMore
()
{
console
.
log
(
this
.
obj
.
polyline
.
getExtData
().
lineData
);
this
.
obj
.
polyline
.
getExtData
().
class
.
view
.
$router
.
push
({
path
:
"/deviceAlarm/alarmdetail"
,
query
:
{
alarmId
:
this
.
obj
.
polyline
.
getExtData
().
lineData
.
alarmId
,
}
,
}
);
}
,
}
,
}
,
}
;
}
;
<
/script
>
<
/script
>
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindow.vue
View file @
f82316af
...
@@ -68,7 +68,9 @@
...
@@ -68,7 +68,9 @@
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
<div>
详细信息:
<span>
管线两端设备压差较大,管线可能泄漏
</span></div>
</div>
-->
</div>
-->
<div
class=
"btn"
>
<div
class=
"btn"
>
<span
@
mousedown
.
stop=
"deviceMore"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
</span>
<!--
<el-button
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
-->
<!--
<el-button
class=
"elbtn"
type=
"primary"
>
生成工单
</el-button>
-->
</div>
</div>
</div>
</div>
...
@@ -87,6 +89,14 @@ export default {
...
@@ -87,6 +89,14 @@ export default {
},
},
methods
:
{
methods
:
{
moment
,
moment
,
deviceMore
()
{
this
.
data
.
class
.
view
.
$router
.
push
({
path
:
"/realtimeData/realtimedetail"
,
query
:
{
deviceId
:
this
.
data
.
deviceId
,
},
});
},
},
},
};
};
</
script
>
</
script
>
...
...
gassafety-web/src/components/PopWindowGis/markerInfoWindowWarn.vue
View file @
f82316af
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</div>
</div>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<span>
<span
@
mousedown
.
stop=
"deviceMore"
>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
<el-button
class=
"elbtn"
type=
"primary"
>
设备详情
</el-button>
</span>
</span>
<span
v-if=
"orderId"
@
mousedown
.
stop=
"createWork"
>
<span
v-if=
"orderId"
@
mousedown
.
stop=
"createWork"
>
...
@@ -115,10 +115,9 @@ export default {
...
@@ -115,10 +115,9 @@ export default {
this
.
data
.
view
.
$refs
.
CreateWork
.
open
=
true
;
this
.
data
.
view
.
$refs
.
CreateWork
.
open
=
true
;
this
.
data
.
view
.
$refs
.
CreateWork
.
gaoMap
=
this
.
data
.
view
.
gaoMap
;
this
.
data
.
view
.
$refs
.
CreateWork
.
gaoMap
=
this
.
data
.
view
.
gaoMap
;
// 改变外层回调
// 改变外层回调
this
.
data
.
view
.
CreateWorkCallBack
=
this
.
CreateWorkCallBack
;
this
.
data
.
view
.
CreateWorkCallBack
=
this
.
CreateWorkCallBack
;
},
},
CreateWorkCallBack
()
{
CreateWorkCallBack
()
{
// console.log("markerCallBack")
// console.log("markerCallBack")
const
marker
=
this
.
data
.
view
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
const
marker
=
this
.
data
.
view
.
gaoMap
.
markers
.
filter
((
item
)
=>
{
return
item
.
getExtData
().
alarmId
==
this
.
data
.
alarmId
;
return
item
.
getExtData
().
alarmId
==
this
.
data
.
alarmId
;
...
@@ -129,6 +128,14 @@ export default {
...
@@ -129,6 +128,14 @@ export default {
options
.
orderId
=
"1"
;
options
.
orderId
=
"1"
;
marker
.
setExtData
(
options
);
marker
.
setExtData
(
options
);
},
},
deviceMore
()
{
this
.
data
.
view
.
$router
.
push
({
path
:
"/deviceAlarm/alarmdetail"
,
query
:
{
alarmId
:
this
.
data
.
alarmId
,
},
});
},
},
},
beforeDestroy
()
{
beforeDestroy
()
{
// this.data.view.createWorkOpen = false;
// this.data.view.createWorkOpen = false;
...
...
gassafety-web/src/utils/gaodeMapView.js
View file @
f82316af
...
@@ -48,6 +48,8 @@ class gaodeMap {
...
@@ -48,6 +48,8 @@ class gaodeMap {
showInfoWindow
=
null
;
showInfoWindow
=
null
;
// 工人轨迹用的窗口
// 工人轨迹用的窗口
markerPassedPolylineInfoWindow
=
null
;
markerPassedPolylineInfoWindow
=
null
;
view
=
null
;
handleInfoWindowOpenFunc
=
null
;
//构造函数中设置中央点默认值
//构造函数中设置中央点默认值
constructor
(
center
)
{
constructor
(
center
)
{
...
@@ -100,8 +102,15 @@ class gaodeMap {
...
@@ -100,8 +102,15 @@ class gaodeMap {
// console.log("缩放开始")
// console.log("缩放开始")
this
.
closeInfoWindow
();
this
.
closeInfoWindow
();
});
});
this
.
myMap
.
on
(
"moveend"
,
()
=>
{
if
(
this
.
handleInfoWindowOpenFunc
)
{
this
.
handleInfoWindowOpenFunc
();
this
.
handleInfoWindowOpenFunc
=
null
;
}
});
this
.
districtBoundaries
();
this
.
districtBoundaries
();
}
}
// 地图移动结束
/**
/**
* 获取map
* 获取map
...
@@ -155,7 +164,10 @@ class gaodeMap {
...
@@ -155,7 +164,10 @@ class gaodeMap {
}
}
});
});
}
}
// 地图中点平移
panTo
(
lnglat
)
{
this
.
myMap
.
panTo
(
lnglat
);
}
/**
/**
* 添加Market
* 添加Market
* @param markerType
* @param markerType
...
@@ -215,18 +227,22 @@ class gaodeMap {
...
@@ -215,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
({
...
@@ -246,10 +262,10 @@ class gaodeMap {
...
@@ -246,10 +262,10 @@ class gaodeMap {
DEVICE_TYPE
.
SMALLINSPECTOR
!=
markerType
DEVICE_TYPE
.
SMALLINSPECTOR
!=
markerType
)
{
)
{
// marker.content = this.getMarketContent(data, markerInfoWindow);
// marker.content = this.getMarketContent(data, markerInfoWindow);
marker
.
on
(
"mouseover"
,
infoOpen
);
marker
.
infoWindow
=
infoWindow
;
marker
.
on
(
"mouseover"
,
that
.
infoOpen
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
on
(
"mouseout"
,
infoClose
);
marker
.
setExtData
(
data
);
marker
.
setExtData
(
data
);
that
.
deviceType
=
markerType
;
that
.
deviceType
=
markerType
;
let
editWindow
=
that
.
createInfowindow
(
"编辑"
);
let
editWindow
=
that
.
createInfowindow
(
"编辑"
);
editWindow
.
fileArr
=
editWindow
.
fileArr
=
...
@@ -326,16 +342,32 @@ class gaodeMap {
...
@@ -326,16 +342,32 @@ class gaodeMap {
//infoWindow.close(map, e.target.getPosition());
//infoWindow.close(map, e.target.getPosition());
}
}
function
infoOpen
(
e
)
{
// function infoOpen(e) {}
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
=>
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
this
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
this
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
}
console
.
log
(
"that.markerType"
,
that
.
markerType
);
// console.log("this.markerType", this
.markerType);
// 警告状态这样就要换infowindow
// 警告状态这样就要换infowindow
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
getExtData
(),
e
.
target
.
getExtData
(),
markerInfoWindowWarn
markerInfoWindowWarn
);
);
...
@@ -347,12 +379,12 @@ class gaodeMap {
...
@@ -347,12 +379,12 @@ class gaodeMap {
// : e.target.getExtData().deviceType + "";
// : e.target.getExtData().deviceType + "";
// 上图状态跟后台状态不统一,所以需要判断一下
// 上图状态跟后台状态不统一,所以需要判断一下
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
if
(
e
.
target
.
getExtData
().
deviceType
==
4
)
{
that
.
markerType
=
"7"
;
this
.
markerType
=
"7"
;
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
}
else
if
(
e
.
target
.
getExtData
().
deviceType
<=
3
)
{
that
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
this
.
markerType
=
+
e
.
target
.
getExtData
().
deviceType
+
1
+
""
;
}
}
console
.
log
(
"that
.markerType"
);
console
.
log
(
"this
.markerType"
);
e
.
target
.
content
=
that
.
getMarketContent
(
e
.
target
.
content
=
this
.
getMarketContent
(
e
.
target
.
getExtData
(),
e
.
target
.
getExtData
(),
markerInfoWindow
markerInfoWindow
);
);
...
@@ -361,20 +393,16 @@ class gaodeMap {
...
@@ -361,20 +393,16 @@ class gaodeMap {
let
options
=
map
.
getStatus
();
let
options
=
map
.
getStatus
();
options
.
scrollWheel
=
false
;
options
.
scrollWheel
=
false
;
map
.
setStatus
(
options
);
map
.
setStatus
(
options
);
infoWindow
.
setContent
(
e
.
target
.
content
);
e
.
target
.
infoWindow
.
setContent
(
e
.
target
.
content
);
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
e
.
target
.
infoWindow
.
open
(
map
,
e
.
target
.
getPosition
());
// 检测是否碰到底部的bottomData
// 检测是否碰到底部的bottomData
that
.
boxCollision
(
infoWindow
.
dom
);
this
.
boxCollision
(
e
.
target
.
infoWindow
.
dom
);
// that.addCloneDome(e.target, infoWindow);
// that.addCloneDome(e.target, infoWindow);
// infoWindow.close();
// infoWindow.close();
that
.
markerInfoWindow
=
infoWindow
;
this
.
markerInfoWindow
=
e
.
target
.
infoWindow
;
}
};
return
marker
;
}
/**
/**
* marker添加拖拽事件
* marker添加拖拽事件
*/
*/
...
@@ -397,7 +425,9 @@ class gaodeMap {
...
@@ -397,7 +425,9 @@ class gaodeMap {
* @param data
* @param data
* @returns {string}
* @returns {string}
*/
*/
getMarketContent
(
data
,
markerInfoWindow
)
{
getMarketContent
(
Data
,
markerInfoWindow
)
{
let
data
=
{
...
Data
};
data
.
class
=
this
;
console
.
log
(
"this.markerType"
,
this
.
markerType
);
console
.
log
(
"this.markerType"
,
this
.
markerType
);
switch
(
this
.
markerType
)
{
switch
(
this
.
markerType
)
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
case
DEVICE_TYPE
.
REGEULATORBOX
:
{
...
@@ -703,7 +733,8 @@ class gaodeMap {
...
@@ -703,7 +733,8 @@ class gaodeMap {
type
:
"line"
,
type
:
"line"
,
//当前line状态 0:正常状态 1:正在编辑状态
//当前line状态 0:正常状态 1:正在编辑状态
isState
:
0
,
isState
:
0
,
lineData
:
item
lineData
:
item
,
class
:
this
}
}
});
});
...
@@ -711,17 +742,41 @@ class gaodeMap {
...
@@ -711,17 +742,41 @@ class gaodeMap {
// 信息窗体
// 信息窗体
this
.
newLineAddEvent
(
polyline
);
this
.
newLineAddEvent
(
polyline
);
//添加事件
//添加事件
polyline
.
on
(
"mouseover"
,
e
=>
{
polyline
.
on
(
"mouseover"
,
this
.
polylineMouseOver
);
polyline
.
on
(
"mouseout"
,
e
=>
{
// console.log("polyline.getExtData().lineData.alarmState",polyline.getExtData().lineData.alarmState)
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
// infoWindow.close();
});
// 计算info的位置
// function infoPosition() {}
}
map
.
add
(
this
.
polyLines
);
// 缩放地图到合适的视野级别
// map.setFitView();
}
// 鼠标移入线条执行
polylineMouseOver
=
e
=>
{
let
polyline
=
e
.
target
;
if
(
this
.
lineType
==
1
)
return
;
if
(
this
.
lineType
==
1
)
return
;
// 生成infoWindow
// 生成infoWindow
let
infoWindow
;
let
infoWindow
;
// 警告状态时
// 警告状态时
const
item
=
e
.
target
.
getExtData
().
lineData
;
// console.log("item",item)
if
(
e
.
target
.
getExtData
().
lineData
.
alarmState
==
1
)
{
if
(
e
.
target
.
getExtData
().
lineData
.
alarmState
==
1
)
{
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindowWarn
,
item
);
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindowWarn
,
item
);
}
else
{
}
else
{
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
);
infoWindow
=
this
.
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
);
}
}
infoWindow
.
open
(
map
,
e
.
lnglat
);
infoWindow
.
open
(
map
,
e
.
lnglat
);
console
.
log
(
infoWindow
);
// 如果是鼠标真正移入,则计算位置,如果不是鼠标真正移入,是人为执行出现infowindow,则不计算位置
console
.
log
(
"e.originEvent"
,
e
.
originEvent
);
if
(
e
.
originEvent
)
{
// 上方导航的高
// 上方导航的高
const
topBar
=
81
;
const
topBar
=
81
;
// 坐标导航的宽
// 坐标导航的宽
...
@@ -768,25 +823,15 @@ class gaodeMap {
...
@@ -768,25 +823,15 @@ class gaodeMap {
}
else
{
}
else
{
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
polyline
.
setOptions
({
strokeColor
:
"#FF5A67"
});
}
}
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
X
,
Y
));
}
else
{
infoWindow
.
setOffset
(
new
AMap
.
Pixel
(
20
,
-
20
));
}
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
boxCollision
(
infoWindow
.
dom
);
this
.
showInfoWindow
=
infoWindow
;
this
.
showInfoWindow
=
infoWindow
;
// const
// const
});
};
polyline
.
on
(
"mouseout"
,
e
=>
{
// console.log("polyline.getExtData().lineData.alarmState",polyline.getExtData().lineData.alarmState)
if
(
polyline
.
getExtData
().
lineData
.
alarmState
==
1
)
return
;
polyline
.
setOptions
({
strokeColor
:
"#F7FE38"
});
// infoWindow.close();
});
// 计算info的位置
// function infoPosition() {}
}
map
.
add
(
this
.
polyLines
);
// 缩放地图到合适的视野级别
// map.setFitView();
}
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
)
{
lineMouseOver
(
polyline
,
lineInfoWindow
,
item
)
{
let
dom
=
createPop
(
lineInfoWindow
,
{
let
dom
=
createPop
(
lineInfoWindow
,
{
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
,
polyline
}
obj
:
{
a
:
123
,
editorPage
:
true
,
...
item
,
polyline
}
...
...
gassafety-web/src/views/dataMonitoring/deviceAlarm/index.vue
View file @
f82316af
...
@@ -263,7 +263,6 @@ export default {
...
@@ -263,7 +263,6 @@ export default {
vm
.
fromGisMap
=
false
;
vm
.
fromGisMap
=
false
;
}
}
});
});
},
},
methods
:
{
methods
:
{
/** 查询报警信息列表 */
/** 查询报警信息列表 */
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
f82316af
This diff is collapsed.
Click to expand it.
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