From d7761883f25d87ccd68d8b59c2ae4b0623752b51 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: Wed, 11 Sep 2024 14:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=89=B9=E9=98=85=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A9=BA=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E4=B8=8Eloading=E5=8A=A0=E8=BD=BD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/classTask/classTask.vue | 56 ++++++++++++------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index 32749d2..d02ba7f 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -27,24 +27,35 @@
- - + + +
+ + +
+
+ +
@@ -99,6 +110,8 @@ const changeEndDate = (val) => { // 获取数据 const getData = () => { + classWorkList.value = [] + loading.value = true // 1、班级列表 getClassList() // 2、班级作业 @@ -181,6 +194,9 @@ const getClassWorkList = () => { classWorkList.value = response.rows && response.rows.filter((item) => item.workdatacount > 0) //TODO: 这里没分页,貌似这个 total 不重要,后续看 total.value = response.total + }else{ + classWorkList.value = [] + total.value = 0 } loading.value = false }) @@ -402,9 +418,7 @@ watch( ) watch(tabActive, (newVal,oldVal)=>{ console.log('newVal',newVal); - setTimeout(() => { - getData() // 加载数据 - }, 300) + getData() // 加载数据 })