Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
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-progress
Commits
151f57e5
Commit
151f57e5
authored
Mar 30, 2022
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击中心点
parent
2f8c698d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
yjmap.js
gassafetyprogress-web/src/utils/mapClass/yjmap.js
+3
-0
index.vue
gassafetyprogress-web/src/views/emergency/index.vue
+23
-4
No files found.
gassafetyprogress-web/src/utils/mapClass/yjmap.js
View file @
151f57e5
...
...
@@ -734,6 +734,9 @@ export class EditorMap {
});
}
}
setZoomAndCenter
(
longitude
,
latitude
){
this
.
map
.
setZoomAndCenter
(
14
,
[
longitude
,
latitude
]);
}
// 普通调用方法
// 设备报警
deviceAlarm
(
obj
)
{
...
...
gassafetyprogress-web/src/views/emergency/index.vue
View file @
151f57e5
...
...
@@ -484,8 +484,9 @@ export default {
this
.
map
=
new
EditorMap
(
"map"
,
{
center
:
path
,
//
center: path,
//mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
center
:
[
114.208007
,
38.260288
],
zoom
:
14.5
,
},
this
...
...
@@ -610,8 +611,8 @@ export default {
this
.
dialogTableVisible
=
false
;
},
getPath
(
res
){
console
.
log
(
"res"
,
res
);
console
.
log
(
this
.
form
.
longitude
,
this
.
form
.
latitude
);
//
console.log("res", res);
//
console.log(this.form.longitude, this.form.latitude);
//确认选择经纬度
this
.
form
.
longitude
=
res
[
0
];
this
.
form
.
latitude
=
res
[
1
];
...
...
@@ -757,12 +758,30 @@ export default {
this
.
selarr1
.
splice
(
ind
,
1
);
}
else
{
this
.
selarr1
.
push
(
item
.
val
);
//找中心点
console
.
log
(
item
.
val
);
if
(
item
.
val
>=
10
){
for
(
var
i
=
0
;
i
<
this
.
deviceList
.
length
;
i
++
){
if
(
this
.
deviceList
[
i
].
iconType
==
item
.
val
){
console
.
log
(
this
.
deviceList
[
i
])
this
.
map
.
setZoomAndCenter
(
this
.
deviceList
[
i
].
longitude
,
this
.
deviceList
[
i
].
latitude
);
break
;
}
}
// this.deviceList.forEach((item2) => (
// if(item2.iconType==item.val){
//
// }
//
// ));
}
}
this
.
map
.
allfilter
(
this
.
selarr
,
this
.
selarr1
);
//this.map.setZoomAndCenter(14, [116.326655,39.899438]);
},
//用户的设备center
getDetectorInfoList
(
httpFunc
,
queryParams
,
title
)
{
console
.
log
(
queryParams
);
//
console.log(queryParams);
return
httpFunc
(
queryParams
).
then
((
res
)
=>
{
// console.log("queryParams", res);
if
(
res
.
code
==
200
)
{
...
...
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