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
8ac366c3
Commit
8ac366c3
authored
Mar 27, 2023
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
松原项目,优化了每10秒就缩放的问题,新增阀门井跟调压箱内的工业报警器表格
parent
94583016
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
387 additions
and
258 deletions
+387
-258
markerInfoWindow.vue
...fety-web/src/components/PopWindowGis/markerInfoWindow.vue
+357
-255
gaodeMapView.js
gassafety-web/src/utils/gaodeMapView.js
+29
-3
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+1
-0
No files found.
gassafety-web/src/components/PopWindowGis/markerInfoWindow.vue
View file @
8ac366c3
This diff is collapsed.
Click to expand it.
gassafety-web/src/utils/gaodeMapView.js
View file @
8ac366c3
...
...
@@ -425,13 +425,15 @@ class gaodeMap {
});
}
// 如果这个值为false说明不是workerpoint,就push进去
// 如果这个值为false说明不是workerpoint,就push进去
或者不是值班人员就让他缩放
if
(
!
marker
.
workerPoint
)
{
this
.
markers
.
push
(
marker
);
// 如果是值班人员也不缩放
if
(
markerType
!=
DEVICE_TYPE
.
INSPECTOR
)
{
map
.
setZoom
(
"13"
);
}
}
//map.setFitView();
function
infoClose
(
e
)
{
let
options
=
map
.
getStatus
();
options
.
scrollWheel
=
true
;
...
...
@@ -443,6 +445,30 @@ class gaodeMap {
return
marker
;
}
// 删除地图上marker 跟数组里的marker
removeMarker
(
type
)
{
// 获取过滤出来的marker
// 如果打开的是档期那type人员,就清空infowindow
if
(
this
.
markerType
==
type
){
this
.
closeInfoWindow
()
}
const
newOriginMaker
=
this
.
markers
.
filter
(
item
=>
{
console
.
log
(
item
.
markerType
)
return
item
.
markerType
==
type
;
});
newOriginMaker
.
forEach
(
item
=>
{
this
.
myMap
.
remove
(
item
)
});
console
.
log
(
newOriginMaker
);
newOriginMaker
.
forEach
(
item
=>
{
const
index
=
this
.
markers
.
findIndex
(
iten
=>
iten
.
getExtData
().
deviceType
==
type
);
if
(
index
<
0
)
{
this
.
markers
.
splice
(
index
,
1
);
}
});
}
// 值班人员
wokerManOpen
=
e
=>
{
this
.
markerType
=
e
.
target
.
markerType
;
...
...
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
8ac366c3
...
...
@@ -630,6 +630,7 @@ export default {
setInspectorLocationsInterval
(){
// 设置定时器,5s执行一次
let
timer
=
setInterval
(()
=>
{
this
.
gaoMap
.
removeMarker
(
DEVICE_TYPE
.
INSPECTOR
);
this
.
getInspectorLocations
();
},
10000
);
...
...
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