|
|
@@ -6,12 +6,21 @@
|
|
|
v-show="false"></iframe>
|
|
|
<div class="pec_header">
|
|
|
<div class="pec_h_left">
|
|
|
- <div @click.stop="back" class="backBtn" v-if="screenType != 2 || tType == 1">
|
|
|
+ <!-- || tType == 1 -->
|
|
|
+ <div @click.stop="back" class="backBtn" v-if="screenType != 2">
|
|
|
<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">{{ className }}</span>
|
|
|
+ <span class="class-value class-value2" @click="openSelectClass">
|
|
|
+ {{ className }}
|
|
|
+ <svg t="1776672009773" class="xia-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="4735" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12">
|
|
|
+ <path
|
|
|
+ d="M562.5 771c-14.3 14.3-33.7 27.5-52 23.5-18.4 3.1-35.7-11.2-50-23.5L18.8 327.3c-22.4-22.4-22.4-59.2 0-81.6s59.2-22.4 81.6 0L511.5 668l412.1-422.3c22.4-22.4 59.2-22.4 81.6 0s22.4 59.2 0 81.6L562.5 771z"
|
|
|
+ p-id="4736" fill="currentColor"></path>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-if="tcid" class="class-info-group">
|
|
|
<span class="class-label" v-if="inviteCode">{{ lang.ssInviteCode }}</span>
|
|
|
@@ -91,14 +100,29 @@
|
|
|
<iframe v-if="showObserveDialog" :src="observeDialogUrl" frameborder="0"
|
|
|
style="width: 100%; height: 85vh; border: none;"></iframe>
|
|
|
</el-dialog>
|
|
|
+ <selectTeachingClassDialog :courseDetail="courseDetail" :userId="userid" ref="selectTeachingClassDialogRef" @success="selectClassSuccess" @changeClassList="changeClassList"/>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 消息提示组件 -->
|
|
|
+ <messageInstruction ref="messageInstructionRef"></messageInstruction>
|
|
|
+ <!-- 确认提示组件 -->
|
|
|
+ <confirmInstruction ref="confirmInstructionRef"></confirmInstruction>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { myMixin } from '../../mixins/mixin';
|
|
|
+import selectTeachingClassDialog from "../dialog/selectTeachingClassDialog2.vue";
|
|
|
|
|
|
+import messageInstruction from '../components/messageInstruction.vue';
|
|
|
+import confirmInstruction from '../components/confirmInstruction.vue';
|
|
|
export default {
|
|
|
mixins: [myMixin],
|
|
|
+ components: {
|
|
|
+ messageInstruction,
|
|
|
+ confirmInstruction,
|
|
|
+ selectTeachingClassDialog
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
id: this.$route.query.courseId,
|
|
|
@@ -111,6 +135,7 @@ export default {
|
|
|
courseType: this.$route.query.type,
|
|
|
screenType: this.$route.query.screenType,
|
|
|
tcid2: this.$route.query.tcid,
|
|
|
+ classList: [],
|
|
|
tcid: "",
|
|
|
className: "",
|
|
|
showIframe: false,
|
|
|
@@ -164,6 +189,57 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ openSelectClass(){
|
|
|
+ this.$refs.selectTeachingClassDialogRef.open({classList:this.classList}, this.tcid2)
|
|
|
+ },
|
|
|
+ addInviteCodeOne(cid) {
|
|
|
+ return new Promise((resolve)=>{
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ courseId: this.id,
|
|
|
+ inviteCode: cid,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "add_courseInviteCode2", params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res.data)
|
|
|
+ resolve(res.data)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ resolve(err.messages)
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async selectClassSuccess(classId){
|
|
|
+ if(classId){
|
|
|
+ let data = await this.addInviteCodeOne(classId)
|
|
|
+ console.log("addInviteCodeOne",data)
|
|
|
+ this.tcid2 = classId
|
|
|
+ this.getClassName()
|
|
|
+ this.getCourseDetail();
|
|
|
+ }else if(this.tcid2){
|
|
|
+ this.ticd2 = ''
|
|
|
+ this.getCourseDetail();
|
|
|
+ }
|
|
|
+ // this.gotoCourse(classId);
|
|
|
+ this.$refs.selectTeachingClassDialogRef.close();
|
|
|
+ },
|
|
|
+ async changeClassList(data){
|
|
|
+ this.classList = JSON.parse(JSON.stringify(data))
|
|
|
+ let params = [{
|
|
|
+ cid:this.id,
|
|
|
+ juri:this.classList.map(i=>i.id).join(',')
|
|
|
+ }]
|
|
|
+ this.ajax.post(this.$store.state.api+"update_CourseJuriById",params).then(res=>{
|
|
|
+ if(res.data==1){
|
|
|
+ console.log(this.lang.ssModifySuccess)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ //this.inviteCodeFn();
|
|
|
+ },
|
|
|
goTo(path) {
|
|
|
this.$router.push(path);
|
|
|
},
|
|
|
@@ -183,25 +259,43 @@ export default {
|
|
|
this.$message.warning(this.lang.ssRecordingTimeAtLeast5Seconds);
|
|
|
return;
|
|
|
}
|
|
|
- this.$confirm(this.lang.ssStopRecordingNotice, this.lang.ssStopRecordingConfirm, {
|
|
|
- confirmButtonText: this.lang.ssConfirm,
|
|
|
- cancelButtonText: this.lang.ssCancel,
|
|
|
- confirmButtonClass: "pptEasyClassConfirmButtonText",
|
|
|
- cancelButtonClass: "pptEasyClassCancelButtonText"
|
|
|
- }).then(() => {
|
|
|
- console.log("确定")
|
|
|
- // this.$message({
|
|
|
- // dangerouslyUseHTMLString: true,
|
|
|
- // customClass:"pptEasyClassMessage",
|
|
|
- // message: '已停止录制 <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank">查看结果</p>'
|
|
|
- // });
|
|
|
- this.onFinishRecordWithMicrosoft().then(() => {
|
|
|
- resolve(true)
|
|
|
- });
|
|
|
- }).catch(() => {
|
|
|
- console.log("取消")
|
|
|
- resolve(false)
|
|
|
- });
|
|
|
+
|
|
|
+ this.$refs.confirmInstructionRef.open({
|
|
|
+ title: this.lang.ssStopRecordingConfirm,
|
|
|
+ message: this.lang.ssStopRecordingNotice,
|
|
|
+ cancelText: this.lang.ssCancel,
|
|
|
+ submitText: this.lang.ssConfirm,
|
|
|
+ submitCallback: () => {
|
|
|
+ console.log("确定")
|
|
|
+ this.onFinishRecordWithMicrosoft().then(() => {
|
|
|
+ resolve(true)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancelCallback: () => {
|
|
|
+ console.log("取消")
|
|
|
+ resolve(false)
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ // this.$confirm(this.lang.ssStopRecordingNotice, this.lang.ssStopRecordingConfirm, {
|
|
|
+ // confirmButtonText: this.lang.ssConfirm,
|
|
|
+ // cancelButtonText: this.lang.ssCancel,
|
|
|
+ // confirmButtonClass: "pptEasyClassConfirmButtonText",
|
|
|
+ // cancelButtonClass: "pptEasyClassCancelButtonText"
|
|
|
+ // }).then(() => {
|
|
|
+ // console.log("确定")
|
|
|
+ // // this.$message({
|
|
|
+ // // dangerouslyUseHTMLString: true,
|
|
|
+ // // customClass:"pptEasyClassMessage",
|
|
|
+ // // message: '已停止录制 <p style="color:#3AB855;text-decoration: underline;cursor: pointer;float:right;margin-left:10px" target="_blank">查看结果</p>'
|
|
|
+ // // });
|
|
|
+ // this.onFinishRecordWithMicrosoft().then(() => {
|
|
|
+ // resolve(true)
|
|
|
+ // });
|
|
|
+ // }).catch(() => {
|
|
|
+ // console.log("取消")
|
|
|
+ // resolve(false)
|
|
|
+ // });
|
|
|
|
|
|
} else {
|
|
|
const now = new Date();
|
|
|
@@ -489,12 +583,7 @@ export default {
|
|
|
_pageWindow.focus()
|
|
|
}
|
|
|
|
|
|
- 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>`
|
|
|
- });
|
|
|
+ this.$refs.messageInstructionRef.pptMessage(`${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(file) {
|
|
|
@@ -543,6 +632,8 @@ export default {
|
|
|
this.courseDetail.juri ? this.courseDetail.juri.split(",") : [],
|
|
|
this.tcid2 ? this.tcid2.split(",") : []
|
|
|
)[0] || "";
|
|
|
+ console.log('tcid', this.tcid)
|
|
|
+ console.log('tcid2', this.tcid2)
|
|
|
if (this.tcid && res.data[1].length) {
|
|
|
let _inviteA = [];
|
|
|
for (var ik = 0; ik < res.data[1].length; ik++) {
|
|
|
@@ -564,6 +655,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.setPptIframe()
|
|
|
+ this.classList = res.data[2]
|
|
|
+ if(!this.tcid2 && this.tType == '1'){
|
|
|
+ this.$refs.selectTeachingClassDialogRef.open({classList:this.classList})
|
|
|
+ }
|
|
|
this.pageLoading = false;
|
|
|
})
|
|
|
.catch(err => {
|
|
|
@@ -613,70 +708,109 @@ export default {
|
|
|
this.className = courseGrade.data[0][0].grade;
|
|
|
},
|
|
|
back() {
|
|
|
- if (this.tType != 2) {
|
|
|
- this.goTo(
|
|
|
- '/courseDetail?userid=' +
|
|
|
- this.userid +
|
|
|
- '&oid=' +
|
|
|
- this.oid +
|
|
|
- '&org=' +
|
|
|
- this.org +
|
|
|
- '&cid=' +
|
|
|
- this.classId +
|
|
|
- '&courseId=' +
|
|
|
- this.id +
|
|
|
- '&tType=' +
|
|
|
- this.tType +
|
|
|
- '&screenType=' +
|
|
|
- this.screenType
|
|
|
- )
|
|
|
- } else {
|
|
|
- this.goTo(
|
|
|
- '/index?userid=' +
|
|
|
- this.userid +
|
|
|
- '&oid=' +
|
|
|
- this.oid +
|
|
|
- '&org=' +
|
|
|
- this.org +
|
|
|
- '&cid=' +
|
|
|
- this.classId +
|
|
|
- '&tType=' +
|
|
|
- this.tType +
|
|
|
- '&screenType=' +
|
|
|
- this.screenType
|
|
|
- )
|
|
|
- }
|
|
|
+ // if (this.tType != 2) {
|
|
|
+ // this.goTo(
|
|
|
+ // '/courseDetail?userid=' +
|
|
|
+ // this.userid +
|
|
|
+ // '&oid=' +
|
|
|
+ // this.oid +
|
|
|
+ // '&org=' +
|
|
|
+ // this.org +
|
|
|
+ // '&cid=' +
|
|
|
+ // this.classId +
|
|
|
+ // '&courseId=' +
|
|
|
+ // this.id +
|
|
|
+ // '&tType=' +
|
|
|
+ // this.tType +
|
|
|
+ // '&screenType=' +
|
|
|
+ // this.screenType
|
|
|
+ // )
|
|
|
+ // } else {
|
|
|
+ this.goTo(
|
|
|
+ '/index?userid=' +
|
|
|
+ this.userid +
|
|
|
+ '&oid=' +
|
|
|
+ this.oid +
|
|
|
+ '&org=' +
|
|
|
+ this.org +
|
|
|
+ '&cid=' +
|
|
|
+ this.classId +
|
|
|
+ '&tType=' +
|
|
|
+ this.tType +
|
|
|
+ '&screenType=' +
|
|
|
+ this.screenType
|
|
|
+ )
|
|
|
+ // }
|
|
|
},
|
|
|
afterClass() {
|
|
|
if (this.recordedForm.status == 1) {
|
|
|
this.toggleRecording().then((flag) => {
|
|
|
if (flag) {
|
|
|
- this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
|
|
|
- confirmButtonText: this.lang.ssConfirm,
|
|
|
- cancelButtonText: this.lang.ssCancel,
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
- this.$message.success(this.lang.ssStudentLoggedOut)
|
|
|
- setTimeout(() => {
|
|
|
- this.back()
|
|
|
- }, 1000)
|
|
|
- }).catch(() => { });
|
|
|
+
|
|
|
+ this.$refs.confirmInstructionRef.open({
|
|
|
+ title: this.lang.ssPrompt,
|
|
|
+ message: this.lang.ssEndClassConfirm,
|
|
|
+ cancelText: this.lang.ssCancel,
|
|
|
+ submitText: this.lang.ssConfirm,
|
|
|
+ submitCallback: () => {
|
|
|
+ this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
+ this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tcid2 = ""
|
|
|
+ this.refreshCourse()
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ cancelCallback: () => {
|
|
|
+ console.log("取消")
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ // this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
|
|
|
+ // confirmButtonText: this.lang.ssConfirm,
|
|
|
+ // cancelButtonText: this.lang.ssCancel,
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ // this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
+ // this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.tcid2 = ""
|
|
|
+ // this.refreshCourse()
|
|
|
+ // }, 1000)
|
|
|
+ // }).catch(() => { });
|
|
|
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
|
|
|
- confirmButtonText: this.lang.ssConfirm,
|
|
|
- cancelButtonText: this.lang.ssCancel,
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
- this.$message.success(this.lang.ssStudentLoggedOut)
|
|
|
- setTimeout(() => {
|
|
|
- this.back()
|
|
|
- }, 1000)
|
|
|
- }).catch(() => { });
|
|
|
+ // this.$confirm(this.lang.ssEndClassConfirm, this.lang.ssPrompt, {
|
|
|
+ // confirmButtonText: this.lang.ssConfirm,
|
|
|
+ // cancelButtonText: this.lang.ssCancel,
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ // this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
+ // this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.tcid2 = ""
|
|
|
+ // this.refreshCourse()
|
|
|
+ // }, 1000)
|
|
|
+ // }).catch(() => { });
|
|
|
+ this.$refs.confirmInstructionRef.open({
|
|
|
+ title: this.lang.ssPrompt,
|
|
|
+ message: this.lang.ssEndClassConfirm,
|
|
|
+ cancelText: this.lang.ssCancel,
|
|
|
+ submitText: this.lang.ssConfirm,
|
|
|
+ submitCallback: () => {
|
|
|
+ this.$refs.ppt.contentWindow.PPTistStudent.forceLogout();
|
|
|
+ this.$refs.messageInstructionRef.pptMessage(this.lang.ssStudentLoggedOut)
|
|
|
+ setTimeout(() => {
|
|
|
+ this.tcid2 = ""
|
|
|
+ this.refreshCourse()
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+ cancelCallback: () => {
|
|
|
+ console.log("取消")
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -1011,6 +1145,19 @@ export default {
|
|
|
text-align: center;
|
|
|
display: inline-block;
|
|
|
box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.class-value2 {
|
|
|
+ cursor: pointer;
|
|
|
+ background: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.class-value > svg{
|
|
|
+ width: 13px;
|
|
|
+ height: 13px;
|
|
|
+ margin-left: 8px;
|
|
|
}
|
|
|
|
|
|
.pec_content {
|