zhuhao_dev #308
|
@ -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 {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue