From 1f38a62a2e98390b1c5f629bd96097f8e77396fa Mon Sep 17 00:00:00 2001
From: Flex <q1406482700@163.com>
Date: 星期二, 15 四月 2025 15:17:50 +0800
Subject: [PATCH] Merge branch 'master' of http://yykjgit.sdyyst.com/r/easegen

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

diff --git a/easegen-front/src/views/myCourse/index.vue b/easegen-front/src/views/myCourse/index.vue
index e3b6893..ed0ce38 100644
--- a/easegen-front/src/views/myCourse/index.vue
+++ b/easegen-front/src/views/myCourse/index.vue
@@ -40,10 +40,16 @@
 <!--          {{ formatDuration(scope.row.duration) }}-->
 <!--        </template>-->
 <!--      </el-table-column>-->
-      <el-table-column label="鎺掗槦涓暟" align="center" prop="pos" />
+      <el-table-column label="鎺掗槦涓暟" align="center" prop="pos" >
+        <template #default="scope">
+         <span v-if="scope.row.pos==0">瑙嗛姝e湪鍚堟垚...</span>
+          <span v-else>{{ scope.row.pos }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="杩涘害" align="center" prop="progressVideo">
         <template #default="scope">
-          {{ calculateProgress(scope.row.progressVideo) }}%
+          <span v-if="scope.row.status==2">100%</span>
+          <span v-else>{{ calculateProgress(scope.row.progressVideo) }}%</span>
         </template>
       </el-table-column>
 
@@ -448,17 +454,25 @@
     subtitleDialogVisible.value = true
     subtitleForm.videoId = videoId
     const videoDetail = await pptTemplateApi.myCourseDetail(videoId)
-    console.log('瑙嗛璇︽儏:', videoDetail)
+
+
     // 绔嬪嵆鑾峰彇瑙嗛璇︽儏妫�鏌ュ瓧骞曠姸鎬�
     subtitleForm.subtitlesAddStatus=videoDetail.subtitlesAddStatus
     if (videoDetail.subtitlesAddStatus === 2) {
       subtitleForm.videoUrl = videoDetail.videoUrl || ''
+      generating.value=false
+      polling.value=false
 
+    }else if (videoDetail.subtitlesAddStatus === 1) {
+      generating.value=true
+      polling.value=true
     }
     if (videoDetail.subtitlesStatus === 2) { // 2 琛ㄧず瀛楀箷宸茬敓鎴�
       if (videoDetail.subtitlesUrl) {
         subtitleForm.subtitlesUrl = videoDetail.subtitlesUrl
         subtitleForm.courseName=videoDetail.courseName
+        generating.value=false
+        polling.value=false
         try {
           // 灏濊瘯浠嶶RL鑾峰彇瀛楀箷鍐呭
           const response = await fetch(videoDetail.subtitlesUrl)
@@ -477,15 +491,19 @@
         // 鐩存帴浣跨敤瀛楀箷鍐呭
         subtitleForm.content = videoDetail.subtitlesContent
       }
-    } else {
+    } else if (videoDetail.subtitlesStatus === 3) {
       // 瀛楀箷鏈敓鎴愭垨鐢熸垚澶辫触锛屾竻绌哄唴瀹�
       subtitleForm.content = ''
+    }else if (videoDetail.subtitlesStatus === 1) {
+      generating.value=true
+      polling.value=true
     }
   } catch (error) {
     console.error('鑾峰彇瑙嗛璇︽儏澶辫触:', error)
     message.error('鑾峰彇瑙嗛璇︽儏澶辫触锛岃閲嶈瘯')
     subtitleDialogVisible.value = false
   }
+  console.log('瑙嗛璇︽儏:', generating)
 }
 
 // 閲嶇疆瀛楀箷琛ㄥ崟

--
Gitblit v1.9.3