|
|
@@ -295,7 +295,7 @@ export default {
|
|
|
timeZone: "Asia/Shanghai"
|
|
|
}).replace(/\//g, "-");
|
|
|
// 调用 addPPTClass 接口
|
|
|
- this.addPPTClass();
|
|
|
+ this.addPPTClass(file);
|
|
|
iiframe.contentWindow.onSessionStopped = null;
|
|
|
iiframe.contentWindow.window.onRecognizedResult = null;
|
|
|
};
|
|
|
@@ -316,7 +316,7 @@ export default {
|
|
|
timeZone: "Asia/Shanghai"
|
|
|
}).replace(/\//g, "-");
|
|
|
// 调用 addPPTClass 接口
|
|
|
- this.addPPTClass();
|
|
|
+ this.addPPTClass(file);
|
|
|
}
|
|
|
},
|
|
|
storeRecordingData(file) {
|
|
|
@@ -334,8 +334,8 @@ export default {
|
|
|
const base64data = e.target.result;
|
|
|
try {
|
|
|
localStorage.setItem("recordedFileBase64", base64data);
|
|
|
- localStorage.setItem('recordedFileName', audioFile.name);
|
|
|
- localStorage.setItem('recordedFileType', audioFile.type);
|
|
|
+ localStorage.setItem('recordedFileName', file.name);
|
|
|
+ localStorage.setItem('recordedFileType', file.type);
|
|
|
resolve(true)
|
|
|
console.log("录音数据已存储到全局对象:", window.recordingData);
|
|
|
} catch (err) {
|
|
|
@@ -346,12 +346,18 @@ export default {
|
|
|
reader.readAsDataURL(file);
|
|
|
})
|
|
|
},
|
|
|
- openObserveDialog(pptid) {
|
|
|
+ openObserveDialog(pptid,file) {
|
|
|
// 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()
|
|
|
+ _pageWindow.onload = function(){
|
|
|
+ _pageWindow.window.postMessage({
|
|
|
+ type: 'fileData',
|
|
|
+ file: file
|
|
|
+ }, '*');
|
|
|
+ }
|
|
|
+ window.focus()
|
|
|
function openPageWindow(){
|
|
|
_pageWindow.focus()
|
|
|
}
|
|
|
@@ -359,6 +365,7 @@ export default {
|
|
|
this.$message({
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
customClass:"pptEasyClassMessage",
|
|
|
+ duration:3000,
|
|
|
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>`
|
|
|
});
|
|
|
|
|
|
@@ -375,7 +382,7 @@ export default {
|
|
|
.then(res => {
|
|
|
console.log("addPPTClass", res);
|
|
|
let id = res.data[0][0].id;
|
|
|
- this.openObserveDialog(id);
|
|
|
+ this.openObserveDialog(id,file);
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.error(err);
|