Merge pull request '调整ppt上课 作业查询' (#356) from lyc-dev into main
This commit is contained in:
commit
e457ac9baf
|
@ -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()
|
||||||
})
|
})
|
||||||
|
|
|
@ -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')
|
||||||
})
|
})
|
||||||
// === 方法 ===
|
// === 方法 ===
|
||||||
// 获取颜色索引
|
// 获取颜色索引
|
||||||
|
|
Loading…
Reference in New Issue