feat: 断点续考specialkf修改
This commit is contained in:
		
							parent
							
								
									0832262cd7
								
							
						
					
					
						commit
						dc72d33536
					
				| @ -189,6 +189,7 @@ export async function uploadExamMileage(params) { | |||||||
|                       <lsh>${params.lsh}<lsh> |                       <lsh>${params.lsh}<lsh> | ||||||
|                       <kskssj>${params.examinationRoomId}<kskssj> |                       <kskssj>${params.examinationRoomId}<kskssj> | ||||||
|                       <kslc>${params.kslc}<kslc> |                       <kslc>${params.kslc}<kslc> | ||||||
|  |                       <specialkf>${params.specialkf}<specialkf> | ||||||
|                     </body> |                     </body> | ||||||
|                 </uploadExamMileageReq>`,
 |                 </uploadExamMileageReq>`,
 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|  | |||||||
| @ -442,7 +442,7 @@ struct Index { | |||||||
|         const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || [] |         const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || [] | ||||||
|         const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || [] |         const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || [] | ||||||
|         if (judgeConfigObj['432'] == 2 || examSubject == 2) { |         if (judgeConfigObj['432'] == 2 || examSubject == 2) { | ||||||
|           //TODO 带项目带里程 | 
 | ||||||
|           if (ddxkKsxmArr?.length) { |           if (ddxkKsxmArr?.length) { | ||||||
|             //断点续考 |             //断点续考 | ||||||
|             ddxkKsxmArr.forEach(xmdm => { |             ddxkKsxmArr.forEach(xmdm => { | ||||||
| @ -455,6 +455,8 @@ struct Index { | |||||||
|             }) |             }) | ||||||
|             this.ddxkKsxmArr = ddxkKsxmArr |             this.ddxkKsxmArr = ddxkKsxmArr | ||||||
|           } |           } | ||||||
|  |           this.specialkf = examItemsArrs[4]; | ||||||
|  |           this.yklc = Number(examItemsArrs[1]) || 0 | ||||||
|         } |         } | ||||||
|         //扣分续考 |         //扣分续考 | ||||||
|         ddxkKfArr.forEach((kf) => { |         ddxkKfArr.forEach((kf) => { | ||||||
| @ -480,6 +482,7 @@ struct Index { | |||||||
|         this.ddxkKfArr = ddxkKfArr |         this.ddxkKfArr = ddxkKfArr | ||||||
|         this.ddxkTime = Date.parse(startTime); |         this.ddxkTime = Date.parse(startTime); | ||||||
|         this.isDdxk = true |         this.isDdxk = true | ||||||
|  | 
 | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -572,7 +575,7 @@ struct Index { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // 上传考试里程 |   // 上传考试里程 | ||||||
|   async uploadMileage() { |   async uploadMileage(specialkf) { | ||||||
|     if (!globalThis.singlePlay) { |     if (!globalThis.singlePlay) { | ||||||
|       const {lsh,startExamTime:kskssj,jl:kslc} = this |       const {lsh,startExamTime:kskssj,jl:kslc} = this | ||||||
|       const { carId ,examinationRoomId} = globalThis.carInfo; |       const { carId ,examinationRoomId} = globalThis.carInfo; | ||||||
| @ -581,7 +584,9 @@ struct Index { | |||||||
|         examinationRoomId, |         examinationRoomId, | ||||||
|         lsh, |         lsh, | ||||||
|         kskssj, |         kskssj, | ||||||
|         kslc |         //考试里程,单位cm | ||||||
|  |         kslc:kslc * 100, | ||||||
|  |         specialkf | ||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| @ -1443,4 +1448,8 @@ struct Index { | |||||||
|   @State errorMsg: string = '' |   @State errorMsg: string = '' | ||||||
|   @State isErrorMsgEnd: boolean = false |   @State isErrorMsgEnd: boolean = false | ||||||
|   @State disConnectErrorOpen: boolean = false |   @State disConnectErrorOpen: boolean = false | ||||||
|  |   //开始考试特殊标记 | ||||||
|  |   @State specialkf:string = '' | ||||||
|  |   //已考里程 | ||||||
|  |   @State yklc:number = 0 | ||||||
| } | } | ||||||
|  | |||||||
| @ -468,6 +468,8 @@ export default class Judge { | |||||||
|   //所有的科目考试项目(大车&小车)
 |   //所有的科目考试项目(大车&小车)
 | ||||||
|   private testKmItems: any |   private testKmItems: any | ||||||
|   private plcData: any |   private plcData: any | ||||||
|  |   //特殊扣分标记
 | ||||||
|  |   private specialkf:string = '' | ||||||
|   // 获取plc数据
 |   // 获取plc数据
 | ||||||
|   getPlcData = async (plc: string) => { |   getPlcData = async (plc: string) => { | ||||||
|     const {fileLog,mndgStr,rmndg} = this; |     const {fileLog,mndgStr,rmndg} = this; | ||||||
| @ -600,6 +602,12 @@ export default class Judge { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     const {code} = await this.sendWriteObjectOut(data, filePath) |     const {code} = await this.sendWriteObjectOut(data, filePath) | ||||||
|  | 
 | ||||||
|  |     //科三 & 432=3
 | ||||||
|  |     if(examSubject == 3 && this.judgeUI.judgeConfigObj['432'] == 2){ | ||||||
|  |       this.judgeUI.uploadMileage() | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     if (code === 2300007) { |     if (code === 2300007) { | ||||||
|       this.isJudgeDisConnect = true; |       this.isJudgeDisConnect = true; | ||||||
|     } |     } | ||||||
| @ -833,15 +841,15 @@ export default class Judge { | |||||||
|           xmdm: xmdm * 1, kfdm |           xmdm: xmdm * 1, kfdm | ||||||
|         } |         } | ||||||
|       })) : [], |       })) : [], | ||||||
|       //TODO 已考里程待修改
 |       yklc: judgeUI.yklc, | ||||||
|       yklc: 0, |  | ||||||
|       special: [], |       special: [], | ||||||
|       //TODO 科目三参数临时写死
 |  | ||||||
|       sczb: (sczb === undefined || sczb == 0) ? 0 : 1, |       sczb: (sczb === undefined || sczb == 0) ? 0 : 1, | ||||||
|       sczbkf: kfdm, |       sczbkf: kfdm, | ||||||
|       dmndg: false, |       dmndg: false, | ||||||
|       mfxx: false, |       mfxx: false, | ||||||
|       mfxxn: false |       mfxxn: false, | ||||||
|  |       //科目三特殊扣分项
 | ||||||
|  |       specialkf:judgeUI.specialkf, | ||||||
|     } |     } | ||||||
|     console.info(judgeTag, '5.获取开始考试数据完成') |     console.info(judgeTag, '5.获取开始考试数据完成') | ||||||
|     return beginInfo |     return beginInfo | ||||||
| @ -1817,6 +1825,7 @@ export default class Judge { | |||||||
|       this.handleRealExam(strData, callBack) |       this.handleRealExam(strData, callBack) | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|     await examJudgeSetPerformCallback(async (info) => { |     await examJudgeSetPerformCallback(async (info) => { | ||||||
|       console.info('评判实时数据', info) |       console.info('评判实时数据', info) | ||||||
|       const performInfo = JSON.parse(info) |       const performInfo = JSON.parse(info) | ||||||
| @ -1828,6 +1837,11 @@ export default class Judge { | |||||||
|       this.judgeUI.jl = jl |       this.judgeUI.jl = jl | ||||||
|       //TODO 待优化 跨组件传值不生效
 |       //TODO 待优化 跨组件传值不生效
 | ||||||
|       globalThis.laneData = performInfo.lane; |       globalThis.laneData = performInfo.lane; | ||||||
|  |       //特殊扣分标记上传中心
 | ||||||
|  |       if(performInfo.specialkf !== this.specialkf){ | ||||||
|  |         this.judgeUI.uploadMileage(performInfo.specialkf) | ||||||
|  |         this.specialkf = performInfo.specialkf | ||||||
|  |       } | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|     // 3.开始考试
 |     // 3.开始考试
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user