ppt上课

This commit is contained in:
zdg 2024-12-12 16:24:47 +08:00
parent 354e0b44c9
commit 03f160464c
5 changed files with 22 additions and 11 deletions

View File

@ -8,6 +8,7 @@ import * as useStore from '../store' // pptist-状态管理
import ChatWs from '@/plugins/socket' // 聊天socket
import msgUtils from '@/plugins/modal' // 消息工具
const slidesStore = store.useSlidesStore() // 幻灯片-状态管理
const screenStore = useStore.useScreenStore() // 全屏-状态管理
const classcourseStore = useStore.useClasscourseStore() // 课堂信息-状态管理
const classcourse = sessionStore.get('curr.classcourse') // 课堂信息
@ -32,10 +33,13 @@ export class Classcourse {
// 连接socket
if (!ChatWs.ws) ChatWs.init()
ChatWs.id = classcourse.timgroupid // 群组id
console.log('ws- ', classcourse)
this.classcourse = classcourse // 课堂信息
this.id = classcourse.id // 课堂id
classcourseStore.setClasscourse(classcourse) // 课堂信息-状态管理
// 如果课堂信息有paging则更新当前页码
const isPaging = !!classcourse.paging||classcourse.paging==0
if (isPaging) slidesStore.updateSlideIndex(classcourse.paging)
// 课堂信息-状态管理
classcourseStore.setClasscourse(classcourse)
// 待上课提示
if (!classcourse.status) {
this.msgObj = {

View File

@ -142,4 +142,6 @@ export class MsgEnum {
MSG_0034: 0x0022,
MSG_0035: 0x0023,
}
}
}
export default MsgEnum;

View File

@ -14,8 +14,8 @@
<el-button size="small" type="primary" :icon="ChatDotRound" @click="chatSend()">上课(APP)</el-button>
</template>
<template v-else-if="item.status === 'open'">
<!-- <el-button :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
>继续上课</el-button> -->
<el-button :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
>继续上课</el-button>
<!--<el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>-->
<el-button :loading="loading" size="small" type="info" @click="endClassR(item)"
>下课{{ loading?'中...':'' }}</el-button>

View File

@ -146,6 +146,7 @@ const open = async (id, classObj) => {
await getAptInfo(id)
//
getClassList()
console.log('classObj', classObj)
//
if (!!classObj) {
dt.ctCourse = classObj
@ -304,11 +305,11 @@ const classTeachingStart = async () => {
const { classcourseid:id } = teacherForm.form
if (id) { //
// -pptList
if (myClassActive.value.filetype == 'aptist') {
if (myClassActive.value.filetype == 'aippt') {
const msgEl = ElMessage.warning({message:'正在打开公屏,请稍后...',duration: 0})
setTimeout(async () => {
msgEl.close()
const res = await Http_Classcourse.getClasscourse(teacherForm.form.classcourseid)
const res = await Http_Classcourse.getClasscourse(id)
openPublicScreen(res.data)
}, 2000);
}else {
@ -316,6 +317,8 @@ const classTeachingStart = async () => {
toLinkWeb(url) // web-
visible.value = false //
}
} else {
ElMessage.warning('请先创建课程')
}
}
//
@ -354,9 +357,11 @@ const getQrUrl = async() => {
//
const openPublicScreen = (classcourse) => {
console.log('打开公屏', classcourse)
// app
const data = { id: classcourse.id }
ChatWs.sendMsg(MsgEnum.HEADS.MSG_0000, data, {}, ChatWs.TYPES.single, userStore.id)
if (!dt.ctCourse) { // -
// app
const data = { id: classcourse.id }
ChatWs.sendMsg(MsgEnum.HEADS.MSG_0000, data, {}, ChatWs.TYPES.single, userStore.id)
}
//
const resource = toRaw(myClassActive.value)
sessionStore.set('curr.resource', resource) //

View File

@ -196,7 +196,7 @@ export default {
}
},*/
clickStartClass(item) {
const isApt = item.fileFlag === 'apt'
const isApt = ['apt','aippt'].includes(item.fileFlag)
this.getOpenCourse(isApt).then(res => {
console.log(res)
if(!res){