index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <!-- 基础设置页面 class="pointer-events-auto"-->
  3. <div>
  4. <n-drawer
  5. v-model:show="active"
  6. :width="240"
  7. placement="right"
  8. :trap-focus="false"
  9. :block-scroll="false"
  10. :show-mask="false"
  11. :mask-closable="false"
  12. to="#drawer-target"
  13. style="--n-body-padding: 0px"
  14. >
  15. <n-drawer-content title="数字人播报">
  16. <div class="drawerContent m-5">
  17. <div class="text-lg my-2.5">数字人播报</div>
  18. <div class="list" v-if="!editData.show">
  19. <div class="butlist">
  20. <n-space>
  21. <n-button type="primary" @click="handleShow(1)">+ 3D</n-button>
  22. <n-button type="primary" @click="handleShow(2)"
  23. >+ 视频</n-button
  24. >
  25. </n-space>
  26. </div>
  27. <div class="list my-2">
  28. <div class="listItem">
  29. <!-- <div class="3D flex justify-between justify-items-center">-->
  30. <!-- <span>-->
  31. <!-- <n-icon size="17" color="#000">-->
  32. <!-- <LogoAppleAr class="relative top-0.5" />-->
  33. <!-- </n-icon>-->
  34. <!-- 企业荣誉-->
  35. <!-- </span>-->
  36. <!-- <n-popover placement="bottom" trigger="click">-->
  37. <!-- <template #trigger>-->
  38. <!-- <n-icon size="17" color="#000">-->
  39. <!-- <EllipsisHorizontal />-->
  40. <!-- </n-icon>-->
  41. <!-- </template>-->
  42. <!-- <div class="butList w-12 pointer-events-auto">-->
  43. <!-- <div class="butItem">编辑</div>-->
  44. <!-- <div class="butItem">移动</div>-->
  45. <!-- <div class="butItem">删除</div>-->
  46. <!-- </div>-->
  47. <!-- </n-popover>-->
  48. <!-- </div>-->
  49. <!-- <div class="video flex justify-between justify-items-center">-->
  50. <!-- <span>-->
  51. <!-- <n-icon size="17" color="#000">-->
  52. <!-- <Videocam class="relative top-0.5" />-->
  53. <!-- </n-icon>-->
  54. <!-- 企业荣誉-->
  55. <!-- </span>-->
  56. <!-- <n-popover placement="bottom" trigger="click">-->
  57. <!-- <template #trigger>-->
  58. <!-- <n-icon size="17" color="#000">-->
  59. <!-- <EllipsisHorizontal />-->
  60. <!-- </n-icon>-->
  61. <!-- </template>-->
  62. <!-- <div class="butList w-12 pointer-events-auto">-->
  63. <!-- <div class="butItem">编辑</div>-->
  64. <!-- <div class="butItem">移动</div>-->
  65. <!-- <div class="butItem">删除</div>-->
  66. <!-- </div>-->
  67. <!-- </n-popover>-->
  68. <!-- </div>-->
  69. </div>
  70. </div>
  71. </div>
  72. <div v-else>
  73. <n-upload
  74. action="https://www.mocky.io/v2/5e4bafc63100007100d8b70f"
  75. :default-file-list="editData.data.fileList"
  76. list-type="image-card"
  77. >
  78. <div class="uploadText text-center">
  79. <n-icon size="48" :depth="3">
  80. <Add />
  81. </n-icon>
  82. <div>点击上传</div>
  83. </div>
  84. </n-upload>
  85. <div class="required my-2.5">
  86. 上传视频前请查看<span>操作提示</span>
  87. </div>
  88. <n-radio-group
  89. v-model:value="basicConfig.view"
  90. name="radiobuttongroup1"
  91. size="small"
  92. >
  93. <n-radio-button value="left" label="缩放" />
  94. <n-radio-button value="center" label="移位" />
  95. <n-radio-button value="right" label="旋转" />
  96. </n-radio-group>
  97. <!-- <div class="text-sm my-2.5">展示页面风格</div>
  98. <n-select
  99. v-model:value="basicConfig.theme"
  100. placeholder="选择主题"
  101. :options="options"
  102. /> -->
  103. <div v-if="basicConfig.view == 'left'">
  104. <div class="flex justify-between my-2.5">
  105. <span>Scalex</span>
  106. <n-input-number :style="{ width: '60%' }" />
  107. </div>
  108. <div class="flex justify-between my-2.5">
  109. <span>Scaley</span>
  110. <n-input-number :style="{ width: '60%' }" />
  111. </div>
  112. <div class="flex justify-between my-2.5">
  113. <span>Scalez</span>
  114. <n-input-number :style="{ width: '60%' }" />
  115. </div>
  116. </div>
  117. <div v-else>
  118. <div class="flex justify-between my-2.5">
  119. <span>Scaley</span>
  120. <n-input-number :style="{ width: '60%' }" />
  121. </div>
  122. <div class="flex justify-between my-2.5">
  123. <span>Scalez</span>
  124. <n-input-number :style="{ width: '60%' }" />
  125. </div>
  126. </div>
  127. <div class="">讲解语音</div>
  128. <div class="flex justify-between my-2.5">
  129. <n-select v-model:value="editData.value" :options="editData.options" />
  130. </div>
  131. </div>
  132. </div>
  133. </n-drawer-content>
  134. </n-drawer>
  135. </div>
  136. </template>
  137. <script setup lang="ts">
  138. import { ref, watch, computed, onMounted, reactive, onUnmounted } from 'vue'
  139. import {
  140. LogoAppleAr,
  141. EllipsisHorizontal,
  142. Videocam,
  143. Add
  144. } from '@vicons/ionicons5'
  145. import { NPopover, NUpload, NInputNumber } from 'naive-ui'
  146. import { useMainStore } from '@/store'
  147. defineProps<{ msg: string }>()
  148. const main = useMainStore()
  149. const active = ref(true)
  150. const editData = reactive({
  151. show: false,
  152. type: '',
  153. value: '',
  154. options: [
  155. {
  156. label: 'Nowhere Man',
  157. value: 'song4'
  158. },
  159. {
  160. label: 'Think For Yourself',
  161. value: 'song5'
  162. },
  163. {
  164. label: 'The Word',
  165. value: 'song6'
  166. }
  167. ],
  168. data: {
  169. fileList: []
  170. }
  171. })
  172. const activeType = ref('list')
  173. const { setWidthSceneRef } = main
  174. const digitalHumanList = computed(() => {
  175. return main.digitalHumanList
  176. })
  177. const basicConfig = computed(() => {
  178. return main.basicConfig
  179. })
  180. function handleShow(type: number) {
  181. editData.show = true
  182. editData.type = type === 1 ? '3D' : 'video'
  183. }
  184. onMounted(() => {
  185. active.value = true
  186. // setWidthSceneRef(240)
  187. })
  188. onUnmounted(() => {
  189. // setWidthSceneRef(0)
  190. })
  191. </script>
  192. <style lang="sass" scoped>
  193. .list
  194. .listItem
  195. div
  196. display: flex
  197. justify-content: space-between
  198. </style>