SanHQin 1 týždeň pred
rodič
commit
6de84f08fc

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
     html,
     html,
     body{
     body{
       font-family: '黑体';
       font-family: '黑体';
-    }</style><link href=./static/css/app.2c466d06caba6d8776e8bf82282bb49a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.becc9317549795ada446.js></script><script type=text/javascript src=./static/js/app.9619376fb75e883693bf.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.067657fe24f3221861bef8ffc2889cce.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.becc9317549795ada446.js></script><script type=text/javascript src=./static/js/app.5db527e10052cc913268.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.067657fe24f3221861bef8ffc2889cce.css


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/css/app.067657fe24f3221861bef8ffc2889cce.css.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.5db527e10052cc913268.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/app.5db527e10052cc913268.js.map


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 55 - 28
src/components/pptEasyClass/index.vue

@@ -23,6 +23,11 @@
           </div>
           </div>
         </div>
         </div>
         <div class="pec_h_center">
         <div class="pec_h_center">
+          <el-tooltip effect="dark" :content="lang.ssRefresh" placement="bottom">
+            <div class="refresh_icon" @click="refreshCourse">
+                <img src="../../assets/icon/course/refresh-2.svg" />
+            </div>
+          </el-tooltip>
           <div class="pec_h_r_btn_refresh" :class="{ 'recording': recordedForm.status == 1 }" @click="toggleRecording" v-show="(jArray.includes(oid) || jArray.includes(org)) && courseDetail.userid == userid && tcid">
           <div class="pec_h_r_btn_refresh" :class="{ 'recording': recordedForm.status == 1 }" @click="toggleRecording" v-show="(jArray.includes(oid) || jArray.includes(org)) && courseDetail.userid == userid && tcid">
             <svg t="1772588344140"  viewBox="0 0 1024 1024" p-id="1693" width="200" height="200"><path d="M512 1024a512.568889 512.568889 0 0 1-512-512 512.625778 512.625778 0 0 1 512-512 512.568889 512.568889 0 0 1 512 512 512.568889 512.568889 0 0 1-512 512zM512 73.329778c-241.948444 0-438.670222 196.835556-438.670222 438.670222S270.051556 950.670222 512 950.670222s438.670222-196.835556 438.670222-438.670222S753.948444 73.329778 512 73.329778z m0 686.592a245.191111 245.191111 0 1 1 0-490.382222 245.191111 245.191111 0 0 1 0 490.382222z" p-id="1694"></path></svg>
             <svg t="1772588344140"  viewBox="0 0 1024 1024" p-id="1693" width="200" height="200"><path d="M512 1024a512.568889 512.568889 0 0 1-512-512 512.625778 512.625778 0 0 1 512-512 512.568889 512.568889 0 0 1 512 512 512.568889 512.568889 0 0 1-512 512zM512 73.329778c-241.948444 0-438.670222 196.835556-438.670222 438.670222S270.051556 950.670222 512 950.670222s438.670222-196.835556 438.670222-438.670222S753.948444 73.329778 512 73.329778z m0 686.592a245.191111 245.191111 0 1 1 0-490.382222 245.191111 245.191111 0 0 1 0 490.382222z" p-id="1694"></path></svg>
               <span>{{ recordedForm.status == 1 ? lang.ssStopRecording2 : lang.ssRecord }}</span>
               <span>{{ recordedForm.status == 1 ? lang.ssStopRecording2 : lang.ssRecord }}</span>
@@ -47,11 +52,7 @@
           <div class="free-browse-switch" v-if="tType == 2">
           <div class="free-browse-switch" v-if="tType == 2">
             <span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse : lang.ssFollowMode }}</span>
             <span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse : lang.ssFollowMode }}</span>
           </div>
           </div>
-          <el-tooltip effect="dark" :content="lang.ssRefresh" placement="bottom">
-            <div class="refresh_icon" @click="refreshCourse">
-                <img src="../../assets/icon/course/refresh-2.svg" />
-            </div>
-          </el-tooltip>
+
         </div>
         </div>
         <div class="pec_h_right">
         <div class="pec_h_right">
           <div class="pec_h_r_btnArea">
           <div class="pec_h_r_btnArea">
@@ -263,7 +264,7 @@ export default {
 
 
       iiframe.contentWindow.ConversationTranscriber();
       iiframe.contentWindow.ConversationTranscriber();
     },
     },
