| | |
| | | <el-link type="primary" @click="goDetail(scope.row.courseId)">{{ scope.row.courseName }}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :label="t('myCourse.status')" align="center" prop="status" width="120"> |
| | | <el-table-column :label="t('myCourse.status')" align="center" prop="status" width="140"> |
| | | <template #default="scope"> |
| | | <dict-tag v-if="scope.row.status==2 && scope.row.subtitlesAddStatus!=null" :type="DICT_TYPE.video_zi" :value="scope.row.subtitlesAddStatus" /> |
| | | <dict-tag v-else :type="DICT_TYPE.VIDEO_STATUS" :value="scope.row.status" /> |
| | |
| | | > |
| | | 片头片尾 |
| | | </el-button> |
| | | |
| | | </template> |
| | | <template v-if="scope.row.status !=1"> |
| | | <el-button |
| | | type="danger" |
| | | link |
| | | @click="handleDelete(scope.row.id)" |
| | | v-if="scope.row.status == 2 || scope.row.status==3 || scope.row.status==4" |
| | | |
| | | > |
| | | {{ t('action.del') }} |
| | | </el-button> |
| | | </template> |
| | | |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | title="字幕查看修改" |
| | | width="70%" |
| | | class="subtitle-dialog" |
| | | @close="pauseAllVideos('subtitle')" |
| | | > |
| | | <el-tabs v-model="activeSubtitleTab"> |
| | | <el-tab-pane label="字幕设置" name="setting"> |
| | |
| | | <el-col :span="24"> |
| | | <div class="preview-section"> |
| | | <h4>字幕视频</h4> |
| | | <div class="video-container"> |
| | | <div class="video-container video-container1"> |
| | | <video |
| | | ref="subtitleVideo" |
| | | v-if="subtitleForm.videoUrl" |
| | | :src="subtitleForm.videoUrl" |
| | | controls |
| | |
| | | v-model="headerFooterDialogVisible" |
| | | title="片头片尾设置" |
| | | width="70%" |
| | | @close="pauseAllVideos('headerFooter')" |
| | | > |
| | | <el-tabs v-model="activeTab"> |
| | | <el-tab-pane label="设置片头片尾" name="setting"> |
| | |
| | | <el-form-item label="片头视频"> |
| | | <div class="video-container"> |
| | | <video |
| | | v-if="formData1.value?.titles" |
| | | v-if="formData1.value.titles" |
| | | :src="formData1.value.titles" |
| | | controls |
| | | class="preview-video" |
| | |
| | | <el-form-item label="片尾视频"> |
| | | <div class="video-container"> |
| | | <video |
| | | v-if="formData1.value?.trailer" |
| | | v-if="formData1.value.trailer" |
| | | :src="formData1.value.trailer" |
| | | controls |
| | | class="preview-video" |
| | |
| | | <h4>视频</h4> |
| | | <div class="video-container"> |
| | | <video |
| | | ref="mainVideo" |
| | | v-if="formData1.value?.videoUrl || formData1.value?.previewUrl" |
| | | :src="formData1.value?.videoUrl || formData1.value?.previewUrl" |
| | | controls |
| | |
| | | <h4>片头片尾视频</h4> |
| | | <div class="video-container"> |
| | | <video |
| | | ref="compositeVideo" |
| | | v-if="formData1.value?.compositeVideo" |
| | | :src="formData1.value.compositeVideo" |
| | | controls |
| | |
| | | const message = useMessage() |
| | | const { t } = useI18n() |
| | | const polling = ref(false) |
| | | // 添加视频ref |
| | | const subtitleVideo = ref<HTMLVideoElement | null>(null) |
| | | const mainVideo = ref<HTMLVideoElement | null>(null) |
| | | const compositeVideo = ref<HTMLVideoElement | null>(null) |
| | | let pollingTimer: number | null = null |
| | | //合成片头片尾视频 |
| | | const dialogVisible = ref(false) |
| | |
| | | isvideo: 2, |
| | | id: null as number | null |
| | | }) |
| | | |
| | | // 视频列表相关数据 |
| | | const loading = ref(true) |
| | | const total = ref(0) |
| | |
| | | videoRef.value.open(row.previewUrl, row.subtitlesVttUrl) |
| | | } |
| | | } |
| | | const pauseAllVideos = (dialogType: 'subtitle' | 'headerFooter') => { |
| | | if (dialogType === 'subtitle' && subtitleVideo.value) { |
| | | subtitleVideo.value.pause() |
| | | } |
| | | |
| | | if (dialogType === 'headerFooter') { |
| | | if (mainVideo.value) { |
| | | mainVideo.value.pause() |
| | | } |
| | | if (compositeVideo.value) { |
| | | compositeVideo.value.pause() |
| | | } |
| | | } |
| | | } |
| | | // 删除视频 |
| | | const handleDelete = async (id: number) => { |
| | | try { |
| | |
| | | font-size: 14px; |
| | | background: #f5f7fa; |
| | | } |
| | | .video-container1{ |
| | | height: 490px !important; |
| | | } |
| | | </style> |