|
@@ -192,6 +192,9 @@ const slideHeight = ref(0)
|
|
// 添加loading状态
|
|
// 添加loading状态
|
|
const isLoading = ref(false)
|
|
const isLoading = ref(false)
|
|
|
|
|
|
|
|
+// 作业数组
|
|
|
|
+const workArray = ref([])
|
|
|
|
+
|
|
// 计算幻灯片尺寸的函数
|
|
// 计算幻灯片尺寸的函数
|
|
const calculateSlideSize = () => {
|
|
const calculateSlideSize = () => {
|
|
const slideWrapRef = isFullscreen.value ? document.body : viewerCanvasRef.value
|
|
const slideWrapRef = isFullscreen.value ? document.body : viewerCanvasRef.value
|
|
@@ -950,7 +953,12 @@ const getWork = async () => {
|
|
|
|
|
|
const res = await api.selectSWorks(props.courseid, '0', slideIndex.value.toString())
|
|
const res = await api.selectSWorks(props.courseid, '0', slideIndex.value.toString())
|
|
console.log('getWork 执行成功,结果:', res)
|
|
console.log('getWork 执行成功,结果:', res)
|
|
- return res
|
|
|
|
|
|
+ workArray.value = props.cid
|
|
|
|
+ ? res[0].filter((work: any) => {
|
|
|
|
+ return work.type === 1 || (work.type === 2 && work.classid.includes(props.cid))
|
|
|
|
+ })
|
|
|
|
+ : res[0]
|
|
|
|
+ console.log('getWork 执行成功,结果:', workArray.value)
|
|
}
|
|
}
|
|
catch (error) {
|
|
catch (error) {
|
|
console.error('getWork 执行失败:', error)
|
|
console.error('getWork 执行失败:', error)
|