调整ppt上课 作业查询

This commit is contained in:
lyc 2024-10-23 10:43:57 +08:00
parent 7b2ad4ce64
commit 0b4019957f
2 changed files with 12 additions and 2 deletions

View File

@ -110,6 +110,10 @@ const curNode = reactive({
data: {}
})
const props = defineProps(['curNode'])
const sendHomework = (row,type) => {
if(type == 'item'){
//
@ -222,7 +226,8 @@ onMounted(async () => {
entpcourseid.value = route.query.entpcourseid
lesson.value = route.query.label
// mounted
curNode.data = sessionStore.get('subject.curNode')
// curNode.data = sessionStore.get('subject.curNode')
curNode.data = props.curNode
getHomework()
getResource()
})

View File

@ -25,7 +25,7 @@
<div class="c-popover" :style="`--top: ${topPos}px;--height:${hPost}px;`" v-show="isVisible">
<div class="content" v-if="isVisible">
<slot name="content">
<homework v-if="activeObj?.prop === 'resource'" />
<homework v-if="activeObj?.prop === 'resource'" :curNode="curNode" />
<span v-else style="color:red;">{{activeObj}}</span>
</slot>
</div>
@ -35,6 +35,7 @@
</template>
<script setup>
import { computed, defineProps, ref, reactive, watchEffect, onMounted } from 'vue'
import { sessionStore } from '@/utils/store'
import homework from './homework.vue';
// -
@ -63,6 +64,8 @@ const topPos = ref(30) // 顶部距离-内容的距离
const hPost = ref(0) // -
const isFold = ref(false) //
let posBtnAll = {} //
let curNode = null //
// === ===
const list = computed(() => props.data.map((o,i) => {
o.style = getStyle(o.style, i)
@ -71,6 +74,8 @@ const list = computed(() => props.data.map((o,i) => {
onMounted(() => {
posBtnAll = btnRef.value.getBoundingClientRect()
hPost.value = posBtnAll.height
curNode = sessionStore.get('subject.curNode')
})
// === ===
//