Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
whp-xl
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
lizhichao
whp-xl
Commits
79980e0f
Commit
79980e0f
authored
Jul 06, 2021
by
yaqizhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏
parent
6957b6d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
21 deletions
+41
-21
qyMap.vue
dcit-hcsystem-hcsystem-master/src/views/qyMap/qyMap.vue
+41
-21
No files found.
dcit-hcsystem-hcsystem-master/src/views/qyMap/qyMap.vue
View file @
79980e0f
...
...
@@ -143,8 +143,12 @@ export default class GIS extends Vue {
};
/* 地图 */
@
Provide
()
markers
:
any
=
[];
@
Provide
()
markers1
:
any
=
[];
@
Provide
()
markers2
:
any
=
[];
@
Provide
()
mapData
:
any
=
[];
@
Provide
()
windowsArr
:
any
=
[];
@
Provide
()
windowsArr1
:
any
=
[];
@
Provide
()
windowsArr2
:
any
=
[];
@
Provide
()
currentWindow
:
any
=
""
;
// @Provide() searchOption: any = {
// city: "石家庄",
...
...
@@ -310,9 +314,11 @@ export default class GIS extends Vue {
events
:
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
// console.log(ele,"ele")
ele
.
visible
=
false
;
});
that
.
$nextTick
(()
=>
{
// console.log(ele,"ele")
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
.
visible
=
true
;
});
...
...
@@ -343,11 +349,11 @@ export default class GIS extends Vue {
offset
:
[
-
13
,
-
2
],
events
:
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
that
.
windowsArr
1
.
forEach
((
ele
:
any
)
=>
{
ele
.
visible
=
false
;
});
that
.
$nextTick
(()
=>
{
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
=
that
.
windowsArr
1
[
index
];
that
.
currentWindow
.
visible
=
true
;
});
},
...
...
@@ -377,11 +383,11 @@ export default class GIS extends Vue {
offset
:
[
-
13
,
-
2
],
events
:
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
that
.
windowsArr
2
.
forEach
((
ele
:
any
)
=>
{
ele
.
visible
=
false
;
});
that
.
$nextTick
(()
=>
{
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
=
that
.
windowsArr
2
[
index
];
that
.
currentWindow
.
visible
=
true
;
});
},
...
...
@@ -406,6 +412,20 @@ export default class GIS extends Vue {
that
.
markers
[
index
].
visible
=
false
;
}
});
that
.
wxymapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
if
(
ele
.
dataType
==
v
||
v
==
0
)
{
that
.
markers1
[
index
].
visible
=
true
;
}
else
{
that
.
markers1
[
index
].
visible
=
false
;
}
});
that
.
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
if
(
ele
.
dataType
==
v
||
v
==
0
)
{
that
.
markers2
[
index
].
visible
=
true
;
}
else
{
that
.
markers2
[
index
].
visible
=
false
;
}
});
}
/* 搜索 */
...
...
@@ -539,38 +559,38 @@ export default class GIS extends Vue {
// });
if
(
res
.
code
==
0
&&
res
.
data
.
goodsList
.
length
>
0
)
{
that
.
mapData
=
res
.
data
.
goodsList
;
let
latSum
=
0
;
let
lngSum
=
0
;
that
.
mapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
wxy
mapData
=
res
.
data
.
goodsList
;
let
wxy
latSum
=
0
;
let
wxy
lngSum
=
0
;
that
.
wxy
mapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
wxyaddMark
(
ele
,
index
);
lngSum
+=
ele
.
longitude
;
latSum
+=
ele
.
latitude
;
wxy
lngSum
+=
ele
.
longitude
;
wxy
latSum
+=
ele
.
latitude
;
});
let
center
=
[
lngSum
/
that
.
mapData
.
length
,
latSum
/
that
.
mapData
.
length
,
wxylngSum
/
that
.
wxy
mapData
.
length
,
wxylatSum
/
that
.
wxy
mapData
.
length
,
];
that
.
Mutil
.
setViewF
({
center
:
center
})
}
if
(
res
.
code
==
0
&&
res
.
data
.
cameraList
.
length
>
0
)
{
let
shipinmapData
=
res
.
data
.
cameraList
;
that
.
shipinmapData
=
res
.
data
.
cameraList
;
let
shipinlatSum
=
0
;
let
shipinlngSum
=
0
;
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
shipinaddMark
(
ele
,
index
);
shipinlngSum
+=
ele
.
longitude
;
shipinlatSum
+=
ele
.
latitude
;
});
//
let center = [
//
shipinlngSum / that.shipinmapData.length,
//
shipinlatSum / that.shipinmapData.length,
//
];
//
that.Mutil.setViewF({
//
center: center
//
})
let
center
=
[
shipinlngSum
/
that
.
shipinmapData
.
length
,
shipinlatSum
/
that
.
shipinmapData
.
length
,
];
that
.
Mutil
.
setViewF
({
center
:
center
})
}
}
}
...
...
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