|
|
@@ -642,6 +642,8 @@ const courseDetail = ref<any>({})
|
|
|
const aiAssistant = ref<boolean>(false)
|
|
|
const studentArray = ref<any>([])
|
|
|
const isResultArray = ref<any>([])
|
|
|
+const opRes = ref<any>([])
|
|
|
+
|
|
|
|
|
|
// 跟随模式相关状态
|
|
|
const isCreator = ref(false) // 是否为创建人
|
|
|
@@ -2761,12 +2763,19 @@ const checkPPTFile = async (jsonObj: any) => {
|
|
|
uploadFile2(pptJsonFile, props.courseid as string)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
const getCourseDetail = async () => {
|
|
|
isLoading.value = true
|
|
|
try {
|
|
|
const res = await api.getCourseDetail(props.courseid as string)
|
|
|
- console.log(res)
|
|
|
+ const opRes1 = await api.selectPPTOp({
|
|
|
+ id: props.courseid + '-' + props.cid,
|
|
|
+ type: '1',
|
|
|
+ index: 0
|
|
|
+ })
|
|
|
+ opRes.value = opRes1[0]
|
|
|
+ console.log('操作记录:', opRes1[0])
|
|
|
+ console.log('操作记录:', opRes.value)
|
|
|
+ console.log(res, opRes.value)
|
|
|
const courseData = res[0][0]
|
|
|
courseDetail.value = courseData
|
|
|
selectWorksStudent()
|
|
|
@@ -2839,8 +2848,10 @@ const getCourseDetail = async () => {
|
|
|
isResultArray: JSON.stringify(isResultArray.value),
|
|
|
courseid: props.courseid
|
|
|
})
|
|
|
+
|
|
|
console.log(isResultArray.value)
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
catch (e) {
|
|
|
console.error('解析pptdata.data失败:', e)
|
|
|
@@ -3414,6 +3425,10 @@ const messageInit = () => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ if (props.type === '2') {
|
|
|
+ sendMessage({ type: 'class_begin', courseid: props.courseid })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -3740,6 +3755,26 @@ const getMessages = (msgObj: any) => {
|
|
|
choiceQuestionDetailDialogRef.value?.exitCastScreen?.()
|
|
|
}, 500)
|
|
|
}
|
|
|
+
|
|
|
+ if (opRes.value && opRes.value.length === 0 && msgObj.type === 'class_begin' && isCreator.value && props.cid) {
|
|
|
+ console.log('操作记录:', opRes.value)
|
|
|
+ api.addPPTOp({
|
|
|
+ id: props.courseid + '-' + props.cid,
|
|
|
+ type: '1',
|
|
|
+ index: 0,
|
|
|
+ data: new Date().toISOString()
|
|
|
+ }).then(() => {
|
|
|
+ const opRes1 = api.selectPPTOp({
|
|
|
+ id: props.courseid + '-' + props.cid,
|
|
|
+ type: '1',
|
|
|
+ index: 0
|
|
|
+ }).then(res => {
|
|
|
+ console.log('操作记录:', res)
|
|
|
+ opRes.value = res[0]
|
|
|
+ console.log('操作记录:', opRes.value)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -3902,6 +3937,7 @@ onMounted(() => {
|
|
|
// TODO: 根据type设置特定的显示模式或功能
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
getCourseDetail()
|
|
|
|
|
|
|