Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-h5
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 988641f4
authored
Jan 15, 2025
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
地址
1 parent
5e43c6d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
src/utils/mapgeo.js
src/views/index.vue
src/utils/mapgeo.js
View file @
988641f
...
...
@@ -56,7 +56,8 @@ const MAPGEO = {
const
timeoutId
=
window
.
setTimeout
(()
=>
{
arr
.
forEach
((
item
,
idx
)
=>
{
window
.
mapapi
.
invoke
(
'getLocation'
,
window
.
mapapi
.
invoke
(
'Point'
,
item
[
0
],
item
[
1
]),
res
=>
{
data
[
initIdx
+
idx
].
transferAddress
=
res
.
address
;
const
{
content
:
{
poi_desc
,
address_detail
:
{
province
,
city
,
district
,
town
,
street
}}}
=
res
data
[
initIdx
+
idx
].
transferAddress
=
province
+
city
+
district
+
town
+
street
+
poi_desc
;
obj
.
totalNum
++
;
if
(
obj
.
totalNum
===
obj
.
realNum
)
{
cb
&&
cb
(
data
);
...
...
src/views/index.vue
View file @
988641f
...
...
@@ -371,7 +371,7 @@ export default defineComponent({
if
(
res
.
data
.
length
>
0
)
{
const
points
=
[];
let
locates
=
[];
res
.
data
.
forEach
((
item
)
=>
{
res
.
data
.
forEach
((
item
,
idx
)
=>
{
item
.
locationType
=
"gpsLocation"
;
// 如果gps信息没有,则展示基站信息
if
(
!
item
.
gpsLocation
||
!
item
.
gpsLocation
.
blng
)
{
...
...
@@ -407,7 +407,12 @@ export default defineComponent({
locates
.
push
(
item
.
wifiLocation
);
item
.
wifiLocation
.
transferAddress
=
""
;
}
points
.
push
(
drawMarker
(
item
,
map
,
locates
));
window
.
mapapi
.
invoke
(
'getLocation'
,
window
.
mapapi
.
invoke
(
'Point'
,
item
[
item
.
locationType
].
blng
,
item
[
item
.
locationType
].
blat
),
res
=>
{
const
{
content
:
{
poi_desc
,
address_detail
:
{
province
,
city
,
district
,
town
,
street
}}}
=
res
item
.
transferAddress
=
province
+
city
+
district
+
town
+
street
+
poi_desc
;
locates
[
idx
].
transferAddress
=
province
+
city
+
district
+
town
+
street
+
poi_desc
;
points
.
push
(
drawMarker
(
item
,
map
,
locates
));
})
});
if
(
locates
.
length
<=
0
)
{
return
Toast
(
"暂无有效定位点信息"
);
...
...
@@ -501,7 +506,7 @@ export default defineComponent({
}
<
/span></
p
>
`;
}
carInfoWindowTpl += `
<
p
class
=
"time-info"
><
i
class
=
"icon icon-online-time"
><
/i><span class="label">在线时间</
span
><
span
data
-
onlineTime
>
$
{
item
[
item
.
locationType
].
dateTime
}
</span></p>
<p class="locate-info"><i class="icon icon-locate-sm"></i><span class="label">详细地址</span><span data-tranferAddress>
${
item
[
item
.
locationType
].
a
ddress
}
</span></p><p p class="list-info" > <i class="icon icon-typeList"></i><span class="label">定位类型</span>`
;
<p class="locate-info"><i class="icon icon-locate-sm"></i><span class="label">详细地址</span><span data-tranferAddress>
${
item
[
item
.
locationType
].
transferA
ddress
}
</span></p><p p class="list-info" > <i class="icon icon-typeList"></i><span class="label">定位类型</span>`
;
// 判断是否有gps信息
if
(
item
.
gpsLocation
&&
item
.
gpsLocation
.
lng
)
{
carInfoWindowTpl
+=
`<a data-GPS><span class="radio active"></span>GPS</a>`
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment