From 619a67906a453f6b4716d5fc9db461be259858e3 Mon Sep 17 00:00:00 2001 From: surenjun Date: Fri, 3 Jan 2025 13:08:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=AF=84=E5=88=A4=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Judge.ets | 6 ++++++ .../compontents/judge/DeductionPopup.ets | 20 ++++++++++++------- entry/src/main/ets/pages/judgeSDK/judge.ts | 15 ++++++++++---- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index d11bb5ac..bcd0212d 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -199,6 +199,12 @@ struct Index { const {xmdm, kfdm} = kf const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]; const currentProject = this.projectsObj[xmdm] + + // 过滤考前绕车一周上车准备的扣分 + if(sczb == 1 && xmdm == '1'){ + return + } + this.kfArr.push({ //扣分项目名称 xmmcStr: currentProject.name, diff --git a/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets b/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets index 65a5a8bb..972746ea 100644 --- a/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets +++ b/entry/src/main/ets/pages/compontents/judge/DeductionPopup.ets @@ -34,7 +34,8 @@ export default struct DeductedPopup { } @Prop defaultTabIndex:number = 0 - @Prop @Watch('changeCurrentItems') currentItems:string[] = [] + @Prop @Watch('changeCurrentItems') currentItems:string[] = []; + @State preCurrentItemsLength:number = 0 aboutToAppear(){ //@ts-ignore @@ -43,15 +44,20 @@ export default struct DeductedPopup { if(this.currentIndex == 1){ this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) } + this.preCurrentItemsLength = this.currentItems.length } changeCurrentItems(){ - console.info('popup',JSON.stringify(this.currentItems)); - //@ts-ignore - this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); - this.currentIndex = this.defaultTabIndex - if(this.currentIndex == 1){ - this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) + if(this.currentItems?.length && (this.currentItems?.length >= this.preCurrentItemsLength)){ + //@ts-ignore + this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); + this.currentIndex = this.defaultTabIndex + if(this.currentIndex == 1){ + this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) + } + this.preCurrentItemsLength = this.currentItems.length + }else{ + this.preCurrentItemsLength = 0 } } diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 70e9b60b..4d9f71b0 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -202,7 +202,9 @@ export default class Judge { if (udpIndex % 5 === 0) { handDistance(); } - }) + }); + + // this.checkExamIsEnd() //监听远程结束考试 globalThis.udpEvent.onEndExam(async ()=>{ @@ -597,9 +599,11 @@ export default class Judge { }, {isDelay: true}) } } - this.deductedPopShowTimer = setTimeout(()=>{ - this.judgeUI.isDeductedPopShow = false - },(param512[5] || 0) * 1000) + if(!this.judgeUI.isProjectIn){ + this.deductedPopShowTimer = setTimeout(()=>{ + this.judgeUI.isDeductedPopShow = false + },(param512[5] || 0) * 1000) + } judgeUI.projectsObj[xmdm].isEnd = true; break; } @@ -892,6 +896,7 @@ export default class Judge { if(totalScore >= passingGrade && !isEndTip) { if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) { if(param512[7] != 0){ + clearTimeout(this.deductedPopShowTimer) avPlayer.playAudio(['voice/综合评判.mp3']) this.judgeUI.isDeductedPopShow = true this.judgeUI.defaultTabIndex = 1 @@ -948,6 +953,8 @@ export default class Judge { if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) { if(param512[7] != 0){ + clearTimeout(this.deductedPopShowTimer) + this.judgeUI.isDeductedPopShow = false avPlayer.playAudio(['voice/综合评判.mp3']) this.judgeUI.isDeductedPopShow = true this.judgeUI.defaultTabIndex = 1