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
7d1cde86
Commit
7d1cde86
authored
Nov 14, 2022
by
xxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改语音问题
parent
63efc794
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
11 deletions
+30
-11
yuyintishi.mp3
src/assets/yuyintishi.mp3
+0
-0
index.vue
src/views/MLargeScreen/components/voiceApplication/index.vue
+21
-10
index.vue
src/views/MLargeScreen/index.vue
+9
-1
No files found.
src/assets/yuyintishi.mp3
0 → 100644
View file @
7d1cde86
File added
src/views/MLargeScreen/components/voiceApplication/index.vue
View file @
7d1cde86
...
...
@@ -224,6 +224,14 @@ export default {
this
.
heartbeatTimer
=
setInterval
(()
=>
{
this
.
reconnect
();
},
10000
)
let
str1
=
localStorage
.
getItem
(
this
.
userName1
+
'
voiceData
'
);
if
(
!
str1
){
return
}
else
{
let
arr2
=
JSON
.
parse
(
str1
);
this
.
videoContentAllArray
=
arr2
;
this
.
$parent
.
audioDataFn
(
arr2
);
}
},
//关闭语音申请组件
voiceAppCloseFn
(){
...
...
@@ -272,20 +280,23 @@ export default {
},
//WebSocket数据接收
websocketonmessage
(
e
){
//
console.log('websocketonmessage',e);
console
.
log
(
'
websocketonmessage
'
,
e
);
let
that
=
this
;
if
(
e
==
undefined
){
let
str1
=
localStorage
.
getItem
(
this
.
userName1
+
'
voiceData
'
);
if
(
!
str1
){
return
}
else
{
let
arr2
=
JSON
.
parse
(
str1
);
that
.
videoContentAllArray
=
arr2
;
that
.
$parent
.
audioDataFn
(
arr2
);
}
//
let str1 = localStorage.getItem(this.userName1 + 'voiceData');
//
if(!str1){
//
return
//
}else{
//
let arr2 = JSON.parse(str1);
//
that.videoContentAllArray = arr2;
//
that.$parent.audioDataFn(arr2);
//
}
}
else
{
let
str1
=
localStorage
.
getItem
(
this
.
userName1
+
'
voiceData
'
);
let
str2
=
JSON
.
parse
(
e
.
data
);
if
(
str2
.
fromUserId
!=
this
.
userName1
){
that
.
$parent
.
tishishoudaoyuyinFn
();
}
if
(
!
str1
){
let
arr1
=
[];
arr1
.
unshift
(
str2
);
...
...
src/views/MLargeScreen/index.vue
View file @
7d1cde86
...
...
@@ -52,7 +52,7 @@
<personalCenter
ref=
"personalCenterMethod"
v-show=
"selectFunction == 6"
/>
<smallWindow
ref=
"smallWindowMethod"
v-show=
"selectFunction == 7"
/>
<!-- 语音播放 -->
<audio
controls
currentTime
autoplay
:src=
'indexSrcUrl'
style=
"display:none;"
></audio>
<audio
id=
"audioIndex"
controls
currentTime
autoplay
:src=
'indexSrcUrl'
style=
"display:none;"
></audio>
<!-- 语音提示区域 -->
<div
class=
"audioTishiView"
v-if=
"audioTishiViewShow"
>
<div
class=
"audioTishiView_son1"
>
...
...
@@ -111,6 +111,7 @@ import smallWindow from './components/smallWindow/index.vue' //小窗口车辆
import
mars3dViewerMap
from
'
../../components/mars3d/Map.vue
'
//地图
import
ElectricQuantity
from
'
../../components/electricity/index.vue
'
//电池组件
import
indexSituationPic1
from
'
../../assets/images/truckTuPian/tonghuazhong1.png
'
import
yuyintishi
from
'
@/assets/yuyintishi.mp3
'
export
default
{
...
...
@@ -716,6 +717,13 @@ export default {
indexListeningFn
(
item
){
this
.
$refs
.
voiceApplicationMethod
.
selectSituationIndex
(
item
);
},
//提示收到语音
tishishoudaoyuyinFn
(){
this
.
indexSrcUrl
=
yuyintishi
;
let
au
=
document
.
getElementById
(
'
audioIndex
'
);
au
.
currentTime
=
0
;
au
.
play
();
},
//返回语音url
fanhuiAudioUrl
(
url
){
this
.
indexSrcUrl
=
url
;
...
...
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