|
|
@@ -10,6 +10,9 @@
|
|
|
<div @click.stop="back" class="backBtn" v-if="screenType != 2">
|
|
|
<img src="../../assets/icon/newIcon/return.svg" alt="" />
|
|
|
</div>
|
|
|
+ <div @click.stop="gotoCourseManage" class="backBtn" v-if="screenType == 2 && tType == 1">
|
|
|
+ <img src="../../assets/icon/newIcon/return.svg" alt="" />
|
|
|
+ </div>
|
|
|
<div v-if="tcid" class="class-info-group">
|
|
|
<span class="class-label">{{ lang.ssClass }}</span>
|
|
|
<span class="class-value class-value2" @click="openSelectClass">
|
|
|
@@ -26,6 +29,9 @@
|
|
|
<span class="class-label" v-if="inviteCode">{{ lang.ssInviteCode }}</span>
|
|
|
<span class="class-value" v-if="inviteCode">{{ inviteCode }}</span>
|
|
|
</div>
|
|
|
+ <div @click.stop="openShareDialog" class="shareBtn" v-if="tcid && tType == 1">
|
|
|
+ <img src="../../assets/share.svg" alt="" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="pec_h_center">
|
|
|
<el-tooltip effect="dark" :content="lang.ssRefresh" placement="bottom">
|
|
|
@@ -59,6 +65,11 @@
|
|
|
<span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse :
|
|
|
lang.ssFollowMode }}</span>
|
|
|
</div>
|
|
|
+ <div class="free-browse-switch" v-if="courseDetail.userid == userid">
|
|
|
+ <el-switch v-model="isCan" :active-value="true" :inactive-value="false" class="custom-switch"
|
|
|
+ active-color="#03ae2b" inactive-color="#d8d8d8" @change="onIsCanChange"></el-switch>
|
|
|
+ <span class="switch-label" :class="{ active: isCan }">{{ isCan ? lang.ssShowResult : lang.ssHideResult }}</span>
|
|
|
+ </div>
|
|
|
<div class="free-browse-switch" v-if="tType == 2">
|
|
|
<span class="switch-label" :class="{ active: freeBrowse }">{{ freeBrowse ? lang.ssFreeBrowse :
|
|
|
lang.ssFollowMode }}</span>
|
|
|
@@ -107,6 +118,8 @@
|
|
|
<messageInstruction ref="messageInstructionRef"></messageInstruction>
|
|
|
<!-- 确认提示组件 -->
|
|
|
<confirmInstruction ref="confirmInstructionRef"></confirmInstruction>
|
|
|
+ <!-- 分享弹窗 -->
|
|
|
+ <shareDialog ref="shareDialogRef"></shareDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -116,12 +129,14 @@ import selectTeachingClassDialog from "../dialog/selectTeachingClassDialog2.vue"
|
|
|
|
|
|
import messageInstruction from '../components/messageInstruction.vue';
|
|
|
import confirmInstruction from '../components/confirmInstruction.vue';
|
|
|
+import shareDialog from './shareDialog.vue';
|
|
|
export default {
|
|
|
mixins: [myMixin],
|
|
|
components: {
|
|
|
messageInstruction,
|
|
|
confirmInstruction,
|
|
|
- selectTeachingClassDialog
|
|
|
+ selectTeachingClassDialog,
|
|
|
+ shareDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -175,6 +190,10 @@ export default {
|
|
|
// 录音时间记录
|
|
|
recordingStartTime: "", // 开始录音时间
|
|
|
recordingEndTime: "", // 结束录音时间
|
|
|
+ isResultArray: [],
|
|
|
+ isCan: false,
|
|
|
+ timeoutPan: null,
|
|
|
+ isTimeOutPan: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -426,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;
|
|
|
@@ -448,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)
|
|
|
@@ -743,6 +756,9 @@ export default {
|
|
|
)
|
|
|
// }
|
|
|
},
|
|
|
+ gotoCourseManage(){
|
|
|
+ parent.setCourseUrl();
|
|
|
+ },
|
|
|
afterClass() {
|
|
|
if (this.recordedForm.status == 1) {
|
|
|
this.toggleRecording().then((flag) => {
|
|
|
@@ -754,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(() => {
|
|
|
@@ -762,6 +779,7 @@ export default {
|
|
|
}, 1000)
|
|
|
},
|
|
|
cancelCallback: () => {
|
|
|
+ this.isTimeOutPan = false;
|
|
|
console.log("取消")
|
|
|
}
|
|
|
})
|
|
|
@@ -820,6 +838,19 @@ export default {
|
|
|
console.log('自由浏览模式已切换为1:', this.freeBrowse);
|
|
|
this.$refs.ppt.contentWindow.PPTistStudent.toggleFollowMode()
|
|
|
},
|
|
|
+ onIsCanChange(value) {
|
|
|
+ this.isCan = value;
|
|
|
+ for(var i = 0; i < this.isResultArray.length; i++){
|
|
|
+ let item = this.isResultArray[i];
|
|
|
+ if(value && item.isTool){
|
|
|
+ item.can = true
|
|
|
+ }else if(item.isTool){
|
|
|
+ item.can = false
|
|
|
+ item.like = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.ppt.contentWindow.PPTistStudent.setCan(this.isResultArray)
|
|
|
+ },
|
|
|
setOperationTime() {
|
|
|
let _this = this;
|
|
|
if (_this.opertimer) {
|
|
|
@@ -856,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,
|
|
|
@@ -916,19 +945,46 @@ 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();
|
|
|
@@ -937,6 +993,20 @@ export default {
|
|
|
this.freeBrowse = value;
|
|
|
console.log('自由浏览模式已切换为:', this.freeBrowse);
|
|
|
}
|
|
|
+ window.setIsResultArray = (value) => {
|
|
|
+ this.isResultArray = value;
|
|
|
+ // 判断数组中isTool为true的项的can是否都为true
|
|
|
+ const toolItems = value.filter(item => item.isTool);
|
|
|
+ if (toolItems.length > 0) {
|
|
|
+ const allCanTrue = toolItems.every(item => item.can === true);
|
|
|
+ const allCanFalse = toolItems.every(item => item.can === false);
|
|
|
+ if (allCanTrue) {
|
|
|
+ this.isCan = true;
|
|
|
+ } else if (allCanFalse) {
|
|
|
+ this.isCan = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!this.userJson || !this.userJson.accountNumber) {
|
|
|
let res = await this.ajax.get(this.$store.state.api + "selectUser", {
|
|
|
userid: this.$route.query.userid
|
|
|
@@ -1123,6 +1193,20 @@ export default {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
+.shareBtn {
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.shareBtn img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
.class-info-group {
|
|
|
display: flex;
|
|
|
align-items: center;
|