-    onFinishRecordWithMicrosoft() {
+    async onFinishRecordWithMicrosoft() {
       if (this.recordedForm.status == 1) {
       if (this.recordedForm.status == 1) {
         //正在录音时
         //正在录音时
         let iiframe = this.$refs["iiframe"];
         let iiframe = this.$refs["iiframe"];
@@ -271,16 +272,12 @@ export default {
           .getElementById("scenarioStopButton")
           .getElementById("scenarioStopButton")
           .click();
           .click();
         // 录音借宿
         // 录音借宿
-        iiframe.contentWindow.onSessionStopped = (s, e) => {
+        iiframe.contentWindow.onSessionStopped = async (s, e) => {
           this.recordedForm.status = 0;
           this.recordedForm.status = 0;
           this.controlsStatus = 2;
           this.controlsStatus = 2;
           this.showGetTextLoading = false;
           this.showGetTextLoading = false;
           // this.$message.success("已结束录音");
           // this.$message.success("已结束录音");
-          this.$message({
-            dangerouslyUseHTMLString: true,
-            customClass:"pptEasyClassMessage",
-            message: `${this.lang.ssStoppedRecording} <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank">${this.lang.ssViewRecordingResult}</p>`
-          });
+
           console.log("结束录音👇");
           console.log("结束录音👇");
           console.log("结束录音", e);
           console.log("结束录音", e);
           this.recordedForm.audioBlob.push(e.preaudio);
           this.recordedForm.audioBlob.push(e.preaudio);
@@ -291,7 +288,7 @@ export default {
             type: "audio/wav"
             type: "audio/wav"
           });
           });
           // 存储文件和文本到全局对象
           // 存储文件和文本到全局对象
-          this.storeRecordingData(file);
+          await this.storeRecordingData(file);
           // 记录结束录音时间
           // 记录结束录音时间
           this.recordingEndTime = new Date().toLocaleString("zh-CN", {
           this.recordingEndTime = new Date().toLocaleString("zh-CN", {
             hour12: false,
             hour12: false,
@@ -312,7 +309,7 @@ export default {
         });
         });
         let file = new File([blob], "recordedFile.wav", { type: "audio/wav" });
         let file = new File([blob], "recordedFile.wav", { type: "audio/wav" });
         // 存储文件和文本到全局对象
         // 存储文件和文本到全局对象
-        this.storeRecordingData(file);
+        await this.storeRecordingData(file);
         // 记录结束录音时间
         // 记录结束录音时间
         this.recordingEndTime = new Date().toLocaleString("zh-CN", {
         this.recordingEndTime = new Date().toLocaleString("zh-CN", {
           hour12: false,
           hour12: false,
@@ -324,17 +321,47 @@ export default {
     },
     },
     storeRecordingData(file) {
     storeRecordingData(file) {
       // 配置全局 window 对象存储录音数据
       // 配置全局 window 对象存储录音数据
-      if (!window.recordingData) {
-        window.recordingData = {};
-      }
-      window.recordingData.file = file;
-      window.recordingData.text = this.transcriptionData.content;
-      window.recordingData.textList = this.recordedForm.textList;
-      console.log("录音数据已存储到全局对象:", window.recordingData);
+      return new Promise((resolve)=>{
+        if (!window.recordingData) {
+          window.recordingData = {};
+        }
+        window.recordingData.file = file;
+        window.recordingData.text = this.transcriptionData.content;
+        window.recordingData.textList = this.recordedForm.textList;
+        // 将录音文件转为base64并存入localStorage
+        const reader = new FileReader();
+        reader.onload = function(e) {
+          const base64data = e.target.result;
+          try {
+            localStorage.setItem("recordedFileBase64", base64data);
+            localStorage.setItem('recordedFileName', audioFile.name);
+            localStorage.setItem('recordedFileType', audioFile.type);
+            resolve(true)
+            console.log("录音数据已存储到全局对象:", window.recordingData);
+          } catch (err) {
+            resolve(false)
+            console.error("localStorage存储base64文件失败:", err);
+          }
+        };
+        reader.readAsDataURL(file);
+      })
     },
     },
     openObserveDialog(pptid) {
     openObserveDialog(pptid) {
-      this.observeDialogUrl = `https://observe.cocorobo.cn/#/newClassroom?userid=${this.userid}&oid=${this.oid}&org=${this.org}&pptid=${pptid}`;
-      this.showObserveDialog = true;
+      // this.observeDialogUrl = `https://observe.cocorobo.cn/#/newClassroom?userid=${this.userid}&oid=${this.oid}&org=${this.org}&pptid=${pptid}`;
+      // this.showObserveDialog = true;
+
+      let _pageWindow = window.open(`https://observe.cocorobo.cn/#/newClassroom?userid=${this.userid}&oid=${this.oid}&org=${this.org}&pptid=${pptid}`,'_blank')
+      // _pageWindow.blur()
+      function openPageWindow(){
+        _pageWindow.focus()
+      }
+
+      this.$message({
+        dangerouslyUseHTMLString: true,
+        customClass:"pptEasyClassMessage",
+        message: `${this.lang.ssStoppedRecording} <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank" onclick="(${openPageWindow.toString()})()">${this.lang.ssViewRecordingResult}</p>`
+      });
+
     },
     },
     addPPTClass() {
     addPPTClass() {
       let params = {
       let params = {
@@ -802,21 +829,21 @@ export default {
 }
 }
 
 
 .refresh_icon {
 .refresh_icon {
-  width: 40px;
-  height: 40px;
+  width: 35px;
+  height: 35px;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;
   background-color: #fff7f5;
   background-color: #fff7f5;
   border-radius: 45%;
   border-radius: 45%;
   cursor: pointer;
   cursor: pointer;
-  margin-left: 15px;
+  margin-right: 15px;
   padding: 0 3px;
   padding: 0 3px;
 }
 }
 
 
 .refresh_icon img {
 .refresh_icon img {
-  width: 20px;
-  height: 20px;
+  width: 16px;
+  height: 16px;
 }
 }
 
 
 .name_box {
 .name_box {

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov