Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NewTruckTerminalSyetem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
SQL_Mou
NewTruckTerminalSyetem
Commits
a62b5276
Commit
a62b5276
authored
Sep 29, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c595e7fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
4 deletions
+58
-4
index.vue
src/views/MLargeScreen/index.vue
+58
-4
No files found.
src/views/MLargeScreen/index.vue
View file @
a62b5276
...
@@ -95,6 +95,10 @@ import smallWindow from './components/smallWindow/index.vue' //小窗口车辆
...
@@ -95,6 +95,10 @@ import smallWindow from './components/smallWindow/index.vue' //小窗口车辆
import
mars3dViewerMap
from
'
../../components/mars3d/Map.vue
'
//地图
import
mars3dViewerMap
from
'
../../components/mars3d/Map.vue
'
//地图
import
ElectricQuantity
from
'
../../components/electricity/index.vue
'
//电池组件
import
ElectricQuantity
from
'
../../components/electricity/index.vue
'
//电池组件
let
x_PI
=
3.14159265358979324
*
3000.0
/
180.0
;
let
PI
=
3.1415926535897932384626
;
let
a
=
6378245.0
;
let
ee
=
0.00669342162296594323
;
export
default
{
export
default
{
components
:
{
components
:
{
startOrderReceiving
,
startOrderReceiving
,
...
@@ -144,7 +148,7 @@ export default {
...
@@ -144,7 +148,7 @@ export default {
if
(
this
.
equipmentName
){
if
(
this
.
equipmentName
){
this
.
getCarLoaction
();
this
.
getCarLoaction
();
}
}
},
3
000
)
},
2
000
)
this
.
zongTimer2
=
setInterval
(()
=>
{
this
.
zongTimer2
=
setInterval
(()
=>
{
if
(
this
.
carnumber
==
''
){
if
(
this
.
carnumber
==
''
){
return
return
...
@@ -174,14 +178,14 @@ export default {
...
@@ -174,14 +178,14 @@ export default {
this
.
$notify
({
this
.
$notify
({
title
:
(
item
.
type
==
1
?
"
限入
"
:
item
.
type
==
2
?
'
限出
'
:
item
.
type
==
4
?
'
防碰撞
'
:
''
)
+
(
item
.
areaName
==
undefined
?
''
:
item
.
areaName
)
+
'
报警
'
,
title
:
(
item
.
type
==
1
?
"
限入
"
:
item
.
type
==
2
?
'
限出
'
:
item
.
type
==
4
?
'
防碰撞
'
:
''
)
+
(
item
.
areaName
==
undefined
?
''
:
item
.
areaName
)
+
'
报警
'
,
type
:
'
warning
'
,
type
:
'
warning
'
,
duration
:
10
000
,
duration
:
5
000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
}
else
if
(
this
.
carclass
!=
'
铲车
'
){
}
else
if
(
this
.
carclass
!=
'
铲车
'
){
this
.
$notify
({
this
.
$notify
({
title
:
(
item
.
type
==
1
?
"
限入
"
:
item
.
type
==
2
?
'
限出
'
:
(
item
.
type
==
3
&&
this
.
carclass
!=
'
铲车
'
)
?
'
无故停车
'
:
item
.
type
==
4
?
'
防碰撞
'
:
''
)
+
(
item
.
areaName
==
undefined
?
''
:
item
.
areaName
)
+
'
报警
'
,
title
:
(
item
.
type
==
1
?
"
限入
"
:
item
.
type
==
2
?
'
限出
'
:
(
item
.
type
==
3
&&
this
.
carclass
!=
'
铲车
'
)
?
'
无故停车
'
:
item
.
type
==
4
?
'
防碰撞
'
:
''
)
+
(
item
.
areaName
==
undefined
?
''
:
item
.
areaName
)
+
'
报警
'
,
type
:
'
warning
'
,
type
:
'
warning
'
,
duration
:
10
000
,
duration
:
5
000
,
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
});
});
}
}
...
@@ -194,7 +198,7 @@ export default {
...
@@ -194,7 +198,7 @@ export default {
}
}
});
});
},
15
000
)
},
8
000
)
},
},
methods
:{
methods
:{
...
@@ -276,10 +280,13 @@ export default {
...
@@ -276,10 +280,13 @@ export default {
//locationSuccess 获取成功的话
//locationSuccess 获取成功的话
function
(
position
)
{
function
(
position
)
{
//console.log(position.coords.longitude,position.coords.latitude);
//console.log(position.coords.longitude,position.coords.latitude);
console
.
log
(
that
.
wgs84togcj02
(
position
.
coords
.
longitude
,
position
.
coords
.
latitude
));
let
LoaObj1
=
{};
let
LoaObj1
=
{};
let
LoaObj1xy
=
{};
let
LoaObj1xy
=
{};
LoaObj1xy
.
x
=
position
.
coords
.
longitude
;
LoaObj1xy
.
x
=
position
.
coords
.
longitude
;
LoaObj1xy
.
y
=
position
.
coords
.
latitude
;
LoaObj1xy
.
y
=
position
.
coords
.
latitude
;
// LoaObj1xy.x = that.wgs84togcj02(position.coords.longitude, position.coords.latitude)[0];
// LoaObj1xy.y = that.wgs84togcj02(position.coords.longitude, position.coords.latitude)[1];
LoaObj1
.
gndRate
=
''
;
LoaObj1
.
gndRate
=
''
;
LoaObj1
.
location
=
LoaObj1xy
;
LoaObj1
.
location
=
LoaObj1xy
;
LoaObj1
.
name
=
that
.
equipmentName
;
LoaObj1
.
name
=
that
.
equipmentName
;
...
@@ -300,6 +307,53 @@ export default {
...
@@ -300,6 +307,53 @@ export default {
);
);
}
}
},
},
/**
* WGS84转GCj02
* @param lng
* @param lat
* @returns {*[]}
*/
wgs84togcj02
(
lng
,
lat
)
{
if
(
this
.
out_of_china
(
lng
,
lat
))
{
return
[
lng
,
lat
]
}
else
{
let
dlat
=
this
.
transformlat
(
lng
-
105.0
,
lat
-
35.0
);
let
dlng
=
this
.
transformlng
(
lng
-
105.0
,
lat
-
35.0
);
let
radlat
=
lat
/
180.0
*
PI
;
let
magic
=
Math
.
sin
(
radlat
);
magic
=
1
-
ee
*
magic
*
magic
;
let
sqrtmagic
=
Math
.
sqrt
(
magic
);
dlat
=
(
dlat
*
180.0
)
/
((
a
*
(
1
-
ee
))
/
(
magic
*
sqrtmagic
)
*
PI
);
dlng
=
(
dlng
*
180.0
)
/
(
a
/
sqrtmagic
*
Math
.
cos
(
radlat
)
*
PI
);
let
mglat
=
lat
+
dlat
;
let
mglng
=
lng
+
dlng
;
return
[
mglng
,
mglat
]
}
},
/**
* 判断是否在国内,不在国内则不做偏移
* @param lng
* @param lat
* @returns {boolean}
*/
out_of_china
(
lng
,
lat
)
{
return
(
lng
<
72.004
||
lng
>
137.8347
)
||
((
lat
<
0.8293
||
lat
>
55.8271
)
||
false
);
},
transformlat
(
lng
,
lat
)
{
let
ret
=
-
100.0
+
2.0
*
lng
+
3.0
*
lat
+
0.2
*
lat
*
lat
+
0.1
*
lng
*
lat
+
0.2
*
Math
.
sqrt
(
Math
.
abs
(
lng
));
ret
+=
(
20.0
*
Math
.
sin
(
6.0
*
lng
*
PI
)
+
20.0
*
Math
.
sin
(
2.0
*
lng
*
PI
))
*
2.0
/
3.0
;
ret
+=
(
20.0
*
Math
.
sin
(
lat
*
PI
)
+
40.0
*
Math
.
sin
(
lat
/
3.0
*
PI
))
*
2.0
/
3.0
;
ret
+=
(
160.0
*
Math
.
sin
(
lat
/
12.0
*
PI
)
+
320
*
Math
.
sin
(
lat
*
PI
/
30.0
))
*
2.0
/
3.0
;
return
ret
},
transformlng
(
lng
,
lat
)
{
let
ret
=
300.0
+
lng
+
2.0
*
lat
+
0.1
*
lng
*
lng
+
0.1
*
lng
*
lat
+
0.1
*
Math
.
sqrt
(
Math
.
abs
(
lng
));
ret
+=
(
20.0
*
Math
.
sin
(
6.0
*
lng
*
PI
)
+
20.0
*
Math
.
sin
(
2.0
*
lng
*
PI
))
*
2.0
/
3.0
;
ret
+=
(
20.0
*
Math
.
sin
(
lng
*
PI
)
+
40.0
*
Math
.
sin
(
lng
/
3.0
*
PI
))
*
2.0
/
3.0
;
ret
+=
(
150.0
*
Math
.
sin
(
lng
/
12.0
*
PI
)
+
300.0
*
Math
.
sin
(
lng
/
30.0
*
PI
))
*
2.0
/
3.0
;
return
ret
},
//接受派单
//接受派单
IntelligentDisFn
(){
IntelligentDisFn
(){
if
(
this
.
orderReceiving
){
if
(
this
.
orderReceiving
){
...
...
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