#924 V2.1.5 PPT上课,点击上课之后,默认打开当前课程PPT
This commit is contained in:
parent
07fa4c9790
commit
3c064ebffd
|
@ -106,6 +106,7 @@ import { listClasscourseNew } from '@/api/teaching/classcourse'
|
||||||
import { endClass, getSelfReserv } from '@/api/classManage'
|
import { endClass, getSelfReserv } from '@/api/classManage'
|
||||||
import { listEntpcourse } from '@/api/teaching/classwork'
|
import { listEntpcourse } from '@/api/teaching/classwork'
|
||||||
import { createWindow } from '@/utils/tool'
|
import { createWindow } from '@/utils/tool'
|
||||||
|
import { defineExpose } from 'vue'
|
||||||
|
|
||||||
const { ipcRenderer } = window.electron || {}
|
const { ipcRenderer } = window.electron || {}
|
||||||
export default {
|
export default {
|
||||||
|
@ -135,6 +136,7 @@ export default {
|
||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
expose: ['openFileWin'],
|
||||||
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
|
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<kj-list-item
|
<kj-list-item
|
||||||
v-for="(item, index) in currentKJFileList"
|
v-for="(item, index) in currentKJFileList"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
:ref="'kjItemRef'+item.id"
|
||||||
:item="item"
|
:item="item"
|
||||||
:index="index"
|
:index="index"
|
||||||
:curNode="currentNode"
|
:curNode="currentNode"
|
||||||
|
@ -303,29 +304,29 @@ export default {
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
startClass(item) {
|
startClass(item) {
|
||||||
// console.log(item, sessionStore)
|
|
||||||
// 关闭状态,打开上课相关功能(已打开,忽略)
|
// 关闭状态,打开上课相关功能(已打开,忽略)
|
||||||
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
|
||||||
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
|
||||||
|
// 当前上课-store
|
||||||
|
sessionStore.set('activeClass', item)
|
||||||
|
this.activeClass = item
|
||||||
if(item.fileFlag === '课件') {
|
if(item.fileFlag === '课件') {
|
||||||
this.openReserv()
|
this.openReserv()
|
||||||
}
|
}
|
||||||
if(item.fileFlag === 'apt') {
|
if(item.fileFlag === 'apt') {
|
||||||
this.$refs.calssRef.open(item.fileId)
|
this.$refs.calssRef.open(item.fileId)
|
||||||
}
|
}
|
||||||
// 当前上课-store
|
|
||||||
sessionStore.set('activeClass', item)
|
|
||||||
this.activeClass = item
|
|
||||||
},
|
},
|
||||||
closeChange() { // 上课弹窗被关闭-触发
|
closeChange() { // 上课弹窗被关闭-触发
|
||||||
console.log('关闭上课弹窗')
|
console.log('关闭上课弹窗')
|
||||||
this.activeClass = null
|
// this.activeClass = null
|
||||||
sessionStore.delete('activeClass')
|
sessionStore.delete('activeClass')
|
||||||
},
|
},
|
||||||
initReserv(id) {
|
initReserv(id) {
|
||||||
getClassInfo(id).then((res) => {
|
getClassInfo(id).then((res) => {
|
||||||
this.curClassReserv = res.data
|
this.curClassReserv = res.data
|
||||||
this.openLesson(res.data.id);
|
this.openLesson(res.data.id);
|
||||||
|
this.$refs['kjItemRef'+this.activeClass.id][0].openFileWin(this.activeClass);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getBookPathFromServer() {
|
getBookPathFromServer() {
|
||||||
|
|
Loading…
Reference in New Issue