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
ab348a32
Commit
ab348a32
authored
Sep 20, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
循环泵的音频波形图
parent
7b6a7ca5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
RecyclePumpHistoryPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
+10
-3
RecyclePumpNewDataPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
+9
-2
No files found.
src/views/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
View file @
ab348a32
...
@@ -57,6 +57,8 @@ function stopPlayAudioRegion() {
...
@@ -57,6 +57,8 @@ function stopPlayAudioRegion() {
}
}
/** 放大*/
/** 放大*/
function
zoom
(
zoomLevel
)
{
function
zoom
(
zoomLevel
)
{
loading
.
value
=
true
console
.
log
(
'111111'
)
let
region
=
Object
.
values
(
wavesurfer
.
value
.
regions
.
list
)[
0
];
let
region
=
Object
.
values
(
wavesurfer
.
value
.
regions
.
list
)[
0
];
if
(
region
)
{
if
(
region
)
{
const
start
=
region
.
start
;
// 区域开始时间
const
start
=
region
.
start
;
// 区域开始时间
...
@@ -65,9 +67,14 @@ function zoom(zoomLevel) {
...
@@ -65,9 +67,14 @@ function zoom(zoomLevel) {
// const zoomLevel = 400; // 设置放大级别(可以根据需求调整)
// const zoomLevel = 400; // 设置放大级别(可以根据需求调整)
// 加载后进行缩放
// 加载后进行缩放
setTimeout
(
function
()
{
wavesurfer
.
value
.
seekTo
(
start
/
wavesurfer
.
value
.
getDuration
());
// 移动到开始时间
wavesurfer
.
value
.
seekTo
(
start
/
wavesurfer
.
value
.
getDuration
());
// 移动到开始时间
wavesurfer
.
value
.
zoom
(
zoomLevel
);
// 设置缩放级别
wavesurfer
.
value
.
zoom
(
zoomLevel
);
// 设置缩放级别
loading
.
value
=
false
},
2000
)
// wavesurfer.value.play(); // 播放新的音频段
// wavesurfer.value.play(); // 播放新的音频段
}
}
}
}
/** 获取音频*/
/** 获取音频*/
...
@@ -352,7 +359,7 @@ defineExpose({
...
@@ -352,7 +359,7 @@ defineExpose({
<!-- <button @click="playAudio">获取音频</button>-->
<!-- <button @click="playAudio">获取音频</button>-->
<button
@
click=
"playAudioRegion"
>
播放区域
</button>
<button
@
click=
"playAudioRegion"
>
播放区域
</button>
<button
@
click=
"stopPlayAudioRegion"
>
暂停播放区域
</button>
<button
@
click=
"stopPlayAudioRegion"
>
暂停播放区域
</button>
<button
@
click=
"zoom(
4
00)"
>
放大
</button>
<button
@
click=
"zoom(
2
00)"
>
放大
</button>
<button
@
click=
"zoom(1)"
>
还原
</button>
<button
@
click=
"zoom(1)"
>
还原
</button>
<!-- <span>{{ selectedRow.audioUrl }}</span>-->
<!-- <span>{{ selectedRow.audioUrl }}</span>-->
</div>
</div>
...
...
src/views/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
View file @
ab348a32
...
@@ -61,6 +61,8 @@ function stopPlayAudioRegion() {
...
@@ -61,6 +61,8 @@ function stopPlayAudioRegion() {
}
}
/** 放大*/
/** 放大*/
function
zoom
(
zoomLevel
)
{
function
zoom
(
zoomLevel
)
{
loading
.
value
=
true
console
.
log
(
'111111'
)
let
region
=
Object
.
values
(
wavesurfer
.
value
.
regions
.
list
)[
0
];
let
region
=
Object
.
values
(
wavesurfer
.
value
.
regions
.
list
)[
0
];
if
(
region
)
{
if
(
region
)
{
const
start
=
region
.
start
;
// 区域开始时间
const
start
=
region
.
start
;
// 区域开始时间
...
@@ -69,9 +71,14 @@ function zoom(zoomLevel) {
...
@@ -69,9 +71,14 @@ function zoom(zoomLevel) {
// const zoomLevel = 400; // 设置放大级别(可以根据需求调整)
// const zoomLevel = 400; // 设置放大级别(可以根据需求调整)
// 加载后进行缩放
// 加载后进行缩放
setTimeout
(
function
()
{
wavesurfer
.
value
.
seekTo
(
start
/
wavesurfer
.
value
.
getDuration
());
// 移动到开始时间
wavesurfer
.
value
.
seekTo
(
start
/
wavesurfer
.
value
.
getDuration
());
// 移动到开始时间
wavesurfer
.
value
.
zoom
(
zoomLevel
);
// 设置缩放级别
wavesurfer
.
value
.
zoom
(
zoomLevel
);
// 设置缩放级别
loading
.
value
=
false
},
2000
)
// wavesurfer.value.play(); // 播放新的音频段
// wavesurfer.value.play(); // 播放新的音频段
}
}
}
}
/** 获取音频*/
/** 获取音频*/
...
...
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