zhuhao_dev #324

Merged
zhuhao merged 9 commits from zhuhao_dev into main 2024-10-16 14:32:52 +08:00
4 changed files with 55 additions and 9 deletions
Showing only changes of commit d1f3abcc72 - Show all commits

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.8",
"version": "2.1.9",
"description": "",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -148,8 +148,26 @@ export default {
this.userInfo = useUserStore().user
},
methods: {
getOpenCourse() {
return Promise.all([listClasscourseNew({teacherid: this.userInfo.userId,status:"open",evalid: this.curNode.id,pageSize:1000}), getSelfReserv({ex2:this.curNode.id})]).then(([res1,res2])=>{
let list2 = res1.rows || []
let list = res2.data || []
let one = list.find(item1 => {
if (item1.status === "上课中") {
return true
}
})
if (one) {
return one
}
if (list2.length>0) {
one = list2[0]
}
return one
})
},
//
getOpenCourse(isApt) {
/*getOpenCourse(isApt) {
const curNodeId = this.curNode.id
if (isApt) { // APT
const params = {teacherid: this.userInfo.userId,status:"open",evalid: curNodeId,pageSize:1000}
@ -161,11 +179,12 @@ export default {
return (res.data || []).filter(o => o.status === "上课中")
})
}
},
},*/
clickStartClass(item) {
const isApt = item.fileFlag === 'apt'
this.getOpenCourse(isApt).then(res => {
if(!res || res.length === 0){
console.log(res)
if(!res){
this.$emit('on-start-class', item)
}else{
ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', {
@ -182,7 +201,7 @@ export default {
confirmButtonClass: "el-button--danger",
center: true,
beforeClose: (action, instance, done) => {
const obj = res[0]
const obj = res
if (action === 'confirm'){
//
this.$emit('change', 'close', obj, { type: 1, instance, done })
@ -190,7 +209,6 @@ export default {
if (action === 'cancel'){
//
if (obj.bookImg) {
console.log('PPT')
//PPT
listEntpcourse({
evalid: obj.ex2,
@ -199,6 +217,26 @@ export default {
}).then(async res1=>{
if (res1.rows[0].id) {
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res1.rows[0].id + "&reservId=" + obj.id })
if (obj.ex4) {
getPrepareById(obj.ex4).then(res2=>{
console.log(res2)
this.openFileWin(res2);
})
}else {
ElMessageBox.confirm(
'抱歉版本V2.1.9前创建的课程无法直接打开PPT请自行打开PPT',
'Warning',
{
confirmButtonText: 'OK',
type: 'warning',
center: true,
}
)
.then(() => {
})
.catch(() => {
})
}
done()
}
})

View File

@ -101,6 +101,12 @@ const props = defineProps({
default: () => {
return {}
}
},
curFile: {
type: Object,
default: () => {
return {}
}
}
})
const ruleFormDialog = ref(null)
@ -292,7 +298,8 @@ const addClassReserv = (formData) => {
classRoom: formData.classRoom,
classSubject: props.currentNode.edusubject,
ex1: props.bookId,
ex2: props.currentNode.id
ex2: props.currentNode.id,
ex4: props.curFile.id
}
addSmartClassReserv(param).then((res) => {
if (res.msg) {

View File

@ -34,7 +34,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="教学实录" name="教学实录" class="prepare-center-jxsl">
<class-reserv v-if="activeAptTab==='教学实录'" :curNode="currentNode"
<class-reserv v-if="activeAptTab==='教学实录'" :curNode="currentNode"
@change="changeClass"></class-reserv>
</el-tab-pane>
</el-tabs>
@ -132,6 +132,7 @@
ref="reservDialog"
:current-node="currentNode"
:book-id="uploadData.textbookId"
:cur-file="activeClass"
@add-success="initReserv"
@close="closeChange"
></reserv>
@ -354,7 +355,7 @@ export default {
}, 1000)
break
}
default:
default:
break
}
},