#924 V2.1.5 PPT上课,点击上课之后,默认打开当前课程PPT

This commit is contained in:
朱浩 2024-10-11 14:41:36 +08:00
parent 07fa4c9790
commit 3c064ebffd
2 changed files with 8 additions and 5 deletions

View File

@ -106,6 +106,7 @@ import { listClasscourseNew } from '@/api/teaching/classcourse'
import { endClass, getSelfReserv } from '@/api/classManage'
import { listEntpcourse } from '@/api/teaching/classwork'
import { createWindow } from '@/utils/tool'
import { defineExpose } from 'vue'
const { ipcRenderer } = window.electron || {}
export default {
@ -135,6 +136,7 @@ export default {
default: ''
}
},
expose: ['openFileWin'],
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {

View File

@ -18,6 +18,7 @@
<kj-list-item
v-for="(item, index) in currentKJFileList"
:key="index"
:ref="'kjItemRef'+item.id"
:item="item"
:index="index"
:curNode="currentNode"
@ -303,29 +304,29 @@ export default {
// },
methods: {
startClass(item) {
// console.log(item, sessionStore)
// ()
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
// -store
sessionStore.set('activeClass', item)
this.activeClass = item
if(item.fileFlag === '课件') {
this.openReserv()
}
if(item.fileFlag === 'apt') {
this.$refs.calssRef.open(item.fileId)
}
// -store
sessionStore.set('activeClass', item)
this.activeClass = item
},
closeChange() { // -
console.log('关闭上课弹窗')
this.activeClass = null
// this.activeClass = null
sessionStore.delete('activeClass')
},
initReserv(id) {
getClassInfo(id).then((res) => {
this.curClassReserv = res.data
this.openLesson(res.data.id);
this.$refs['kjItemRef'+this.activeClass.id][0].openFileWin(this.activeClass);
})
},
getBookPathFromServer() {