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
7eeb7f35
Commit
7eeb7f35
authored
Sep 20, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
循环泵的音频波形图
parent
ab348a32
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
14 deletions
+27
-14
RecyclePumpHistoryPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
+5
-3
RecyclePumpNewDataPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
+11
-8
index.vue
src/views/AIStation/RecyclePumpPage/index.vue
+11
-3
No files found.
src/views/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
View file @
7eeb7f35
...
@@ -40,6 +40,7 @@ function selectRow(row) {
...
@@ -40,6 +40,7 @@ function selectRow(row) {
const
index
=
RecyclePumpData
.
value
.
indexOf
(
row
)
const
index
=
RecyclePumpData
.
value
.
indexOf
(
row
)
selectedRow
.
value
=
row
;
selectedRow
.
value
=
row
;
selectedRowIndex
.
value
=
index
;
selectedRowIndex
.
value
=
index
;
// playAudio()
}
}
const
audioPlayer
=
ref
(
null
);
const
audioPlayer
=
ref
(
null
);
...
@@ -142,7 +143,6 @@ function playAudio() {
...
@@ -142,7 +143,6 @@ function playAudio() {
loading
.
value
=
false
loading
.
value
=
false
})
})
}
}
playAudio
()
// 初始化时选中第一行
// 初始化时选中第一行
watch
(
watch
(
()
=>
RecyclePumpData
.
value
,
()
=>
RecyclePumpData
.
value
,
...
@@ -172,8 +172,9 @@ watch(
...
@@ -172,8 +172,9 @@ watch(
}
}
)
)
getData
()
//
getData()
function
getData
()
{
function
getData
()
{
console
.
log
(
'历史datadata'
)
const
item
=
reactive
({
const
item
=
reactive
({
page
:
Page
.
page
,
page
:
Page
.
page
,
size
:
Page
.
rows
,
size
:
Page
.
rows
,
...
@@ -274,7 +275,8 @@ const handleSortChange = (data) => {
...
@@ -274,7 +275,8 @@ const handleSortChange = (data) => {
};
};
defineExpose
({
defineExpose
({
getData
getData
,
playAudio
});
});
</
script
>
</
script
>
...
...
src/views/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
View file @
7eeb7f35
...
@@ -44,6 +44,8 @@ function selectRow(row) {
...
@@ -44,6 +44,8 @@ function selectRow(row) {
const
index
=
RecyclePumpData
.
value
.
indexOf
(
row
)
const
index
=
RecyclePumpData
.
value
.
indexOf
(
row
)
selectedRow
.
value
=
row
;
selectedRow
.
value
=
row
;
selectedRowIndex
.
value
=
index
;
selectedRowIndex
.
value
=
index
;
console
.
log
(
'aaaaaaaaaaaaaaaaaa'
)
// playAudio()
}
}
const
audioPlayer
=
ref
(
null
);
const
audioPlayer
=
ref
(
null
);
...
@@ -85,6 +87,7 @@ function zoom(zoomLevel) {
...
@@ -85,6 +87,7 @@ function zoom(zoomLevel) {
function
playAudio
()
{
function
playAudio
()
{
loading
.
value
=
true
loading
.
value
=
true
// 如果有波形图,则摧毁现有波形图,渲染新的波形图
// 如果有波形图,则摧毁现有波形图,渲染新的波形图
console
.
log
(
'wavesurfer.value'
,
wavesurfer
.
value
)
if
(
wavesurfer
.
value
)
{
if
(
wavesurfer
.
value
)
{
wavesurfer
.
value
.
destroy
();
wavesurfer
.
value
.
destroy
();
}
}
...
@@ -147,9 +150,6 @@ function playAudio() {
...
@@ -147,9 +150,6 @@ function playAudio() {
})
})
}
}
playAudio
()
// 初始化时选中第一行
// 初始化时选中第一行
watch
(
watch
(
()
=>
RecyclePumpData
.
value
,
()
=>
RecyclePumpData
.
value
,
...
@@ -179,11 +179,13 @@ watch(
...
@@ -179,11 +179,13 @@ watch(
}
}
)
)
// if(localStorage.getItem('AIToken')){
// getData()
// getData()
if
(
localStorage
.
getItem
(
'AIToken'
)){
// playAudio()
getData
()
// }
}
function
getData
(){
function
getData
(){
console
.
log
(
'getData'
)
const
item
=
reactive
({
const
item
=
reactive
({
page
:
Page
.
page
,
page
:
Page
.
page
,
size
:
Page
.
rows
,
size
:
Page
.
rows
,
...
@@ -285,7 +287,8 @@ const handleSortChange = (data) => {
...
@@ -285,7 +287,8 @@ const handleSortChange = (data) => {
};
};
defineExpose
({
defineExpose
({
getData
getData
,
playAudio
});
});
</
script
>
</
script
>
...
...
src/views/AIStation/RecyclePumpPage/index.vue
View file @
7eeb7f35
...
@@ -40,8 +40,11 @@ const handleTabClick = (tab, event) => {
...
@@ -40,8 +40,11 @@ const handleTabClick = (tab, event) => {
if
(
selectedItem
)
{
if
(
selectedItem
)
{
selectedComponent
.
value
=
selectedItem
.
component
;
selectedComponent
.
value
=
selectedItem
.
component
;
selectedBtn
.
value
=
selectedItem
.
id
;
selectedBtn
.
value
=
selectedItem
.
id
;
setTimeout
(
function
()
{
resetSearch
();
resetSearch
();
search
()
search
()
playAudio
()
},
1000
)
}
}
};
};
...
@@ -199,6 +202,11 @@ const getData = () => {
...
@@ -199,6 +202,11 @@ const getData = () => {
childComponentRef
.
value
.
getData
();
// 调用子组件的 getData 方法
childComponentRef
.
value
.
getData
();
// 调用子组件的 getData 方法
}
}
};
};
const
playAudio
=
()
=>
{
if
(
childComponentRef
.
value
&&
childComponentRef
.
value
.
playAudio
)
{
childComponentRef
.
value
.
playAudio
();
// 调用子组件的 playAudio 方法
}
};
const
route
=
useRoute
()
const
route
=
useRoute
()
watch
(
watch
(
()
=>
route
.
path
,
// 只监听路径变化
()
=>
route
.
path
,
// 只监听路径变化
...
@@ -214,6 +222,7 @@ watch(
...
@@ -214,6 +222,7 @@ watch(
if
(
localStorage
.
getItem
(
'AIToken'
))
{
if
(
localStorage
.
getItem
(
'AIToken'
))
{
clearInterval
(
checkAIToken
);
// 停止轮询
clearInterval
(
checkAIToken
);
// 停止轮询
getNumber
();
getNumber
();
playAudio
();
// getData();
// getData();
resetSearch
()
resetSearch
()
}
}
...
@@ -287,7 +296,6 @@ function getSupplys() {
...
@@ -287,7 +296,6 @@ function getSupplys() {
}
}
getSupplys
();
getSupplys
();
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"app-content"
>
<div
class=
"app-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