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
ef3e079d
Commit
ef3e079d
authored
Oct 21, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a559645e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
16 deletions
+39
-16
index.vue
...ews/MLargeScreen/components/startOrderReceiving/index.vue
+38
-15
index.vue
src/views/MLargeScreen/index.vue
+1
-1
No files found.
src/views/MLargeScreen/components/startOrderReceiving/index.vue
View file @
ef3e079d
...
@@ -59,6 +59,7 @@ export default {
...
@@ -59,6 +59,7 @@ export default {
}
}
},
},
mounted
(){
mounted
(){
let
that
=
this
;
this
.
sonTimer1
=
setInterval
(()
=>
{
this
.
sonTimer1
=
setInterval
(()
=>
{
if
(
this
.
carnumber
==
''
){
if
(
this
.
carnumber
==
''
){
return
;
return
;
...
@@ -120,21 +121,44 @@ export default {
...
@@ -120,21 +121,44 @@ export default {
}
}
}
}
//获取车辆坐标计算距离并返回给后台
//获取车辆坐标计算距离并返回给后台
httpGet
(
carRealTimeLocationQuery2
,{
name
:
resSon1
.
data
.
content
[
0
].
equipmentName
}).
then
((
res2
)
=>
{
// httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => {
if
(
res2
.
data
){
// if(res2.data){
if
(
this
.
oldxy
.
lat
==
0
||
this
.
oldxy
.
lng
==
0
){
// if(this.oldxy.lat == 0 || this.oldxy.lng == 0){
this
.
oldxy
.
lat
=
res2
.
data
.
location
.
y
;
// this.oldxy.lat = res2.data.location.y;
this
.
oldxy
.
lng
=
res2
.
data
.
location
.
x
;
// this.oldxy.lng = res2.data.location.x;
// }else{
// let distance1 = this.getDistance(this.oldxy.lat,this.oldxy.lng,res2.data.location.y,res2.data.location.x) + parseFloat(res_1.data.content[0].mil);
// putForJson(dingDanBiaoCaoZuo,{id:res_1.data.content[0].id,mil:distance1}).then((res) => {});
// this.$nextTick(()=>{
// this.oldxy.lat = res2.data.location.y;
// this.oldxy.lng = res2.data.location.x;
// })
// }
// }
// });
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
getCurrentPosition
(
function
(
position
)
{
if
(
that
.
oldxy
.
lat
==
0
||
that
.
oldxy
.
lng
==
0
){
that
.
oldxy
.
lat
=
position
.
coords
.
latitude
;
that
.
oldxy
.
lng
=
position
.
coords
.
longitude
;
}
else
{
}
else
{
let
distance1
=
this
.
getDistance
(
this
.
oldxy
.
lat
,
this
.
oldxy
.
lng
,
res2
.
data
.
location
.
y
,
res2
.
data
.
location
.
x
)
+
parseFloat
(
res_1
.
data
.
content
[
0
].
mil
);
let
distance1
=
that
.
getDistance
(
that
.
oldxy
.
lat
,
that
.
oldxy
.
lng
,
position
.
coords
.
latitude
,
position
.
coords
.
longitude
)
+
parseFloat
(
res_1
.
data
.
content
[
0
].
mil
);
putForJson
(
dingDanBiaoCaoZuo
,{
id
:
res_1
.
data
.
content
[
0
].
id
,
mil
:
distance1
}).
then
((
res
)
=>
{});
putForJson
(
dingDanBiaoCaoZuo
,{
id
:
res_1
.
data
.
content
[
0
].
id
,
mil
:
distance1
}).
then
((
res
)
=>
{});
this
.
$nextTick
(()
=>
{
that
.
$nextTick
(()
=>
{
this
.
oldxy
.
lat
=
res2
.
data
.
location
.
y
;
that
.
oldxy
.
lat
=
position
.
coords
.
latitude
;
this
.
oldxy
.
lng
=
res2
.
data
.
location
.
x
;
that
.
oldxy
.
lng
=
position
.
coords
.
longitude
;
})
})
}
}
},
function
(
error
)
{
var
errorType
=
[
'
您拒绝共享位置信息
'
,
'
获取不到位置信息
'
,
'
获取位置信息超时
'
];
console
.
log
(
errorType
[
error
.
code
-
1
]);
},{
enableHighAccuracy
:
true
,
}
);
}
}
});
}
}
});
});
}
}
...
@@ -676,7 +700,6 @@ export default {
...
@@ -676,7 +700,6 @@ export default {
}
}
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
+
"
"
+
hours
+
"
:
"
+
minutes
+
"
:
"
+
seconds
;
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
+
"
"
+
hours
+
"
:
"
+
minutes
+
"
:
"
+
seconds
;
//console.log(currentFormatDate);
return
currentFormatDate
;
return
currentFormatDate
;
},
},
//判断卸车是车是否到达了卸区
//判断卸车是车是否到达了卸区
...
...
src/views/MLargeScreen/index.vue
View file @
ef3e079d
...
@@ -263,7 +263,7 @@ export default {
...
@@ -263,7 +263,7 @@ export default {
vehiIdno
:
that
.
carnumber
vehiIdno
:
that
.
carnumber
}
}
}).
then
(
function
(
response2
)
{
}).
then
(
function
(
response2
)
{
if
(
response2
.
data
.
devices
.
length
!=
0
){
if
(
response2
.
data
.
result
==
0
&&
response2
.
data
.
devices
.
length
!=
0
){
that
.
devices
=
response2
.
data
.
devices
[
0
].
did
;
that
.
devices
=
response2
.
data
.
devices
[
0
].
did
;
}
}
})
})
...
...
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