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
9a74bf10
Commit
9a74bf10
authored
Nov 15, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接受语音排序以及定位方法修改
parent
7eafe20a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
65 deletions
+73
-65
index.vue
src/views/MLargeScreen/components/voiceApplication/index.vue
+19
-3
index.vue
src/views/MLargeScreen/index.vue
+54
-62
No files found.
src/views/MLargeScreen/components/voiceApplication/index.vue
View file @
9a74bf10
...
@@ -306,9 +306,25 @@ export default {
...
@@ -306,9 +306,25 @@ export default {
}
else
{
}
else
{
let
arr2
=
JSON
.
parse
(
str1
);
let
arr2
=
JSON
.
parse
(
str1
);
arr2
.
unshift
(
str2
);
arr2
.
unshift
(
str2
);
that
.
videoContentAllArray
=
arr2
;
let
jinjitongzhi
=
[];
that
.
$parent
.
audioDataFn
(
arr2
);
let
guangbo
=
[];
localStorage
.
setItem
(
this
.
userName1
+
'
voiceData
'
,
JSON
.
stringify
(
arr2
));
let
tonghua
=
[];
let
qitache
=
[];
arr2
.
forEach
((
item2
,
indedx2
)
=>
{
if
(
item2
.
fromUserId
==
'
紧急通知
'
){
jinjitongzhi
.
push
(
item2
);
}
else
if
(
item2
.
fromUserId
==
'
广播
'
){
guangbo
.
push
(
item2
);
}
else
if
(
item2
.
fromUserId
==
'
通话
'
){
tonghua
.
push
(
item2
);
}
else
{
qitache
.
push
(
item2
);
}
})
let
lastAudioData
=
[...
jinjitongzhi
,...
guangbo
,...
tonghua
,...
qitache
];
that
.
videoContentAllArray
=
lastAudioData
;
that
.
$parent
.
audioDataFn
(
lastAudioData
);
localStorage
.
setItem
(
this
.
userName1
+
'
voiceData
'
,
JSON
.
stringify
(
lastAudioData
));
}
}
}
}
},
},
...
...
src/views/MLargeScreen/index.vue
View file @
9a74bf10
...
@@ -179,11 +179,11 @@ export default {
...
@@ -179,11 +179,11 @@ export default {
this
.
zongTimer1
=
setInterval
(()
=>
{
this
.
zongTimer1
=
setInterval
(()
=>
{
this
.
setNowTimes
();
this
.
setNowTimes
();
},
1000
)
},
1000
)
this
.
zongTimer3
=
setInterval
(()
=>
{
//
this.zongTimer3 = setInterval(() => {
if
(
this
.
equipmentName
){
//
if(this.equipmentName){
this
.
getCarLoaction
();
//
this.getCarLoaction();
}
//
}
},
2000
)
//
}, 2000)
this
.
zongTimer2
=
setInterval
(()
=>
{
this
.
zongTimer2
=
setInterval
(()
=>
{
if
(
this
.
carnumber
==
''
){
if
(
this
.
carnumber
==
''
){
return
return
...
@@ -192,7 +192,7 @@ export default {
...
@@ -192,7 +192,7 @@ export default {
if
(
this
.
carclass
==
'
铲车
'
){
if
(
this
.
carclass
==
'
铲车
'
){
this
.
loadData1
();
this
.
loadData1
();
}
}
//获取报警记录
以及摄像头报警数据
//获取报警记录
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res
)
=>
{
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
if
(
res
.
data
.
totalElements
==
0
){
if
(
res
.
data
.
totalElements
==
0
){
...
@@ -222,38 +222,6 @@ export default {
...
@@ -222,38 +222,6 @@ export default {
});
});
}
}
});
});
//获取摄像头报警数据
// if(that.devices != ''){
// axios.get('/jiankong/StandardApiAction_vehicleAlarm.action', {
// params: {
// jsession:that.jsession,
// DevIDNO:that.devices
// }
// }).then(function (response) {
// if(response.data.alarmlist.length != 0){
// that.$nextTick(()=>{
// that.$notify({
// title:
// response.data.alarmlist[0].type == 620 ? "接打电话报警" :
// response.data.alarmlist[0].type == 621 ? '接打电话报警' :
// response.data.alarmlist[0].type == 624 ? '分神驾驶报警' :
// response.data.alarmlist[0].type == 625 ? '分神驾驶报警' :
// response.data.alarmlist[0].type == 600 ? '前向碰撞报警' :
// response.data.alarmlist[0].type == 601 ? '前向碰撞报警' :
// response.data.alarmlist[0].type == 172 ? '疲劳驾驶报警' :
// response.data.alarmlist[0].type == 190 ? '疲劳驾驶报警' :
// response.data.alarmlist[0].type == 430 ? '接近报警' :
// response.data.alarmlist[0].type == 431 ? '接近报警' :
// response.data.alarmlist[0].type == 432 ? '接近报警' :
// response.data.alarmlist[0].type == 433 ? '接近报警' : '',
// type: 'warning',
// duration: 5000,
// dangerouslyUseHTMLString: true,
// });
// })
// }
// })
// }
}
}
}
}
});
});
...
@@ -274,28 +242,6 @@ export default {
...
@@ -274,28 +242,6 @@ export default {
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
this
.
personalName
=
res
.
data
.
content
[
0
].
name
;
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
this
.
$refs
.
startOrderReceivingMethod
.
loadData
(
this
.
carnumber
);
this
.
$refs
.
voiceApplicationMethod
.
loadData3
(
this
.
carnumber
);
this
.
$refs
.
voiceApplicationMethod
.
loadData3
(
this
.
carnumber
);
//获取摄像头会话号
// axios.get('/jiankong/StandardApiAction_login.action', {
// params: {
// account:'admin',
// password:'admin'
// }
// }).then(function (response1) {
// that.jsession = response1.data.jsession;
// if(that.jsession != '' && that.carnumber != ''){
// //获取摄像头车辆设备号
// axios.get('/jiankong/StandardApiAction_getDeviceByVehicle.action', {
// params: {
// jsession:that.jsession,
// vehiIdno:that.carnumber
// }
// }).then(function (response2) {
// if(response2.data.result == 0 && response2.data.devices.length != 0){
// that.devices = response2.data.devices[0].did;
// }
// })
// }
// })
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res1
)
=>
{
httpGet
(
vehicleInformationQuery
,{
number
:
this
.
carnumber
}).
then
((
res1
)
=>
{
if
(
res1
.
code
==
200
){
if
(
res1
.
code
==
200
){
if
(
res1
.
data
.
totalElements
==
0
){
if
(
res1
.
data
.
totalElements
==
0
){
...
@@ -309,6 +255,10 @@ export default {
...
@@ -309,6 +255,10 @@ export default {
this
.
systemTitle
=
'
卡车调度系统铲车终端
'
;
this
.
systemTitle
=
'
卡车调度系统铲车终端
'
;
}
}
this
.
equipmentName
=
res1
.
data
.
content
[
0
].
equipmentName
;
this
.
equipmentName
=
res1
.
data
.
content
[
0
].
equipmentName
;
//执行获取位置
if
(
this
.
equipmentName
){
this
.
getCarLoaction1
();
}
}
}
}
}
});
});
...
@@ -366,13 +316,13 @@ export default {
...
@@ -366,13 +316,13 @@ export default {
let
LoaObj1xy
=
{};
let
LoaObj1xy
=
{};
//判断该车是否在行驶状态
//判断该车是否在行驶状态
let
drivingDistance
=
that
.
getDistanceIndex
(
that
.
navigatorXY
.
y
,
that
.
navigatorXY
.
x
,
position
.
coords
.
latitude
,
position
.
coords
.
longitude
);
let
drivingDistance
=
that
.
getDistanceIndex
(
that
.
navigatorXY
.
y
,
that
.
navigatorXY
.
x
,
position
.
coords
.
latitude
,
position
.
coords
.
longitude
);
console
.
log
(
drivingDistance
);
//
console.log(drivingDistance);
if
(
drivingDistance
<=
1
){
if
(
drivingDistance
<=
1
){
that
.
leftBtnDisable
=
true
;
that
.
leftBtnDisable
=
true
;
}
else
{
}
else
{
that
.
leftBtnDisable
=
false
;
that
.
leftBtnDisable
=
false
;
}
}
if
(
drivingDistance
>
3
00
&&
drivingDistance
<
10000
){
if
(
drivingDistance
>
10
00
&&
drivingDistance
<
10000
){
LoaObj1xy
.
x
=
that
.
navigatorXY
.
x
;
LoaObj1xy
.
x
=
that
.
navigatorXY
.
x
;
LoaObj1xy
.
y
=
that
.
navigatorXY
.
y
;
LoaObj1xy
.
y
=
that
.
navigatorXY
.
y
;
LoaObj1
.
gndRate
=
''
;
LoaObj1
.
gndRate
=
''
;
...
@@ -408,6 +358,48 @@ export default {
...
@@ -408,6 +358,48 @@ export default {
enableHighAccuracy
:
true
,
enableHighAccuracy
:
true
,
}
}
);
);
}
},
//获取该车位置并上传到后端
getCarLoaction1
(){
let
that
=
this
;
if
(
navigator
.
geolocation
)
{
navigator
.
geolocation
.
watchPosition
(
//locationSuccess 获取成功的话
function
(
position
)
{
let
LoaObj1
=
{};
let
LoaObj1xy
=
{};
//判断该车是否在行驶状态
let
drivingDistance
=
that
.
getDistanceIndex
(
that
.
navigatorXY
.
y
,
that
.
navigatorXY
.
x
,
position
.
coords
.
latitude
,
position
.
coords
.
longitude
);
console
.
log
(
drivingDistance
);
if
(
drivingDistance
<=
50
||
drivingDistance
>=
10000
){
that
.
leftBtnDisable
=
true
;
}
else
{
that
.
leftBtnDisable
=
false
;
}
LoaObj1xy
.
x
=
position
.
coords
.
longitude
;
LoaObj1xy
.
y
=
position
.
coords
.
latitude
;
that
.
navigatorXY
.
x
=
position
.
coords
.
longitude
;
that
.
navigatorXY
.
y
=
position
.
coords
.
latitude
;
LoaObj1
.
gndRate
=
''
;
LoaObj1
.
location
=
LoaObj1xy
;
LoaObj1
.
name
=
that
.
equipmentName
;
LoaObj1
.
time
=
new
Date
().
getTime
();
let
zuizhong1
=
{};
zuizhong1
.
name
=
that
.
equipmentName
;
zuizhong1
.
jsonObject
=
JSON
.
stringify
(
LoaObj1
);
httpPostForJson
(
gpsPhoneGpsQuery
,
zuizhong1
).
then
((
res1
)
=>
{})
httpPostForJson
(
carRealTimeLocationQuery2
,
JSON
.
stringify
(
LoaObj1
)).
then
((
res2
)
=>
{})
},
//locationError 获取失败的话
function
(
error
)
{
var
errorType
=
[
'
您拒绝共享位置信息
'
,
'
获取不到位置信息
'
,
'
获取位置信息超时
'
];
console
.
log
(
errorType
[
error
.
code
-
1
]);
},{
enableHighAccuracy
:
true
,
maximumAge
:
2000
,
}
);
}
}
},
},
//接受派单
//接受派单
...
...
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