|
@@ -15,23 +15,22 @@
|
|
<n-drawer-content title="数字人播报">
|
|
<n-drawer-content title="数字人播报">
|
|
<div class="drawerContent m-5">
|
|
<div class="drawerContent m-5">
|
|
<!-- <div class="text-lg my-2.5">数字人播报</div>-->
|
|
<!-- <div class="text-lg my-2.5">数字人播报</div>-->
|
|
-
|
|
|
|
<n-list
|
|
<n-list
|
|
- hoverable
|
|
|
|
- clickable
|
|
|
|
|
|
+ v-if="list && list.flat()"
|
|
style="--n-color-modal: none"
|
|
style="--n-color-modal: none"
|
|
:show-divider="false"
|
|
:show-divider="false"
|
|
>
|
|
>
|
|
- <n-list-item v-for="(vi, index) in list" :key="index">
|
|
|
|
- 当前空间视频ID:
|
|
|
|
- <n-space></n-space>
|
|
|
|
- <!-- {{ vi.url}}-->
|
|
|
|
- {{ vi.sid }}
|
|
|
|
|
|
+ <!-- {{list}}-->
|
|
|
|
+ <n-list-item
|
|
|
|
+ v-for="(vi, index) in list.flat()"
|
|
|
|
+ :key="index"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ >
|
|
|
|
+ <div class="mb-5">
|
|
|
|
+ {{ `当前空间${vi.media ? '视频' : '模型'}` }} ID: {{ vi.sid }}
|
|
|
|
+ </div>
|
|
|
|
|
|
- <n-select
|
|
|
|
- v-model:value="bindAudioId"
|
|
|
|
- :options="audioOptions"
|
|
|
|
- ></n-select>
|
|
|
|
|
|
+ <n-select :options="audioOptions" ></n-select>
|
|
</n-list-item>
|
|
</n-list-item>
|
|
</n-list>
|
|
</n-list>
|
|
</div>
|
|
</div>
|
|
@@ -47,7 +46,8 @@ import {
|
|
onMounted,
|
|
onMounted,
|
|
// reactive,
|
|
// reactive,
|
|
onUnmounted,
|
|
onUnmounted,
|
|
- watchEffect
|
|
|
|
|
|
+ watchEffect,
|
|
|
|
+ watch
|
|
} from 'vue'
|
|
} from 'vue'
|
|
|
|
|
|
import { useMainStore } from '@/store'
|
|
import { useMainStore } from '@/store'
|
|
@@ -59,10 +59,12 @@ const main = useMainStore()
|
|
const active = ref(true)
|
|
const active = ref(true)
|
|
|
|
|
|
const boxVideos = computed(() => main.sceneInfo.boxVideos)
|
|
const boxVideos = computed(() => main.sceneInfo.boxVideos)
|
|
|
|
+const boxModels = computed(() => main.sceneInfo.boxModels)
|
|
|
|
|
|
const list = ref<any[]>([])
|
|
const list = ref<any[]>([])
|
|
|
|
|
|
-const bindAudioId = ref()
|
|
|
|
|
|
+const bindAudioIds = ref<{ id: string }[]>([])
|
|
|
|
+const bindAudioFilePath = ref()
|
|
const audioOptions = ref<any[]>([])
|
|
const audioOptions = ref<any[]>([])
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
@@ -73,7 +75,7 @@ onMounted(async () => {
|
|
.filter((i) => i.type === 'tts')
|
|
.filter((i) => i.type === 'tts')
|
|
.map((item) => {
|
|
.map((item) => {
|
|
return {
|
|
return {
|
|
- label: item.document,
|
|
|
|
|
|
+ label: item.name,
|
|
value: item.id
|
|
value: item.id
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -82,17 +84,33 @@ onMounted(async () => {
|
|
}
|
|
}
|
|
|
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
- if (boxVideos.value?.length) {
|
|
|
|
|
|
+ if (boxVideos.value?.length || boxModels.value?.length) {
|
|
// debugger
|
|
// debugger
|
|
- const data = JSON.parse(boxVideos.value)
|
|
|
|
- console.log('boxVideos', data)
|
|
|
|
- list.value = data
|
|
|
|
|
|
+ const videoData = JSON.parse(boxVideos.value)
|
|
|
|
+ const boxData = JSON.parse(boxModels.value)
|
|
|
|
+ console.log('boxVideos', videoData)
|
|
|
|
+ videoData && list.value.push(videoData)
|
|
|
|
+ boxData && list.value.push(boxData)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
// setWidthSceneRef(0)
|
|
// setWidthSceneRef(0)
|
|
})
|
|
})
|
|
|
|
+watch(
|
|
|
|
+ bindAudioIds,
|
|
|
|
+ () => {
|
|
|
|
+ console.log('bindAudioIds', bindAudioIds.value)
|
|
|
|
+ // if (bindAudioId.value) {
|
|
|
|
+ // const file = audioOptions.value.find((v) => v.value === bindAudioId.value)
|
|
|
|
+ // console.log('file', file)
|
|
|
|
+ // debugger
|
|
|
|
+ // }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ deep: true
|
|
|
|
+ }
|
|
|
|
+)
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="sass" scoped>
|
|
<style lang="sass" scoped>
|