Merge pull request '调整ppt上课 作业查询' (#356) from lyc-dev into main

This commit is contained in:
lyc 2024-10-23 10:43:25 +08:00
commit e457ac9baf
2 changed files with 12 additions and 2 deletions

View File

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

View File

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