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
9450669d
Commit
9450669d
authored
May 05, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
左侧列表缩小问题修改 gengdidi
parent
09e958dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+24
-13
No files found.
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
9450669d
...
...
@@ -1099,9 +1099,11 @@ export default {
const
b
=
(
Number
(
item
.
list
[
0
].
lnglat
[
1
])
+
Number
(
item
.
list
[
0
].
path
[
1
]))
/
2
;
path
=
[
a
,
b
-
0.08
];
// path = [a, b - 0.08];
path
=
[
a
,
b
];
}
else
{
path
=
[
item
.
list
[
0
].
path
[
0
],
item
.
list
[
0
].
path
[
1
]
-
0.08
];
//path = [item.list[0].path[0], item.list[0].path[1] - 0.08];
path
=
[
item
.
list
[
0
].
path
[
0
],
item
.
list
[
0
].
path
[
1
]];
}
this
.
gaoMap
.
panTo
(
path
);
}
...
...
@@ -1116,7 +1118,7 @@ export default {
// 如果地图太大了就吸纳是不出来infowindow了,所以要固定缩放比例
// 所有线条颜色还原
this
.
gaoMap
.
polyLinesColorClear
();
this
.
gaoMap
.
myMap
.
setZoom
(
12
);
//
this.gaoMap.myMap.setZoom(12);
if
(
item
.
list
.
length
>
0
)
{
if
(
this
.
leftBarNum
.
includes
(
item
.
value
))
{
let
path
;
...
...
@@ -1124,12 +1126,14 @@ export default {
const
a
=
(
Number
(
iten
.
lnglat
[
0
])
+
Number
(
iten
.
path
[
0
]))
/
2
;
const
b
=
(
Number
(
iten
.
lnglat
[
1
])
+
Number
(
iten
.
path
[
1
]))
/
2
;
//屏幕移动的位置
path
=
[
a
,
b
-
0.08
];
// path = [a, b - 0.08];
path
=
[
a
,
b
];
// 线条infowindow显示中间,保留六位转换字符串,否则有时候会出现一些问题
iten
.
infoPath
=
[
a
.
toFixed
(
6
),
b
.
toFixed
(
6
)];
console
.
log
(
path
);
}
else
{
path
=
[
iten
.
path
[
0
],
iten
.
path
[
1
]
-
0.08
];
// path = [iten.path[0], iten.path[1] - 0.08];
path
=
[
iten
.
path
[
0
],
iten
.
path
[
1
]];
}
// const path =
// item.value == 1
...
...
@@ -1170,12 +1174,17 @@ export default {
// 如果是原地不动,就直接执行
// if (iten.infoPath[0] == lng && iten.infoPath[1] == lat + 0.1) {
if
(
/*
if (
iten.infoPath[0] - lng >= -0.00001 &&
iten.infoPath[0] - lng <= 0.00001 &&
iten.infoPath[1] - (lat + 0.08) >= -0.00001 &&
iten.infoPath[1] - (lat + 0.08) <= 0.00001
)
{
)*/
if
(
iten
.
infoPath
[
0
]
-
lng
>=
-
0.00001
&&
iten
.
infoPath
[
0
]
-
lng
<=
0.00001
&&
iten
.
infoPath
[
1
]
-
lat
>=
-
0.00001
&&
iten
.
infoPath
[
1
]
-
lat
<=
0.00001
){
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
polylineMouseOver
(
e
);
target
.
setOptions
({
strokeColor
:
"#F7FE38"
});
...
...
@@ -1199,8 +1208,8 @@ export default {
lnglat
:
iten
.
path
,
};
// 如果是原地不动,就直接执行
//
if (iten.path[0] == lng && iten.path[1] == lat + 0.08) {
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
+
0.08
-
0.000001
)
{
//
if (iten.path[0] == lng && iten.path[1] >= lat + 0.08 - 0.000001)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
-
0.000001
)
{
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
infoOpen
(
e
);
return
;
...
...
@@ -1221,8 +1230,8 @@ export default {
lnglat
:
iten
.
path
,
};
// 如果是原地不动,就直接执行
// if (iten.path[0] == lng && iten.path[1]
== lat + 0.08) {
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
+
0.08
-
0.000001
)
{
// if (iten.path[0] == lng && iten.path[1]
>= lat + 0.08 - 0.000001)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
-
0.000001
)
{
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
troubleOpen
(
e
);
return
;
...
...
@@ -1246,7 +1255,8 @@ export default {
// 如果是原地不动,就直接执行
// if (iten.path[0] == lng && iten.path[1] == lat + 0.08) {
// console.log(iten.path[0] , iten.path[1] ,lat+0.06,lng)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
+
0.08
-
0.000001
)
{
//if (iten.path[0] == lng && iten.path[1] >= lat + 0.08 - 0.000001)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
-
0.000001
)
{
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
wokerManOpen
(
e
);
return
;
...
...
@@ -1269,7 +1279,8 @@ export default {
// 如果是原地不动,就直接执行
// if (iten.path[0] == lng && iten.path[1] == lat + 0.08) {
// console.log(iten.path[0] , iten.path[1] ,lat+0.06,lng)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
+
0.08
-
0.000001
)
{
//if (iten.path[0] == lng && iten.path[1] >= lat + 0.08 - 0.000001)
if
(
iten
.
path
[
0
]
==
lng
&&
iten
.
path
[
1
]
>=
lat
-
0.000001
)
{
this
.
gaoMap
.
leftListClick
=
false
;
this
.
gaoMap
.
videoOpen
(
e
);
return
;
...
...
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