From 97cf80e3d1dbd933437c1f930d78065f62e82739 Mon Sep 17 00:00:00 2001
From: du <13220750630.163.com>
Date: 星期四, 10 四月 2025 10:25:26 +0800
Subject: [PATCH] 字幕查看

---
 easegen-front/src/views/myCourse/index.vue |   37 ++++++++++++++++++++++---------------
 1 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/easegen-front/src/views/myCourse/index.vue b/easegen-front/src/views/myCourse/index.vue
index e37a18f..3eee296 100644
--- a/easegen-front/src/views/myCourse/index.vue
+++ b/easegen-front/src/views/myCourse/index.vue
@@ -95,14 +95,7 @@
             >
               {{t('myCourse.downloadVideo')}}
             </el-button>
-            <el-button
-              v-if="scope.row.subtitlesUrl"
-              link
-              type="primary"
-              @click="handleDownload(scope.row.subtitlesUrl,scope.row.courseName)"
-            >
-              {{t('myCourse.downloadSubtitles')}}
-            </el-button>
+
           </template>
           <template v-if=" scope.row.status == 3">
             <el-button
@@ -113,13 +106,16 @@
               {{t('myCourse.resynthesize')}}
             </el-button>
           </template>
-          <el-button
-            link
-            type="primary"
-            @click="openSubtitleDialog(scope.row.id)"
-          >
-            瀛楀箷
-          </el-button>
+          <template v-if="scope.row.status == 2">
+            <el-button
+              link
+              type="primary"
+              @click="openSubtitleDialog(scope.row.id)"
+            >
+              瀛楀箷
+            </el-button>
+          </template>
+
           <el-button
             link
             type="danger"
@@ -213,6 +209,14 @@
             resize="none"
           />
           <el-button
+            style="margin-top: 20px;float: right;margin-left: 20px"
+            type="primary"
+            :disabled="!subtitleForm.subtitlesUrl"
+            @click="handleDownload(subtitleForm.subtitlesUrl,subtitleForm.courseName)"
+          >
+            {{t('myCourse.downloadSubtitles')}}
+          </el-button>
+          <el-button
             style="margin-top: 20px;float: right"
             type="primary"
             @click="saveSubtitles"
@@ -221,6 +225,7 @@
           >
             淇濆瓨瀛楀箷
           </el-button>
+
         </div>
 
       </el-form-item>
@@ -419,6 +424,8 @@
     }
     if (videoDetail.subtitlesStatus === 2) { // 2 琛ㄧず瀛楀箷宸茬敓鎴�
       if (videoDetail.subtitlesUrl) {
+        subtitleForm.subtitlesUrl = videoDetail.subtitlesUrl
+        subtitleForm.courseName=videoDetail.courseName
         try {
           // 灏濊瘯浠嶶RL鑾峰彇瀛楀箷鍐呭
           const response = await fetch(videoDetail.subtitlesUrl)

--
Gitblit v1.9.3