| | |
| | | <!-- {{ formatDuration(scope.row.duration) }}--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="排队个数" align="center" prop="pos" /> |
| | | <el-table-column label="进度" align="center" prop="progressVideo"> |
| | | <template #default="scope"> |
| | | {{ calculateProgress(scope.row.progressVideo) }}% |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column :label="t('myCourse.courseName')" align="center" prop="courseName"> |
| | | <template #default="scope"> |
| | | <el-link type="primary" @click="goDetail(scope.row.courseId)">{{ scope.row.courseName }}</el-link> |
| | |
| | | @click="generateSubtitles" |
| | | :loading="generating || polling" |
| | | > |
| | | 查看字幕 |
| | | 生成字幕 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | |
| | | const secs = seconds % 60 |
| | | return `${hrs > 0 ? `${hrs}时` : ''}${mins > 0 ? `${mins}分` : ''}${secs}秒` |
| | | } |
| | | // 计算进度 |
| | | const calculateProgress = (progressStr: number) => { |
| | | if (!progressStr || typeof progressStr !== 'string') return 0; |
| | | |
| | | const parts = progressStr.split('/'); |
| | | if (parts.length !== 2) return 0; |
| | | |
| | | const completed = parseFloat(parts[0]); |
| | | const total = parseFloat(parts[1]); |
| | | |
| | | if (isNaN(completed) || isNaN(total) || total === 0) return 0; |
| | | |
| | | return Math.round((completed / total) * 100); |
| | | } |
| | | |
| | | // 重新合成视频 |
| | | const reMegerMedia = async (id: number) => { |