zhuhao_dev #308

Merged
zhuhao merged 8 commits from zhuhao_dev into main 2024-10-11 15:01:04 +08:00
2 changed files with 8 additions and 5 deletions
Showing only changes of commit 3c064ebffd - Show all commits

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() {