Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
海康威视
web-project
Commits
cd387125
Commit
cd387125
authored
Dec 18, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大屏循环泵听诊模块修改
parent
9beb28fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
14 deletions
+59
-14
RecyclePump.js
src/api/AIStation/RecyclePump.js
+2
-2
screenDisplay.vue
src/components/screenDisplay.vue
+57
-12
No files found.
src/api/AIStation/RecyclePump.js
View file @
cd387125
...
@@ -30,6 +30,6 @@ export const exportRecyclePumpAlarmData = (item) => {
...
@@ -30,6 +30,6 @@ export const exportRecyclePumpAlarmData = (item) => {
// export const getAudio = () => {
// export const getAudio = () => {
// return httpTwo.get(`/busFireExtinguisher/test3`,'','',{responseType:'blob'})
// return httpTwo.get(`/busFireExtinguisher/test3`,'','',{responseType:'blob'})
// }
// }
export
const
getAudio
=
(
i
tem
)
=>
{
export
const
getAudio
=
(
i
d
)
=>
{
return
httpTwo
.
get
(
`/busFireExtinguisher/test4?audioUrl=
${
i
tem
}
`
,
''
,
''
,{
responseType
:
'blob'
})
return
httpTwo
.
get
(
`/busFireExtinguisher/test4?audioUrl=
${
i
d
}
`
,
''
,
''
,{
responseType
:
'blob'
})
}
}
src/components/screenDisplay.vue
View file @
cd387125
...
@@ -465,15 +465,20 @@ import AMapLoader from "@amap/amap-jsapi-loader";
...
@@ -465,15 +465,20 @@ import AMapLoader from "@amap/amap-jsapi-loader";
</div>
</div>
<!--
<div
class=
"noVideoData"
>
暂无监控信息......
</div>
-->
<!--
<div
class=
"noVideoData"
>
暂无监控信息......
</div>
-->
</div>
</div>
<div
class=
"thirdLeftLayer_one"
>
<div
v-loading=
"loading"
class=
"thirdLeftLayer_one"
>
<div
class=
"titleStyleTwo"
><p>
循环泵听诊
</p></div>
<div
class=
"title_row"
>
<div
v-loading=
"loading"
>
<div
class=
"titleStyleTwoVideo"
><p>
循环泵听诊
</p></div>
<div
class=
"moreInfo"
v-show=
"hasAudio"
@
click=
"PreviousAudio()"
>
上一个
</div>
<div
ref=
"waveform"
style=
"width: 800px; height: 149px;"
></div>
<div
class=
"moreInfo"
v-show=
"hasAudio"
@
click=
"nextAudio()"
>
下一个
</div>
<!--
<div
class=
"moreInfo"
v-show=
"hasVideo"
@
click=
"moreVideo()"
>
更多》
</div>
-->
</div>
<div>
<div
class=
"audio_title"
>
{{
audioTitle
}}
</div>
<div
ref=
"waveform"
style=
"width: 800px; height: 140px;"
></div>
<!-- 时间轴容器 -->
<!-- 时间轴容器 -->
<div
ref=
"timeline"
style=
"width: 100%; height:
30
px;"
></div>
<div
ref=
"timeline"
style=
"width: 100%; height:
25
px;"
></div>
</div>
</div>
<div
class=
"details-item"
>
<div
class=
"details-item"
v-if=
"showAudio === true"
>
<span>
音频:
</span>
<span>
音频:
</span>
<audio
ref=
"audioPlayer"
controls
></audio>
<audio
ref=
"audioPlayer"
controls
></audio>
<!--
<button
@
click=
"playAudio"
>
获取音频
</button>
-->
<!--
<button
@
click=
"playAudio"
>
获取音频
</button>
-->
...
@@ -762,6 +767,12 @@ export default defineComponent({
...
@@ -762,6 +767,12 @@ export default defineComponent({
audioStatus
:
false
,
audioStatus
:
false
,
wavesurfer
:
null
,
wavesurfer
:
null
,
loading
:
false
,
loading
:
false
,
audioNum
:
0
,
hasAudio
:
false
,
audioTitle
:
''
,
showAudio
:
false
,
AudioUrlIdList
:
[],
audioList
:
[],
mapBackPostion
:
[{
lan
:
"38.854713"
,
lon
:
"117.481685"
}],
mapBackPostion
:
[{
lan
:
"38.854713"
,
lon
:
"117.481685"
}],
fullscreenLoading
:
false
,
fullscreenLoading
:
false
,
};
};
...
@@ -3179,6 +3190,24 @@ export default defineComponent({
...
@@ -3179,6 +3190,24 @@ export default defineComponent({
this
.
queryParams
=
JSON
.
stringify
(
videoList
)
this
.
queryParams
=
JSON
.
stringify
(
videoList
)
this
.
videoLoading
=
true
this
.
videoLoading
=
true
},
},
// 下一个波形图
nextAudio
()
{
const
num
=
this
.
audioList
.
length
-
1
this
.
audioNum
+=
1
if
(
this
.
audioNum
>
num
)
{
this
.
audioNum
=
0
}
this
.
playAudio
(
this
.
AudioUrlIdList
[
this
.
audioNum
])
},
// 上一个波形图
PreviousAudio
()
{
const
num
=
this
.
audioList
.
length
-
1
this
.
audioNum
-=
1
if
(
this
.
audioNum
<
0
)
{
this
.
audioNum
=
num
-
1
}
this
.
playAudio
(
this
.
AudioUrlIdList
[
this
.
audioNum
])
},
// 上一个视频
// 上一个视频
PreviousVideo
()
{
PreviousVideo
()
{
const
num
=
this
.
VideoInfo
.
playVideoList
.
length
-
1
const
num
=
this
.
VideoInfo
.
playVideoList
.
length
-
1
...
@@ -3221,20 +3250,31 @@ export default defineComponent({
...
@@ -3221,20 +3250,31 @@ export default defineComponent({
},
},
// 查询循环泵听诊数据
// 查询循环泵听诊数据
queryAudioUrlList
()
{
queryAudioUrlList
()
{
this
.
loading
=
false
const
params
=
{
const
params
=
{
stationId
:
this
.
markerThree
.
stationId
stationId
:
this
.
markerThree
.
stationId
}
}
queryAudioUrlListApi
(
params
).
then
(
res
=>
{
queryAudioUrlListApi
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
200
&&
res
.
data
.
length
>
0
){
if
(
res
.
code
===
200
&&
res
.
data
.
length
>
0
){
this
.
showAudio
=
true
this
.
audioList
=
res
.
data
this
.
AudioUrlIdList
=
res
.
data
.
map
(
item
=>
item
.
businessId
)
this
.
AudioUrlIdList
=
res
.
data
.
map
(
item
=>
item
.
businessId
)
this
.
playAudio
(
this
.
AudioUrlIdList
[
0
])
// 判断是否显示上一个,下一个按钮
if
(
this
.
AudioUrlIdList
.
length
>
1
){
this
.
hasAudio
=
true
}
else
{
this
.
hasAudio
=
false
}
this
.
playAudio
(
this
.
AudioUrlIdList
[
this
.
audioNum
])
}
else
{
this
.
showAudio
=
false
}
}
})
})
},
},
/** 获取音频*/
/** 获取音频*/
playAudio
(
i
tem
)
{
playAudio
(
i
d
)
{
if
(
this
.
audioStatus
!==
false
){
if
(
this
.
audioStatus
!==
false
){
console
.
log
(
"当前播放的音频zt"
,
this
.
audioStatus
)
console
.
log
(
"当前播放的音频zt"
,
this
.
audioStatus
)
console
.
log
(
"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
)
console
.
log
(
"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
)
...
@@ -3247,7 +3287,8 @@ export default defineComponent({
...
@@ -3247,7 +3287,8 @@ export default defineComponent({
if
(
this
.
wavesurfer
)
{
if
(
this
.
wavesurfer
)
{
this
.
wavesurfer
.
destroy
();
this
.
wavesurfer
.
destroy
();
}
}
getAudio
(
item
).
then
(
async
res
=>
{
getAudio
(
id
).
then
(
async
res
=>
{
this
.
audioTitle
=
this
.
audioList
.
find
(
item
=>
item
.
businessId
===
id
).
deviceName
const
audioSrc
=
URL
.
createObjectURL
(
new
Blob
([
res
]));
const
audioSrc
=
URL
.
createObjectURL
(
new
Blob
([
res
]));
// 播放器和波形图赋值
// 播放器和波形图赋值
this
.
$refs
.
audioPlayer
.
src
=
audioSrc
;
this
.
$refs
.
audioPlayer
.
src
=
audioSrc
;
...
@@ -3302,7 +3343,7 @@ export default defineComponent({
...
@@ -3302,7 +3343,7 @@ export default defineComponent({
});
});
// 使用 WaveSurfer 加载音频流
// 使用 WaveSurfer 加载音频流
this
.
wavesurfer
.
load
(
audioSrc
);
this
.
wavesurfer
.
load
(
audioSrc
);
this
.
loading
=
false
this
.
loading
=
false
this
.
audioStatus
=
false
this
.
audioStatus
=
false
})
})
},
},
...
@@ -4212,11 +4253,15 @@ export default defineComponent({
...
@@ -4212,11 +4253,15 @@ export default defineComponent({
});
});
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.audio_title
{
color
:
white
;
font-size
:
17px
;
font-weight
:
bold
;
}
.details-item
{
.details-item
{
width
:
600px
;
width
:
600px
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
20px
;
font-size
:
16px
;
font-size
:
16px
;
}
}
.carousel_content
{
.carousel_content
{
...
...
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