feat:杭州&济南优化
This commit is contained in:
		
							parent
							
								
									daadbf868b
								
							
						
					
					
						commit
						56f6a671eb
					
				| @ -304,9 +304,12 @@ struct Index { | |||||||
|         this.projectsObj[no2*1] = currentProject |         this.projectsObj[no2*1] = currentProject | ||||||
|         this.projectsCenterObj[txt2] = currentProject |         this.projectsCenterObj[txt2] = currentProject | ||||||
|         this.projects.push(currentProject); |         this.projects.push(currentProject); | ||||||
|  |         console.info('surenjun kStringArr',JSON.stringify(kStringArr)) | ||||||
| 
 | 
 | ||||||
|         //真实监管下发考试项目 |         //真实监管下发考试项目 | ||||||
|         if(isInExam && !kStringArr.includes(txt2)){ |         if(isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2+''))){ | ||||||
|  |           console.info('surenjun =>',txt2) | ||||||
|  |           console.info('surenjun => no2',no2) | ||||||
|           this.projectsObj[no2*1].type = '3' |           this.projectsObj[no2*1].type = '3' | ||||||
|           this.projectsObj[no2*1].isUpload = true |           this.projectsObj[no2*1].isUpload = true | ||||||
|           this.projectsObj[no2*1].isEnd = true |           this.projectsObj[no2*1].isEnd = true | ||||||
| @ -806,7 +809,7 @@ struct Index { | |||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|           Column() { |           Column() { | ||||||
|             if (this.examSubject == 3 && this.judgeConfigObj['342'] == '0') { |             if (this.getIsManualKf()) { | ||||||
|               Row() { |               Row() { | ||||||
|                 Row() { |                 Row() { | ||||||
|                 } |                 } | ||||||
| @ -1218,6 +1221,22 @@ struct Index { | |||||||
|     return (type == '3' || type == '4') ? `${projectName}_red` : `${projectName}_green`; |     return (type == '3' || type == '4') ? `${projectName}_red` : `${projectName}_green`; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |   // 获取是否能进行人工评判 | ||||||
|  |   getIsManualKf = () =>{ | ||||||
|  |     const {examSubject} = this; | ||||||
|  |     if(examSubject == 3){ | ||||||
|  |       //杭州训练模式不允许人工评判 | ||||||
|  |       if(globalThis.singlePlay &&  this.judgeConfigObj['211'] == 'zjhz'){ | ||||||
|  |         return false | ||||||
|  |       } | ||||||
|  |       if(this.judgeConfigObj['342'] == '0'){ | ||||||
|  |         return true | ||||||
|  |       } | ||||||
|  |     }else{ | ||||||
|  |       return false | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   scroller: Scroller = new Scroller() |   scroller: Scroller = new Scroller() | ||||||
|   //页面通用字体大小 |   //页面通用字体大小 | ||||||
|   @State wayno: number = 0 |   @State wayno: number = 0 | ||||||
|  | |||||||
| @ -435,6 +435,11 @@ struct UserInfo { | |||||||
|             that.isBoardPrePareSetPopupOpen = true; |             that.isBoardPrePareSetPopupOpen = true; | ||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|  |           //398参数为1 第二场考试上车准备不考 | ||||||
|  |           if(sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1' && this.currentUser.kssycs == '1'){ | ||||||
|  |             that.isBoardPrePareSetPopupOpen = false; | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|           // 车上没有缺考功能 |           // 车上没有缺考功能 | ||||||
|           if (sys.v_no === '770') { |           if (sys.v_no === '770') { | ||||||
|             that.systemParam.Param770Str = sys.v_value; |             that.systemParam.Param770Str = sys.v_value; | ||||||
|  | |||||||
| @ -127,7 +127,13 @@ export default struct DeductedPopup { | |||||||
|     const index = this.currentIndex ? this.currentUniversalPageIndex : this.currentPageIndex; |     const index = this.currentIndex ? this.currentUniversalPageIndex : this.currentPageIndex; | ||||||
|     const mark = this.universalMarkRules[index * 7 + this.selectedLine]; |     const mark = this.universalMarkRules[index * 7 + this.selectedLine]; | ||||||
|     const {judgeConfigObj,kssycs,avPlayer,judgeTask} = this; |     const {judgeConfigObj,kssycs,avPlayer,judgeTask} = this; | ||||||
|     this.kfdmArr.push({ xmdm: 1, kfdm: mark.markserial, markreal: mark.markreal, markcatalog: mark.markcatalog ,score:mark.score}) |     this.kfdmArr.push({ | ||||||
|  |       xmdm: 1, | ||||||
|  |       kfdm: mark.markserial, | ||||||
|  |       markreal: mark.markreal, | ||||||
|  |       markcatalog: mark.markcatalog , | ||||||
|  |       score:mark.score | ||||||
|  |     }) | ||||||
|     const kfdmArr = this.kfdmArr |     const kfdmArr = this.kfdmArr | ||||||
| 
 | 
 | ||||||
|     //计算总扣分 |     //计算总扣分 | ||||||
|  | |||||||
| @ -1,4 +1,6 @@ | |||||||
| import {MarkRule} from '../../judgeSDK/api/judgeSDK' | import {MarkRule} from '../../judgeSDK/api/judgeSDK' | ||||||
|  | import EndPoPup from './EndPopup'; | ||||||
|  | 
 | ||||||
| interface SEL{ | interface SEL{ | ||||||
|   fontColor:string |   fontColor:string | ||||||
|   bgColor:string |   bgColor:string | ||||||
| @ -25,6 +27,7 @@ export default struct  DeductedPopup { | |||||||
|   @Prop defaultTabIndex:number = 0 |   @Prop defaultTabIndex:number = 0 | ||||||
|   @State lineBg:Array<string> = ['#4D4136','#26231E'] |   @State lineBg:Array<string> = ['#4D4136','#26231E'] | ||||||
|   @State selectedLine:number = undefined |   @State selectedLine:number = undefined | ||||||
|  |   @State endPopupVisible:boolean = false | ||||||
|   private  closePopup:Function = ()=> {} |   private  closePopup:Function = ()=> {} | ||||||
|   private  confirmMark:Function = (itemno:number,serial:string) => {} |   private  confirmMark:Function = (itemno:number,serial:string) => {} | ||||||
|   @State selectedLineStyle:SEL = { |   @State selectedLineStyle:SEL = { | ||||||
| @ -110,7 +113,7 @@ export default struct  DeductedPopup { | |||||||
|                 Row(){ |                 Row(){ | ||||||
|                   Image($rawfile(`judge/km3/zuo_nor.png`)).height(15).margin({left:20,top:0}) |                   Image($rawfile(`judge/km3/zuo_nor.png`)).height(15).margin({left:20,top:0}) | ||||||
|                   Text('上一页'){}.fontColor('#FFF').fontSize(this.fontSize) |                   Text('上一页'){}.fontColor('#FFF').fontSize(this.fontSize) | ||||||
|                 }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}) |                 }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15}) | ||||||
|                 .onClick(()=>{this.goPage(0)}) |                 .onClick(()=>{this.goPage(0)}) | ||||||
|               } |               } | ||||||
| 
 | 
 | ||||||
| @ -120,7 +123,7 @@ export default struct  DeductedPopup { | |||||||
|                 Row(){ |                 Row(){ | ||||||
|                   Text('下一页'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:30}) |                   Text('下一页'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:30}) | ||||||
|                   Image($rawfile(`judge/km3/you_nor.png`)).height(15).margin({right:6,top:0}) |                   Image($rawfile(`judge/km3/you_nor.png`)).height(15).margin({right:6,top:0}) | ||||||
|                 }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}) |                 }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}).margin({right:15}) | ||||||
|                 .onClick(()=>{this.goPage(1)}) |                 .onClick(()=>{this.goPage(1)}) | ||||||
|               } |               } | ||||||
| 
 | 
 | ||||||
| @ -128,9 +131,7 @@ export default struct  DeductedPopup { | |||||||
|                 Text('扣  分'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:35}) |                 Text('扣  分'){}.fontColor('#FFF').fontSize(this.fontSize).padding({left:35}) | ||||||
|               }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}) |               }.width(120).height(60).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Center).backgroundImage($rawfile(`judge/km3/button_nor.png`)).backgroundImageSize({width:'100%',height:'100%'}) | ||||||
|               .onClick(()=>{ |               .onClick(()=>{ | ||||||
|                 const index = this.currentIndex ? this.currentUniversalPageIndex: this.currentPageIndex; |                 this.endPopupVisible = true | ||||||
|                 const mark = this.universalMarkRules[index * 7 + this.selectedLine] |  | ||||||
|                 mark && this.confirmMark(mark.itemno,mark.markserial) |  | ||||||
|               }) |               }) | ||||||
|             } |             } | ||||||
|           }.width('100%').justifyContent(FlexAlign.SpaceBetween) |           }.width('100%').justifyContent(FlexAlign.SpaceBetween) | ||||||
| @ -151,6 +152,20 @@ export default struct  DeductedPopup { | |||||||
|         } |         } | ||||||
|       }.width(1200).height(620).position({x:30,y:315}).backgroundColor('#E6E3DF').padding({top:15,bottom:15,left:25,right:25}).borderRadius(20) |       }.width(1200).height(620).position({x:30,y:315}).backgroundColor('#E6E3DF').padding({top:15,bottom:15,left:25,right:25}).borderRadius(20) | ||||||
|       // Row(){}.width(100).height(100).position({y:'85%',x:'50%'}).backgroundImage($rawfile('judge/km3/close_nor.png')).backgroundImageSize({width:'100%',height:'100%'}) |       // Row(){}.width(100).height(100).position({y:'85%',x:'50%'}).backgroundImage($rawfile('judge/km3/close_nor.png')).backgroundImageSize({width:'100%',height:'100%'}) | ||||||
|  |       //结束考试弹窗 | ||||||
|  |       if (this.endPopupVisible) { | ||||||
|  |         EndPoPup({ | ||||||
|  |           title: '确定扣分吗?', | ||||||
|  |           cancelFn: () => { | ||||||
|  |             this.endPopupVisible = false; | ||||||
|  |           }, | ||||||
|  |           confirmFn: async () => { | ||||||
|  |             const index = this.currentIndex ? this.currentUniversalPageIndex: this.currentPageIndex; | ||||||
|  |             const mark = this.universalMarkRules[index * 7 + this.selectedLine] | ||||||
|  |             mark && this.confirmMark(mark.itemno,mark.markserial) | ||||||
|  |           } | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|     }.width('100%').height('100%').position({y:0}).onClick(()=>{this.closePopup()}) |     }.width('100%').height('100%').position({y:0}).onClick(()=>{this.closePopup()}) | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -12,13 +12,13 @@ export default struct  EndPopup { | |||||||
|   build(){ |   build(){ | ||||||
|     Column(){ |     Column(){ | ||||||
|       Column(){ |       Column(){ | ||||||
|         Text(this.title).fontSize(36).margin({bottom:20}) |         Text(this.title).fontSize(32).margin({bottom:20}) | ||||||
|         Row(){}.height(100) |         Row(){}.height(100) | ||||||
|         Row(){ |         Row(){ | ||||||
|           Text('取消').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(95).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn) |           Text('取消').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(230).height(80).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn) | ||||||
|           Text('确定').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(95).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn) |           Text('确定').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(230).height(80).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn) | ||||||
|         } |         } | ||||||
|       }.width('75%').height('70%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'12%',x:'12.5%'}).justifyContent(FlexAlign.Center) |       }.width('50%').height('50%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'25%',x:'25%'}).justifyContent(FlexAlign.Center) | ||||||
| 
 | 
 | ||||||
|     }.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)') |     }.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)') | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -10,8 +10,8 @@ export default struct LoadingPopup { | |||||||
|     Column(){ |     Column(){ | ||||||
|       Column(){ |       Column(){ | ||||||
|         Image($rawfile('judge/loading-car.gif')).width(250).margin({top:20,bottom:20}) |         Image($rawfile('judge/loading-car.gif')).width(250).margin({top:20,bottom:20}) | ||||||
|         Text(this.title).fontSize(32).margin({top:70}) |         Text(this.title).fontSize(32).margin({top:15}) | ||||||
|       }.width('70%').height('70%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'15%',x:'15%'}).justifyContent(FlexAlign.Center) |       }.width('45%').height('50%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'27.5%',x:'25%'}).justifyContent(FlexAlign.Center) | ||||||
| 
 | 
 | ||||||
|     }.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)') |     }.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)') | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -176,16 +176,16 @@ export default class Judge { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const {examSubject,projectsObj} = this.judgeUI |     const {examSubject,projectsObj} = this.judgeUI | ||||||
|     if(examSubject == 3){ |     // if(examSubject == 3){
 | ||||||
|       //不做模拟灯光,需要做上车准备 =>(请上车准备)
 |     //   //不做模拟灯光,需要做上车准备 =>(请上车准备)
 | ||||||
|       if(projectsObj[41]?.type == 3 && projectsObj[1]?.type != 3){ |     //   if(projectsObj[41]?.type == 3 && projectsObj[1]?.type != 3){
 | ||||||
|         avPlayer.playAudio(['voice/上车准备.mp3']) |     //     avPlayer.playAudio(['voice/上车准备.mp3'])
 | ||||||
|       } |     //   }
 | ||||||
|       //不做模拟灯光,不做上车准备 =>(请起步,完成考试)
 |     //   //不做模拟灯光,不做上车准备 =>(请起步,完成考试)
 | ||||||
|       if(projectsObj[41]?.type == 3 && projectsObj[1]?.type == 3){ |     //   if(projectsObj[41]?.type == 3 && projectsObj[1]?.type == 3){
 | ||||||
|         avPlayer.playAudio(['voice/402001.mp3']) |     //     avPlayer.playAudio(['voice/402001.mp3'])
 | ||||||
|       } |     //   }
 | ||||||
|     } |     // }
 | ||||||
| 
 | 
 | ||||||
|     this.judgeUI.draw = true |     this.judgeUI.draw = true | ||||||
|     // 处理轨迹plc信息
 |     // 处理轨迹plc信息
 | ||||||
| @ -406,7 +406,6 @@ export default class Judge { | |||||||
|         this.xmmcStr = '无'; |         this.xmmcStr = '无'; | ||||||
|         this.xmmcCode = ''; |         this.xmmcCode = ''; | ||||||
|         this.xmdm = ''; |         this.xmdm = ''; | ||||||
|         this.judgeUI.isDeductedPopShow = false |  | ||||||
|         this.judgeUI.currentXmdm = undefined; |         this.judgeUI.currentXmdm = undefined; | ||||||
|         break; |         break; | ||||||
|       } |       } | ||||||
| @ -555,7 +554,10 @@ export default class Judge { | |||||||
|       //     kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true)
 |       //     kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true)
 | ||||||
|       //   }
 |       //   }
 | ||||||
|       // }
 |       // }
 | ||||||
|         setTimeout(()=>{if(param512[7] != 0){this.judgeUI.isDeductedPopShow = true}},200) |         setTimeout(()=>{if(param512[7] != 0){ | ||||||
|  |           clearTimeout(this.deductedPopShowTimer) | ||||||
|  |           this.judgeUI.isDeductedPopShow = true | ||||||
|  |         }},200) | ||||||
|       //项目已考不上传监管信息
 |       //项目已考不上传监管信息
 | ||||||
|         if (!isEnd) { |         if (!isEnd) { | ||||||
|           judgeTask.addTask(async () => { |           judgeTask.addTask(async () => { | ||||||
| @ -590,6 +592,9 @@ export default class Judge { | |||||||
|             }, {isDelay: true}) |             }, {isDelay: true}) | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|  |         this.deductedPopShowTimer = setTimeout(()=>{ | ||||||
|  |           this.judgeUI.isDeductedPopShow = false | ||||||
|  |         },(param512[5] || 0) * 1000) | ||||||
|         judgeUI.projectsObj[xmdm].isEnd = true; |         judgeUI.projectsObj[xmdm].isEnd = true; | ||||||
|         break; |         break; | ||||||
|       } |       } | ||||||
| @ -930,7 +935,7 @@ export default class Judge { | |||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             //考试合格自动退出
 |             //考试合格自动退出
 | ||||||
|             if(examSubject == 3 && (param302 == 4)){ |             if(examSubject == 3 && (param302 == 4 || param302 == 7) || param302 == 8){ | ||||||
|               await examJudgeEndExam() |               await examJudgeEndExam() | ||||||
|               this.isExamEnd = true |               this.isExamEnd = true | ||||||
|               return |               return | ||||||
| @ -1564,7 +1569,7 @@ export default class Judge { | |||||||
|       const bytes = await this.getMessageHeartbeat(); |       const bytes = await this.getMessageHeartbeat(); | ||||||
|       bytes && globalThis.judgeUdp.send(bytes) |       bytes && globalThis.judgeUdp.send(bytes) | ||||||
| 
 | 
 | ||||||
|     }, 200) |     }, 10) | ||||||
| 
 | 
 | ||||||
|     globalThis.judgeTimer = judgeTimer; |     globalThis.judgeTimer = judgeTimer; | ||||||
|   } |   } | ||||||
| @ -1664,6 +1669,7 @@ export default class Judge { | |||||||
|   private tempData: any |   private tempData: any | ||||||
|   private performInfo: any |   private performInfo: any | ||||||
|   private isEndTip:boolean = false; |   private isEndTip:boolean = false; | ||||||
|  |   private deductedPopShowTimer:number = 0; | ||||||
|   private ksjs: { |   private ksjs: { | ||||||
|     // 累计前进距离
 |     // 累计前进距离
 | ||||||
|     qjjl: number, |     qjjl: number, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user