diff --git a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue index 4b66557..e68b0a4 100644 --- a/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue +++ b/src/renderer/src/views/classTask/container/newTask/taskTypeView.vue @@ -287,6 +287,7 @@ import prevReadMsgDialog from '@/views/classTask/container/newTask/prevReadMsg-D import examDetailsDrawer from '@/components/exam-question/examDetailsDrawer.vue' import { JYApiListCT, JYApiListOriginYear, JYApiListSO} from "@/utils/examQuestion/jyeoo" +import {debounce } from '@/utils/comm' import { useToolState } from '@/store/modules/tool' import useUserStore from '@/store/modules/user' const userStore = useUserStore().user @@ -955,14 +956,8 @@ onMounted(async() => { }) -watch(() => props.propsformobj.uniquekey, (newVal) => { - console.log(props.propsformobj,'propsformobj') - if(props.propsformobj.uniquekey){ - classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; // 作业唯一标识 作业名称 - } -}) -watch(() => props.bookobj.levelSecondId, (newVal) => { - console.log(props.bookobj,'课程选择') +const debounceQueryData = debounce(() => { + console.log("防抖 加载数据中...") // 初始化滚动加载参数 initPageParams(); // 习题资源 @@ -971,6 +966,18 @@ watch(() => props.bookobj.levelSecondId, (newVal) => { getQueryFromEvaluationclue(); // 知识点 getEntpCourseWorkPointList(); +}, 1000); + + +watch(() => props.propsformobj.uniquekey, (newVal) => { + console.log(props.propsformobj,'propsformobj') + if(props.propsformobj.uniquekey){ + classWorkForm.uniquekey = props.propsformobj.uniquekey?cloneDeep(props.propsformobj.uniquekey):''; // 作业唯一标识 作业名称 + } +}) +watch(() => props.bookobj.levelSecondId, (newVal, oldVal) => { + console.log(props.bookobj,'课程选择') + debounceQueryData(); })