From 6bf278c148a7bdbccbcd778b7651229fe4f6ee0d Mon Sep 17 00:00:00 2001 From: zhangsir Date: Thu, 14 Nov 2024 17:35:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B2=E5=B8=88=E8=A7=86=E9=A2=91=E4=B8=8B?= =?UTF-8?q?=E4=B8=80=E6=AD=A5=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/lecturer/OnlineLearning.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/views/lecturer/OnlineLearning.vue b/src/views/lecturer/OnlineLearning.vue index bba09e62..eeb9bc5a 100644 --- a/src/views/lecturer/OnlineLearning.vue +++ b/src/views/lecturer/OnlineLearning.vue @@ -64,16 +64,17 @@ export default { getProgress({teacherId:id}).then(res=>{ this.progressData=res.data if ( res.data.length>=1 ){ - res.data.forEach((item,index)=>{ - if (item.progress==100 && index==res.data.length-1){ - this.disabled=false - }else if (item.progress==100) { - }else { - this.disabled=true - return + const isAll = true; + res.data.some(item => { + if (item.progress != 100) { + this.disabled = true; + isAll = false; + return true; } - }) - + }); + if (isAll) { + this.disabled = false; + } } }) },