From 2929997d17e7228dc0df2bd706d1dfe43056eadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Mon, 11 Nov 2024 10:02:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E8=AE=A1=EF=BC=9A?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=89=E6=8B=A9=E8=BF=87=E5=BF=AB=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/newTask/taskTypeView.vue | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) 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(); })