Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
digitalPerson-fe
Project
Project
Details
Activity
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
digitalPerson
digitalPerson-fe
Commits
22ef7d9e
Commit
22ef7d9e
authored
Sep 30, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
Beta See merge request
!7
parents
4be8038b
a01e78c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
digital-audio-card.vue
...dialogue-detail/components/digital/digital-audio-card.vue
+7
-8
digital-audio.vue
...iews/dialogue-detail/components/digital/digital-audio.vue
+18
-1
draft.vue
src/views/draft/draft.vue
+1
-0
video-work-list.vue
src/views/video-work/video-work-list.vue
+1
-0
No files found.
src/views/dialogue-detail/components/digital/digital-audio-card.vue
View file @
22ef7d9e
<
script
setup
lang=
"ts"
>
import
{
computed
,
ref
}
from
'vue'
import
{
computed
}
from
'vue'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
{
DigitalHumanDialogueTimbreItem
}
from
'../../dialogue-type'
import
{
useDigitalHumanDialogueStore
}
from
'@/store/modules/digital-human-dialogue'
...
...
@@ -12,6 +12,7 @@ interface Props {
interface
Emits
{
(
e
:
'click'
,
value
:
string
):
void
(
e
:
'toggle'
,
value
:
boolean
):
void
(
e
:
'play'
,
value
:
string
):
void
}
defineProps
<
Props
>
()
...
...
@@ -19,13 +20,8 @@ defineProps<Props>()
const
emit
=
defineEmits
<
Emits
>
()
const
digitalHumanDialogueStore
=
useDigitalHumanDialogueStore
()
const
digitalAudio
=
ref
<
HTMLAudioElement
>
()
const
timebreId
=
computed
(()
=>
digitalHumanDialogueStore
.
humanInfo
.
timebreId
)
function
playAudio
()
{
digitalAudio
.
value
?.
play
()
}
</
script
>
<
template
>
...
...
@@ -40,7 +36,11 @@ function playAudio() {
<div
class=
"flex-1 overflow-hidden"
>
<div
class=
"mb-2 flex items-center gap-2"
>
<div
class=
"max-w-32 truncate"
>
{{
dialogueTimbreItem
?.
name
}}
</div>
<CustomIcon
class=
"cursor-pointer text-lg"
icon=
"mingcute:volume-line"
@
click
.
stop
.
prevent=
"playAudio"
/>
<CustomIcon
class=
"cursor-pointer text-lg"
icon=
"mingcute:volume-line"
@
click
.
stop
.
prevent=
"emit('play', dialogueTimbreItem!.audioUrl)"
/>
</div>
<NScrollbar
x-scrollable
>
<div
class=
"flex gap-2"
>
...
...
@@ -52,5 +52,4 @@ function playAudio() {
<CustomIcon
class=
"cursor-pointer text-lg"
icon=
"ant-design:swap-outlined"
@
click=
"emit('toggle', true)"
/>
</div>
</div>
<audio
ref=
"digitalAudio"
:src=
"dialogueTimbreItem?.audioUrl"
></audio>
</
template
>
src/views/dialogue-detail/components/digital/digital-audio.vue
View file @
22ef7d9e
...
...
@@ -27,6 +27,8 @@ const digitalTimbreMaleList = ref<DigitalHumanDialogueTimbreItem[]>([])
const
showAll
=
ref
(
false
)
const
searchName
=
ref
(
''
)
const
digitalAudioRef
=
ref
<
HTMLAudioElement
>
()
const
speed
=
computed
({
get
()
{
return
digitalHumanDialogueStore
.
humanInfo
.
speed
...
...
@@ -74,6 +76,7 @@ async function getDigitalTimbreList() {
function
handleUpdateAudioType
(
audioType
:
string
)
{
digitalHumanDialogueStore
.
humanInfo
.
timebreId
=
audioType
===
'mandarin'
?
'5132'
:
''
digitalAudioRef
.
value
?.
pause
()
}
async
function
handleSearch
(
value
:
string
)
{
...
...
@@ -88,6 +91,12 @@ async function handleSearch(value: string) {
function
handleClickAudioCard
(
timbreId
:
string
)
{
digitalHumanDialogueStore
.
setTimbreId
(
timbreId
)
}
function
handlePlayDigitalAudio
(
audioUrl
:
string
)
{
digitalAudioRef
.
value
?.
pause
()
digitalAudioRef
.
value
!
.
src
=
audioUrl
digitalAudioRef
.
value
?.
play
()
}
</
script
>
<
template
>
...
...
@@ -104,7 +113,12 @@ function handleClickAudioCard(timbreId: string) {
</div>
<div
v-show=
"isMandarinAudioType"
>
<DigitalAudioCard
:dialogue-timbre-item=
"digitalTimbreValue"
:show-toggle=
"true"
@
toggle=
"showAll = true"
/>
<DigitalAudioCard
:dialogue-timbre-item=
"digitalTimbreValue"
:show-toggle=
"true"
@
toggle=
"showAll = true"
@
play=
"handlePlayDigitalAudio"
/>
</div>
<div
class=
"mt-4 text-lg"
>
聲音
</div>
...
...
@@ -145,7 +159,10 @@ function handleClickAudioCard(timbreId: string) {
:key=
"index"
:dialogue-timbre-item=
"timbre"
@
click=
"handleClickAudioCard"
@
play=
"handlePlayDigitalAudio"
/>
</NScrollbar>
</div>
<audio
ref=
"digitalAudioRef"
/>
</template>
src/views/draft/draft.vue
View file @
22ef7d9e
...
...
@@ -241,6 +241,7 @@ function handleGetDraftListUpdatePageSize(pageSize: number) {
:data=
"audioDraftList"
:max-height=
"tableContentY"
:scroll-x=
"1086"
:checked-row-keys=
"checkedDraftIdList"
@
update:checked-row-keys=
"handleUpdateCheckedDraftList"
>
<template
#
empty
>
...
...
src/views/video-work/video-work-list.vue
View file @
22ef7d9e
...
...
@@ -248,6 +248,7 @@ function handleGetTaskListUpdatePageSize(pageSize: number) {
:row-key=
"(row: VideoWorkItem) => row.id"
:max-height=
"tableContentY"
:scroll-x=
"1086"
:checked-row-keys=
"checkedVideoWorkIds"
@
update:checked-row-keys=
"handleUpdateCheckedVideoWorkIds"
>
<template
#
empty
>
...
...
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