|
@@ -204,7 +204,7 @@
|
|
|
@click="generateMedia(sectionIndex)"
|
|
@click="generateMedia(sectionIndex)"
|
|
|
class="generate-btn"
|
|
class="generate-btn"
|
|
|
>
|
|
>
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
section.backgroundImage.generating
|
|
section.backgroundImage.generating
|
|
|
? '生成中...'
|
|
? '生成中...'
|
|
|
: section.backgroundImage.url
|
|
: section.backgroundImage.url
|
|
@@ -252,7 +252,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 视频背景 -->
|
|
<!-- 视频背景 -->
|
|
|
<template v-else-if="section.backgroundType === 'video'">
|
|
<template v-else-if="section.backgroundType === 'video'">
|
|
|
<div class="media-item">
|
|
<div class="media-item">
|
|
@@ -275,7 +275,7 @@
|
|
|
@click="generateVideo(sectionIndex)"
|
|
@click="generateVideo(sectionIndex)"
|
|
|
class="generate-btn"
|
|
class="generate-btn"
|
|
|
>
|
|
>
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
section.backgroundVideo.generating
|
|
section.backgroundVideo.generating
|
|
|
? '生成中...'
|
|
? '生成中...'
|
|
|
: section.backgroundVideo.url
|
|
: section.backgroundVideo.url
|
|
@@ -300,7 +300,7 @@
|
|
|
>
|
|
>
|
|
|
<div class="dialogue-header">
|
|
<div class="dialogue-header">
|
|
|
<div class="dialogue-type-tag" :class="dialogue.type">
|
|
<div class="dialogue-type-tag" :class="dialogue.type">
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
dialogue.type === 'digital'
|
|
dialogue.type === 'digital'
|
|
|
? '数字人'
|
|
? '数字人'
|
|
|
: dialogue.type === 'user'
|
|
: dialogue.type === 'user'
|
|
@@ -309,7 +309,9 @@
|
|
|
? '提问'
|
|
? '提问'
|
|
|
: dialogue.type === 'poem'
|
|
: dialogue.type === 'poem'
|
|
|
? '诗词'
|
|
? '诗词'
|
|
|
- : '视频'
|
|
|
|
|
|
|
+ : dialogue.type === 'poem_reading'
|
|
|
|
|
+ ? '朗诵评价'
|
|
|
|
|
+ : '视频'
|
|
|
}}
|
|
}}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -632,7 +634,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<!-- 视频 -->
|
|
<!-- 视频 -->
|
|
|
<template v-else-if="dialogue.type === 'video'">
|
|
<template v-else-if="dialogue.type === 'video'">
|
|
|
<div class="media-input-group" style="display: flex; align-items: center; justify-content: center;">
|
|
<div class="media-input-group" style="display: flex; align-items: center; justify-content: center;">
|
|
@@ -656,7 +658,7 @@
|
|
|
class="generate-btn"
|
|
class="generate-btn"
|
|
|
style="margin-right: 10px;"
|
|
style="margin-right: 10px;"
|
|
|
>
|
|
>
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
dialogue.generatingVideo
|
|
dialogue.generatingVideo
|
|
|
? '生成中...'
|
|
? '生成中...'
|
|
|
: dialogue.videoUrl
|
|
: dialogue.videoUrl
|
|
@@ -673,6 +675,43 @@
|
|
|
>×</button>
|
|
>×</button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 朗诵评价 -->
|
|
|
|
|
+ <template v-else-if="dialogue.type === 'poem_reading'">
|
|
|
|
|
+ <div class="dialogue-role-select">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="dialogue.roleName"
|
|
|
|
|
+ placeholder="选择角色"
|
|
|
|
|
+ style="width: 140px"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="role in digitalHumans"
|
|
|
|
|
+ :key="role.id"
|
|
|
|
|
+ :label="role.name"
|
|
|
|
|
+ :value="role.name"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="dialogue-content-container">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="dialogue.content"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ class="dialogue-content"
|
|
|
|
|
+ placeholder="朗诵评价内容..."
|
|
|
|
|
+ :autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="action-buttons">
|
|
|
|
|
+ <div class="action-buttons-row">
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="remove-btn"
|
|
|
|
|
+ @click="removeDialogue(sectionIndex, dialogueIndex)"
|
|
|
|
|
+ >×</button
|
|
|
|
|
+ >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -695,6 +734,10 @@
|
|
|
>+ 添加视频</button
|
|
>+ 添加视频</button
|
|
|
>
|
|
>
|
|
|
|
|
|
|
|
|
|
+ <button class="add-dialogue-btn poem_reading" @click="addPoemReadingDialogue(sectionIndex)"
|
|
|
|
|
+ >+ 添加朗诵评价</button
|
|
|
|
|
+ >
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -786,7 +829,7 @@
|
|
|
<div class="dialogue-header">
|
|
<div class="dialogue-header">
|
|
|
<div class="dialogue-header-left">
|
|
<div class="dialogue-header-left">
|
|
|
<div class="dialogue-type-tag" :class="dialogue.type">
|
|
<div class="dialogue-type-tag" :class="dialogue.type">
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
dialogue.type === 'digital'
|
|
dialogue.type === 'digital'
|
|
|
? '数字人'
|
|
? '数字人'
|
|
|
: dialogue.type === 'user'
|
|
: dialogue.type === 'user'
|
|
@@ -795,11 +838,13 @@
|
|
|
? '提问'
|
|
? '提问'
|
|
|
: dialogue.type === 'poem'
|
|
: dialogue.type === 'poem'
|
|
|
? '诗词'
|
|
? '诗词'
|
|
|
- : '视频'
|
|
|
|
|
|
|
+ : dialogue.type === 'poem_reading'
|
|
|
|
|
+ ? '朗诵评价'
|
|
|
|
|
+ : '视频'
|
|
|
}}
|
|
}}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="dialogue-role">
|
|
<div class="dialogue-role">
|
|
|
- {{
|
|
|
|
|
|
|
+ {{
|
|
|
dialogue.type !== 'user' && dialogue.type !== 'video'
|
|
dialogue.type !== 'user' && dialogue.type !== 'video'
|
|
|
? getRoleName(dialogue.roleName)
|
|
? getRoleName(dialogue.roleName)
|
|
|
: dialogue.type === 'video' ? '视频' : '用户'
|
|
: dialogue.type === 'video' ? '视频' : '用户'
|
|
@@ -1576,6 +1621,15 @@ const addPoemDialogue = (sectionIndex) => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 步骤2:添加朗诵评价
|
|
|
|
|
+const addPoemReadingDialogue = (sectionIndex) => {
|
|
|
|
|
+ scriptData.sections[sectionIndex].dialogues.push({
|
|
|
|
|
+ type: 'poem_reading',
|
|
|
|
|
+ content: '',
|
|
|
|
|
+ roleName: '',
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 步骤2:添加提问与用户回复
|
|
// 步骤2:添加提问与用户回复
|
|
|
const addQuestWithUserReply = (sectionIndex) => {
|
|
const addQuestWithUserReply = (sectionIndex) => {
|
|
|
// 添加提问类型对话
|
|
// 添加提问类型对话
|
|
@@ -2079,12 +2133,12 @@ const validateScript = () => {
|
|
|
|
|
|
|
|
// 检查对话
|
|
// 检查对话
|
|
|
section.dialogues.forEach((dialogue, dialogueIndex) => {
|
|
section.dialogues.forEach((dialogue, dialogueIndex) => {
|
|
|
- // 检查数字人、提问和诗词类型的对话
|
|
|
|
|
- if (dialogue.type === 'digital' || dialogue.type === 'quest' || dialogue.type === 'poem') {
|
|
|
|
|
|
|
+ // 检查数字人、提问、诗词和朗诵评价类型的对话
|
|
|
|
|
+ if (dialogue.type === 'digital' || dialogue.type === 'quest' || dialogue.type === 'poem' || dialogue.type === 'poem_reading') {
|
|
|
if (
|
|
if (
|
|
|
!dialogue.roleName ||
|
|
!dialogue.roleName ||
|
|
|
!dialogue.content.trim() ||
|
|
!dialogue.content.trim() ||
|
|
|
- (dialogue.type !== 'poem' && !dialogue.voiceoverUrl)
|
|
|
|
|
|
|
+ (dialogue.type !== 'poem' && dialogue.type !== 'poem_reading' && !dialogue.voiceoverUrl)
|
|
|
) {
|
|
) {
|
|
|
errorMessages.value.push(
|
|
errorMessages.value.push(
|
|
|
`环节${sectionIndex + 1}:对话${dialogueIndex + 1}:存在完成内容!`
|
|
`环节${sectionIndex + 1}:对话${dialogueIndex + 1}:存在完成内容!`
|
|
@@ -2209,7 +2263,7 @@ onMounted(async () => {
|
|
|
inProgressTimer.value = setInterval(async () => {
|
|
inProgressTimer.value = setInterval(async () => {
|
|
|
await refreshWatchImages()
|
|
await refreshWatchImages()
|
|
|
}, 3000)
|
|
}, 3000)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
inProgressVideoTimer.value = setInterval(async () => {
|
|
inProgressVideoTimer.value = setInterval(async () => {
|
|
|
await refreshWatchVideos()
|
|
await refreshWatchVideos()
|
|
|
}, 3000)
|
|
}, 3000)
|
|
@@ -2519,6 +2573,10 @@ onUnmounted(() => {
|
|
|
background-color: #909399;
|
|
background-color: #909399;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.dialogue-type-tag.poem_reading {
|
|
|
|
|
+ background-color: #7d60a4;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.dialogue-type-tag.video {
|
|
.dialogue-type-tag.video {
|
|
|
background-color: #8b4513;
|
|
background-color: #8b4513;
|
|
|
}
|
|
}
|
|
@@ -2554,6 +2612,10 @@ onUnmounted(() => {
|
|
|
border-left: 4px solid #8b4513;
|
|
border-left: 4px solid #8b4513;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.dialogue-item.poem_reading {
|
|
|
|
|
+ border-left: 4px solid #7d60a4;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/* 对话头部 */
|
|
/* 对话头部 */
|
|
|
.dialogue-header {
|
|
.dialogue-header {
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
@@ -2631,6 +2693,11 @@ onUnmounted(() => {
|
|
|
color: white;
|
|
color: white;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.add-dialogue-btn.poem_reading {
|
|
|
|
|
+ background-color: #7d60a4;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.add-dialogue-btn.quest-user {
|
|
.add-dialogue-btn.quest-user {
|
|
|
background-color: #e6a23c;
|
|
background-color: #e6a23c;
|
|
|
color: white;
|
|
color: white;
|