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 7cab9cb5
authored
Jun 07, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复脏数据解析问题
1 parent
698028d4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
package-lock.json
src/utils/mapgeo.js
vue.config.js
package-lock.json
View file @
7cab9cb
This diff could not be displayed because it is too large.
src/utils/mapgeo.js
View file @
7cab9cb
...
@@ -27,15 +27,23 @@ const MAPGEO = {
...
@@ -27,15 +27,23 @@ const MAPGEO = {
obj
.
len
=
data
.
length
;
obj
.
len
=
data
.
length
;
obj
.
times
=
obj
.
len
>
20
?
Math
.
ceil
(
obj
.
len
/
20
)
:
1
;
obj
.
times
=
obj
.
len
>
20
?
Math
.
ceil
(
obj
.
len
/
20
)
:
1
;
obj
.
totalNum
=
0
;
obj
.
totalNum
=
0
;
obj
.
realNum
=
0
;
//为了剔除脏数据,脏数据导致解析不回调
for
(
let
i
=
0
;
i
<
obj
.
times
;
i
++
)
{
for
(
let
i
=
0
;
i
<
obj
.
times
;
i
++
)
{
let
lnglatArr
=
[];
let
lnglatArr
=
[];
let
initIdx
=
i
*
20
;
let
initIdx
=
i
*
20
;
let
maxIdx
=
i
===
obj
.
times
-
1
?
obj
.
len
:
(
i
+
1
)
*
20
;
let
maxIdx
=
i
===
obj
.
times
-
1
?
obj
.
len
:
(
i
+
1
)
*
20
;
for
(
let
idx
=
initIdx
;
idx
<
maxIdx
;
idx
++
)
{
for
(
let
idx
=
initIdx
;
idx
<
maxIdx
;
idx
++
)
{
lnglatArr
.
push
([
let
_lng
=
data
[
idx
].
lastlng
||
data
[
idx
].
elng
;
data
[
idx
].
lastlng
||
data
[
idx
].
elng
,
let
_lat
=
data
[
idx
].
lastlat
||
data
[
idx
].
elat
;
data
[
idx
].
lastlat
||
data
[
idx
].
elat
,
// 防止出现gps点:.00000的错误
]);
if
(
Number
(
_lng
)
>
0
&&
Number
(
_lat
)
>
0
)
{
lnglatArr
.
push
([
_lng
,
_lat
]);
obj
.
realNum
++
;
}
// lnglatArr.push([
// data[idx].lastlng || data[idx].elng,
// data[idx].lastlat || data[idx].elat,
// ]);
}
}
(
function
(
initIdx
)
{
(
function
(
initIdx
)
{
geocoderGetAdr
(
lnglatArr
,
initIdx
);
geocoderGetAdr
(
lnglatArr
,
initIdx
);
...
@@ -51,7 +59,7 @@ const MAPGEO = {
...
@@ -51,7 +59,7 @@ const MAPGEO = {
data
[
initIdx
+
idx
].
transferAddress
=
item
.
formattedAddress
;
data
[
initIdx
+
idx
].
transferAddress
=
item
.
formattedAddress
;
obj
.
totalNum
++
;
obj
.
totalNum
++
;
});
});
if
(
obj
.
totalNum
===
obj
.
len
)
{
if
(
obj
.
totalNum
===
obj
.
realNum
)
{
cb
&&
cb
(
data
);
cb
&&
cb
(
data
);
//ifPlay && obj.init(data)
//ifPlay && obj.init(data)
//EventBus.$emit('uiMap.replay.transferAdrDone');
//EventBus.$emit('uiMap.replay.transferAdrDone');
...
...
vue.config.js
View file @
7cab9cb
...
@@ -17,7 +17,7 @@ module.exports = defineConfig({
...
@@ -17,7 +17,7 @@ module.exports = defineConfig({
port
:
9527
,
port
:
9527
,
proxy
:
{
proxy
:
{
'/api'
:
{
'/api'
:
{
target
:
'https://eshield.
dev
.glsx.com.cn/'
,
target
:
'https://eshield.
test
.glsx.com.cn/'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
secure
:
false
,
secure
:
false
,
pathRewrite
:
{
"^/api"
:
""
},
pathRewrite
:
{
"^/api"
:
""
},
...
...
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