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
2b368ba9
Commit
2b368ba9
authored
Sep 18, 2024
by
liwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5157e779
4e11e431
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
RecyclePumpHistoryPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
+23
-0
No files found.
src/views/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
View file @
2b368ba9
...
...
@@ -4,6 +4,8 @@ import {getPipListHistoryData} from "../../../api/AIStation/PipelineTemp.js";
import
{
getAudio
,
getRecycleListAlarmData
,
getRecycleListHistoryData
}
from
"../../../api/AIStation/RecyclePump.js"
;
import
store
from
"../../../store/index.js"
;
import
WaveSurfer
from
'wavesurfer.js'
;
import
TimelinePlugin
from
'wavesurfer.js/dist/plugins/timeline'
;
import
RegionsPlugin
from
'wavesurfer.js/dist/plugins/regions'
;
const
RecyclePumpData
=
ref
([]);
const
params
=
ref
({})
const
options
=
ref
([])
...
...
@@ -44,8 +46,12 @@ function selectRow(row) {
const
audioPlayer
=
ref
(
null
);
const
waveform
=
ref
(
null
);
const
timeline
=
ref
(
null
);
const
wavesurfer
=
ref
(
null
);
function
playAudio
()
{
if
(
wavesurfer
.
value
)
{
wavesurfer
.
value
.
destroy
();
}
getAudio
().
then
(
async
res
=>
{
const
audioSrc
=
URL
.
createObjectURL
(
new
Blob
([
res
]));
audioPlayer
.
value
.
src
=
audioSrc
;
...
...
@@ -67,6 +73,21 @@ function playAudio() {
barWidth
:
2
,
responsive
:
true
,
normalize
:
true
,
plugins
:
[
RegionsPlugin
.
create
(),
TimelinePlugin
.
create
({
container
:
timeline
.
value
,
fontSize
:
14
,
//主要时间标签颜色
primaryColor
:
"#9191a5"
,
//主要时间文字颜色
primaryFontColor
:
"#9191a5"
,
//次要时间标签颜色
secondaryColor
:
"#9191a5"
,
//次要时间文字颜色
secondaryFontColor
:
"#9191a5"
,
})
]
});
// 使用 WaveSurfer 加载音频流
wavesurfer
.
value
.
load
(
audioObjectUrl
);
...
...
@@ -231,6 +252,8 @@ defineExpose({
</div>
<div
ref=
"waveform"
style=
"width: 800px; height: 150px;"
></div>
<!-- 时间轴容器 -->
<div
ref=
"timeline"
style=
"width: 100%; height: 30px;"
></div>
<div
class=
"details-item"
>
<span>
音频:
</span>
<audio
ref=
"audioPlayer"
controls
></audio>
...
...
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