|
|
@@ -192,6 +192,8 @@ export default {
|
|
|
recordingEndTime: "", // 结束录音时间
|
|
|
isResultArray: [],
|
|
|
isCan: false,
|
|
|
+ timeoutPan: null,
|
|
|
+ isTimeOutPan: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -443,10 +445,7 @@ export default {
|
|
|
// 存储文件和文本到全局对象
|
|
|
await this.storeRecordingData(file);
|
|
|
// 记录结束录音时间
|
|
|
- this.recordingEndTime = new Date().toLocaleString("zh-CN", {
|
|
|
- hour12: false,
|
|
|
- timeZone: "Asia/Shanghai"
|
|
|
- }).replace(/\//g, "-");
|
|
|
+ this.recordingEndTime = await this.getServerTime()
|
|
|
// 调用 addPPTClass 接口
|
|
|
this.addPPTClass(file);
|
|
|
iiframe.contentWindow.onSessionStopped = null;
|
|
|
@@ -465,10 +464,7 @@ export default {
|
|
|
// 存储文件和文本到全局对象
|
|
|
await this.storeRecordingData(file);
|
|
|
// 记录结束录音时间
|
|
|
- this.recordingEndTime = new Date().toLocaleString("zh-CN", {
|
|
|
- hour12: false,
|
|
|
- timeZone: "Asia/Shanghai"
|
|
|
- }).replace(/\//g, "-");
|
|
|
+ this.recordingEndTime = await this.getServerTime()
|
|
|
// 调用 addPPTClass 接口
|
|
|
this.addPPTClass(file);
|
|
|
resolve(true)
|
|
|
@@ -774,6 +770,7 @@ export default {
|
|
|
cancelText: this.lang.ssCancel,
|
|
|
submitText: this.lang.ssConfirm,
|
|
|
submitCallback: () => {
|
|
|
+ this.isTimeOutPan = false;
|
|
|
this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
setTimeout(() => {
|
|
|
@@ -782,6 +779,7 @@ export default {
|
|
|
}, 1000)
|
|
|
},
|
|
|
cancelCallback: () => {
|
|
|
+ this.isTimeOutPan = false;
|
|
|
console.log("取消")
|
|
|
}
|
|
|
})
|
|
|
@@ -846,7 +844,7 @@ export default {
|
|
|
let item = this.isResultArray[i];
|
|
|
if(value && item.isTool){
|
|
|
item.can = true
|
|
|
- }else if(!item.isTool){
|
|
|
+ }else if(item.isTool){
|
|
|
item.can = false
|
|
|
item.like = false
|
|
|
}
|
|
|
@@ -889,12 +887,10 @@ export default {
|
|
|
this.jArray = Array;
|
|
|
})
|
|
|
},
|
|
|
- doSyncClassData() {
|
|
|
- if (this.courseDetail.userid == this.userid && this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840') {
|
|
|
- let endTime = new Date().toLocaleString("zh-CN", {
|
|
|
- hour12: false,
|
|
|
- timeZone: "Asia/Shanghai"
|
|
|
- }).replace(/\//g, "-")
|
|
|
+ async doSyncClassData() {
|
|
|
+ let userArray = ['6fbc6471-1d48-11ed-8c78-005056b86db5','333d0dfc-1cd9-11ef-bee5-005056b86db5','6fbce5ef-1d48-11ed-8c78-005056b86db5','66feffcc-ad35-11ed-b13d-005056b86db5']
|
|
|
+ if (this.courseDetail.userid == this.userid && (this.org == '16ace517-b5c7-4168-a9bb-a9e0035df840' || userArray.includes(this.userid))) {
|
|
|
+ let endTime = await this.getServerTime()
|
|
|
let courseTime = Math.floor((new Date(endTime) - new Date(this.startTime)) / (1000 * 60))
|
|
|
this.syncClassData({
|
|
|
courseId: this.id,
|
|
|
@@ -954,20 +950,41 @@ export default {
|
|
|
openShareDialog() {
|
|
|
let code = this.userJson.oidCode || this.userJson.orgCode
|
|
|
this.$refs.shareDialogRef.open(code, this.inviteCode)
|
|
|
+ },
|
|
|
+ resetIdleOp(){
|
|
|
+ if(this.courseDetail.userId == this.userid){
|
|
|
+ this.isTimeOutPan = true;
|
|
|
+ this.afterClass()
|
|
|
+ setTimeout(() => {
|
|
|
+ if(this.isTimeOutPan){
|
|
|
+ this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
+ this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tcid2 = ""
|
|
|
+ this.refreshCourse()
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ }, 5000);
|
|
|
+ }
|
|
|
+ // console.log('resetIdleOp','重置空闲定时器')
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
destroyed() {
|
|
|
clearInterval(this.opertimer);
|
|
|
this.opertimer = null;
|
|
|
+ clearTimeout(this.timeoutPan);
|
|
|
+ this.timeoutPan = null;
|
|
|
this.doSyncClassData();
|
|
|
+ this.stopIdleDetection(this.resetIdleOp);
|
|
|
},
|
|
|
async mounted() {
|
|
|
this.setoTime("1");
|
|
|
- this.startTime = new Date().toLocaleString("zh-CN", {
|
|
|
- hour12: false,
|
|
|
- timeZone: "Asia/Shanghai"
|
|
|
- }).replace(/\//g, "-")
|
|
|
+ this.startTime = await this.getServerTime()
|
|
|
+ console.log('this.startTime', this.startTime)
|
|
|
+ this.timeoutPan = setTimeout(() => {
|
|
|
+ this.startIdleDetection(this.resetIdleOp);
|
|
|
+ }, 40 * 60 * 1000)
|
|
|
+ // this.startIdleDetection(this.resetIdleOp);
|
|
|
this.getClassName()
|
|
|
this.getAIJ();
|
|
|
this.getCourseDetail();
|