feat:评判相关更新

This commit is contained in:
surenjun 2025-01-03 13:08:00 +08:00
parent 8b915c2465
commit 619a67906a
3 changed files with 30 additions and 11 deletions

View File

@ -199,6 +199,12 @@ struct Index {
const {xmdm, kfdm} = kf const {xmdm, kfdm} = kf
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]; const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`];
const currentProject = this.projectsObj[xmdm] const currentProject = this.projectsObj[xmdm]
// 过滤考前绕车一周上车准备的扣分
if(sczb == 1 && xmdm == '1'){
return
}
this.kfArr.push({ this.kfArr.push({
//扣分项目名称 //扣分项目名称
xmmcStr: currentProject.name, xmmcStr: currentProject.name,

View File

@ -34,7 +34,8 @@ export default struct DeductedPopup {
} }
@Prop defaultTabIndex:number = 0 @Prop defaultTabIndex:number = 0
@Prop @Watch('changeCurrentItems') currentItems:string[] = [] @Prop @Watch('changeCurrentItems') currentItems:string[] = [];
@State preCurrentItemsLength:number = 0
aboutToAppear(){ aboutToAppear(){
//@ts-ignore //@ts-ignore
@ -43,16 +44,21 @@ export default struct DeductedPopup {
if(this.currentIndex == 1){ if(this.currentIndex == 1){
this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 )
} }
this.preCurrentItemsLength = this.currentItems.length
} }
changeCurrentItems(){ changeCurrentItems(){
console.info('popup',JSON.stringify(this.currentItems)); if(this.currentItems?.length && (this.currentItems?.length >= this.preCurrentItemsLength)){
//@ts-ignore //@ts-ignore
this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + '')));
this.currentIndex = this.defaultTabIndex this.currentIndex = this.defaultTabIndex
if(this.currentIndex == 1){ if(this.currentIndex == 1){
this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 )
} }
this.preCurrentItemsLength = this.currentItems.length
}else{
this.preCurrentItemsLength = 0
}
} }
//上一页 下一页 //上一页 下一页

View File

@ -202,7 +202,9 @@ export default class Judge {
if (udpIndex % 5 === 0) { if (udpIndex % 5 === 0) {
handDistance(); handDistance();
} }
}) });
// this.checkExamIsEnd()
//监听远程结束考试 //监听远程结束考试
globalThis.udpEvent.onEndExam(async ()=>{ globalThis.udpEvent.onEndExam(async ()=>{
@ -597,9 +599,11 @@ export default class Judge {
}, {isDelay: true}) }, {isDelay: true})
} }
} }
if(!this.judgeUI.isProjectIn){
this.deductedPopShowTimer = setTimeout(()=>{ this.deductedPopShowTimer = setTimeout(()=>{
this.judgeUI.isDeductedPopShow = false this.judgeUI.isDeductedPopShow = false
},(param512[5] || 0) * 1000) },(param512[5] || 0) * 1000)
}
judgeUI.projectsObj[xmdm].isEnd = true; judgeUI.projectsObj[xmdm].isEnd = true;
break; break;
} }
@ -892,6 +896,7 @@ export default class Judge {
if(totalScore >= passingGrade && !isEndTip) { if(totalScore >= passingGrade && !isEndTip) {
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) { if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
if(param512[7] != 0){ if(param512[7] != 0){
clearTimeout(this.deductedPopShowTimer)
avPlayer.playAudio(['voice/综合评判.mp3']) avPlayer.playAudio(['voice/综合评判.mp3'])
this.judgeUI.isDeductedPopShow = true this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1 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 (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
if(param512[7] != 0){ if(param512[7] != 0){
clearTimeout(this.deductedPopShowTimer)
this.judgeUI.isDeductedPopShow = false
avPlayer.playAudio(['voice/综合评判.mp3']) avPlayer.playAudio(['voice/综合评判.mp3'])
this.judgeUI.isDeductedPopShow = true this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1 this.judgeUI.defaultTabIndex = 1