瀏覽代碼

ppt模式进入清空工具

SanHQin 3 月之前
父節點
當前提交
276aaa7603
共有 1 個文件被更改,包括 13 次插入11 次删除
  1. 13 11
      src/components/pages/pptEasy/addCourse.vue

+ 13 - 11
src/components/pages/pptEasy/addCourse.vue

@@ -255,7 +255,7 @@
                   <span>+</span>
                   <div>AI应用</div>
                 </div>
-                
+
                 <div class="pta_ba_item pta_ba_item4" @click.stop="openVideoUploadDialog()">
                   <svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                     <rect width="19" height="19" fill="url(#pattern0_158_1455)"/>
@@ -2357,7 +2357,7 @@
     <CodeEditor ref="CodeEditorRef" @success="addHtmlSuccess"></CodeEditor>
     <InteractiveToolDialog ref="InteractiveToolDialogRef" @addTool="addTool"/>
     <VideoUploadDialog ref="VideoUploadDialogRef" @uploadLocalVideo="handleLocalVideoUpload" @uploadProgress="handleUploadProgress" @searchBilibili="handleBilibiliSearch"/>
-    
+
     <!-- Bilibili视频检索弹窗 -->
     <BilibiliSearchDialog
       :visible.sync="dialogVisibleBilibiliSearch"
@@ -2365,7 +2365,7 @@
       :grade="selectedGradeName"
       @addVideo="handleBilibiliVideoAdd"
     />
-    
+
     <!-- 视频预览弹窗 -->
     <el-dialog
       :visible.sync="dialogVisibleVideoPreview"
@@ -2398,7 +2398,7 @@
         ></iframe>
       </div>
     </el-dialog>
-    
+
     <!-- 右下角上传进度显示 -->
     <div class="upload-progress-container" v-if="uploadProgressList.length > 0">
       <div class="upload-progress-header" @click="toggleProgressExpand">
@@ -2413,9 +2413,9 @@
               {{item.status === 'uploading' ? '上传中' : item.status === 'completed' ? '已完成' : '上传失败'}}
             </span>
           </div>
-          <el-progress 
+          <el-progress
             v-if="item.status === 'uploading'"
-            :percentage="item.progress" 
+            :percentage="item.progress"
             :status="item.status === 'error' ? 'exception' : ''"
             :stroke-width="8"
             style="margin-top: 8px;"
@@ -2777,8 +2777,8 @@ export default {
     },
     // 动态生成PPT iframe的URL
     pptIframeUrl() {
-      const baseUrl = this.isBetaEnv 
-        ? 'https://beta.ppt.cocorobo.cn' 
+      const baseUrl = this.isBetaEnv
+        ? 'https://beta.ppt.cocorobo.cn'
         : 'https://ppt.cocorobo.cn';
       return `${baseUrl}/?mode=editor&courseid=${this.cid}`;
     },
@@ -8187,7 +8187,7 @@ export default {
         // 添加新的进度项
         this.uploadProgressList.push(progressData);
       }
-      
+
       // 如果上传完成,3秒后移除
       if (progressData.status === 'completed') {
         setTimeout(() => {
@@ -8216,7 +8216,7 @@ export default {
       };
       this.pptCourseJson.toolsList.push(videoItem);
       this.setPPtToolList();
-      
+
       // 更新进度状态为已完成
       const progressIndex = this.uploadProgressList.findIndex(item => item.id === videoData.id);
       if (progressIndex !== -1) {
@@ -8538,7 +8538,9 @@ export default {
     }, 500);
   },
   mounted() {
-
+    // 清空
+    this.pptCourseJson.toolsList = [];
+    this.setPPtToolList()
     // iframe页面加载完成
     this.$refs.pptIframeRef.onload = () => {
       console.log("iframe页面加载完成");