错误修改
This commit is contained in:
		
							parent
							
								
									365199bf28
								
							
						
					
					
						commit
						c693ccd5f8
					
				| @ -10,7 +10,6 @@ | ||||
|   "packages": { | ||||
|     "libjudgesdk.so@src/cpp/libJudgeSdk": { | ||||
|       "name": "libjudgesdk.so", | ||||
|       "version": "1.0.0", | ||||
|       "resolved": "src/cpp/libJudgeSdk", | ||||
|       "registryType": "local" | ||||
|     } | ||||
|  | ||||
| @ -112,7 +112,7 @@ export interface CarInfoType { | ||||
|   examinationRoomId?: string; | ||||
|   plateNo?: string; | ||||
|   carNo?: string; | ||||
|   examSubject: string; | ||||
|   examSubject?: string; | ||||
|   isNeedCheck?: string; | ||||
|   udpAddress?: string | ||||
|   messagePort?: string | ||||
|  | ||||
| @ -120,7 +120,6 @@ struct Index { | ||||
|   @State isDeductedPopShow: boolean = false | ||||
|   @State isAmplifyPopShow: boolean = false | ||||
|   @State amplifiedImgIndex: number = 0 | ||||
|   judge: Judge | ||||
|   //行驶距离 | ||||
|   @State jl: number = 0 | ||||
|   //应考里程 | ||||
| @ -162,6 +161,7 @@ struct Index { | ||||
|   @State isErrorMsgEnd: boolean = false | ||||
|   @State disConnectErrorOpen: boolean = false | ||||
|   public context = getContext(this) as common.UIAbilityContext; | ||||
|   private judge: Judge = new Judge(this) | ||||
| 
 | ||||
|   async aboutToDisappear() { | ||||
|     clearInterval(this.mileageTimer) | ||||
| @ -185,8 +185,7 @@ struct Index { | ||||
|     //断点续考 | ||||
|     await this.goDdxkItems() | ||||
|     //初始化评判 | ||||
|     const judge = await this.initJudge(); | ||||
|     this.judge = judge | ||||
|     await this.initJudge(); | ||||
|   } | ||||
| 
 | ||||
|   //初始化相关数据库表 | ||||
| @ -522,16 +521,12 @@ struct Index { | ||||
| 
 | ||||
|   // 评判相关初始化 | ||||
|   async initJudge() { | ||||
|     const JUDGEUI: JudgeUI = this; | ||||
|     const judge = new Judge(JUDGEUI); | ||||
|     // await judge.init<typeof Index>() | ||||
|     await judge.onJudgeFn(async (judgeData: JudgeCallBacData) => { | ||||
|       // const { xmmcStr, carztStr, kfArr } = judgeData; | ||||
|     ; | ||||
|     await this.judge.onJudgeFn(async (judgeData: JudgeCallBacData) => { | ||||
|       this.xmmcStr = judgeData.xmmcStr || ""; | ||||
|       this.carztStr = judgeData.carztStr || ""; | ||||
|       this.kfArr = judgeData.kfArr || []; | ||||
|     }); | ||||
|     return judge | ||||
|   } | ||||
| 
 | ||||
|   // 断点续考判断 | ||||
|  | ||||
| @ -339,7 +339,7 @@ export default struct DeductedPopup { | ||||
|       } | ||||
| 
 | ||||
|       if (mark.itemno == 1 && Number(mark.markserial) > 100 && Number(mark.markserial) < 200) { | ||||
|         this.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = { | ||||
|         Reflect.set(this.markRuleListObj, `${mark.itemno}_${mark.markserial}`, { | ||||
|           itemno: tempObj.itemno, | ||||
|           markcatalog: tempObj.markcatalog, | ||||
|           markshow: tempObj.markshow, | ||||
| @ -350,11 +350,9 @@ export default struct DeductedPopup { | ||||
|           OnlyOneKind: tempObj.OnlyOneKind, | ||||
|           NoCancelId: tempObj.NoCancelId, | ||||
|           GPS_SID: tempObj.GPS_SID, | ||||
|         }; | ||||
| 
 | ||||
|         }) | ||||
|         this.universalMarkRules.push(tempObj) | ||||
|       } | ||||
| 
 | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
|  | ||||
| @ -83,7 +83,7 @@ type GetDqxmStr = (xmdm: number) => string | ||||
| type TJudgeBeginObj = JudgeBeginObj | ||||
| 
 | ||||
| export default class Judge { | ||||
|   public plcStr!: string | ||||
|   public plcStr: string = "" | ||||
|   public judgeUI: JudgeUI | ||||
|   //获取科目三的评判初始化配置 | ||||
|   getKm3JudgeInitConfig: GetKm3JudgeInitConfig = async () => { | ||||
| @ -721,9 +721,9 @@ export default class Judge { | ||||
|         const cdsb: CDSBInfo = Reflect.get(itemInfoObj, cdsbKey); | ||||
|         const model = this.getModelData(`${examType}/${cdsb.modelKey}.txt`) | ||||
|         const temp: ItemInfo = { | ||||
|           xmdm: cdsb?.xmdm||0, | ||||
|           xmxh: cdsb?.xmxh||"", | ||||
|           model:model||"" | ||||
|           xmdm: cdsb?.xmdm || 0, | ||||
|           xmxh: cdsb?.xmxh || "", | ||||
|           model: model || "" | ||||
|         } | ||||
|         return temp | ||||
|       }) | ||||
| @ -736,14 +736,14 @@ export default class Judge { | ||||
|     }) | ||||
|     const initInfo: JudgeInitObj = { | ||||
|       sdkver: await examJudgeVersion(), | ||||
|       appver: AppStorage.get<BaseInfoType>('baseInfo')?.version||"", | ||||
|       kskm: Number(carInfo?.examSubject||"2"), | ||||
|       kchp: carInfo?.plateNo||"", | ||||
|       kchm: Number(carInfo?.carId||""), | ||||
|       appver: AppStorage.get<BaseInfoType>('baseInfo')?.version || "", | ||||
|       kskm: Number(carInfo?.examSubject || "2"), | ||||
|       kchp: carInfo?.plateNo || "", | ||||
|       kchm: Number(carInfo?.carId || ""), | ||||
|       kscx: carType, | ||||
|       cxcode: '1', | ||||
|       name: carName, | ||||
|       carmodel: this.getModelData(`${examType}/${carType}.txt`)||"", | ||||
|       carmodel: this.getModelData(`${examType}/${carType}.txt`) || "", | ||||
|       allitems, | ||||
|       iteminfo: [], | ||||
|       systemparm: systemparmArr, | ||||
| @ -772,7 +772,7 @@ export default class Judge { | ||||
|   getJudgeBeginData = async () => { | ||||
|     const examinerInfo = AppStorage.get<ExaminerInfoType>('examinerInfo') | ||||
|     // const code = examinerInfo.code | ||||
|     const examinerName = examinerInfo?.name||"" | ||||
|     const examinerName = examinerInfo?.name || "" | ||||
| 
 | ||||
|     let currentParams: RouteParamsType = router.getParams() as RouteParamsType; | ||||
|     const sczb = currentParams.sczb; | ||||
| @ -893,9 +893,9 @@ export default class Judge { | ||||
|           this.rmndg = 1 | ||||
|         } | ||||
|         this.judgeUI.currentXmdm = xmdm; | ||||
|         const xmmcStr = project.name||""; | ||||
|         const xmmcCode = project.projectCodeCenter||""; | ||||
|         const xmmcSingleCode = project.projectCode||""; | ||||
|         const xmmcStr = project.name || ""; | ||||
|         const xmmcCode = project.projectCodeCenter || ""; | ||||
|         const xmmcSingleCode = project.projectCode || ""; | ||||
|         const kmItem: KmItem = Reflect.get(this.kmItems, xmmcCode) | ||||
|         kmItem.status = 2; | ||||
|         this.xmmcStr = xmmcStr; | ||||
| @ -906,13 +906,13 @@ export default class Judge { | ||||
|         this.xmxh = xmxh; | ||||
|         this.judgeUI.isProjectIn = true | ||||
|         Reflect.set(this.judgeUI.projectsObj, xmdm, project) | ||||
|         Reflect.set(this.kmItems, xmmcCode||0, kmItem) | ||||
|         Reflect.set(this.kmItems, xmmcCode || 0, kmItem) | ||||
|         break; | ||||
| 
 | ||||
|     //项目结束 | ||||
|       case 2: { | ||||
|         const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) | ||||
|         const xmmcCode = project.projectCodeCenter||""; | ||||
|         const xmmcCode = project.projectCodeCenter || ""; | ||||
|         project.type = (xmjs.xmhg === 0 ? '4' : '3') | ||||
| 
 | ||||
|         //计算项目是否全部结束 | ||||
| @ -984,7 +984,7 @@ export default class Judge { | ||||
|         const xmdm = xmqx.xmdm; | ||||
|         const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) | ||||
|         // const examSubject = this.judgeUI.examSubject | ||||
|         const xmmcCode = project.projectCodeCenter||""; | ||||
|         const xmmcCode = project.projectCodeCenter || ""; | ||||
|         // const voiceCode = getKmProjectCancelVoice(examSubject, xmmcCode); | ||||
|         // avPlayer.playAudio([`voice/${voiceCode}.mp3`],true) | ||||
|         project.type = '1' | ||||
| @ -1017,7 +1017,7 @@ export default class Judge { | ||||
|         const xmdm = precast.xmdm | ||||
|         const xmxh = precast.xmxh | ||||
|         const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) | ||||
|         const xmmcCode = project.projectCodeCenter||"" | ||||
|         const xmmcCode = project.projectCodeCenter || "" | ||||
|         const projectCode = project.projectCode | ||||
|         // const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter; | ||||
|         // const xmmcSingleCode = judgeUI.projectsObj[xmdm].projectCode; | ||||
|  | ||||
| @ -16,7 +16,7 @@ export function chunkArr<T>(arr: T[], size: number): T[][] { | ||||
| } | ||||
| 
 | ||||
| //对象深拷贝 | ||||
| export function deepClone<T>(target: T): T { | ||||
| export function deepClone<T extends  Object>(target: T): T { | ||||
|   // 如果是对象,且不是原始值null | ||||
|   if (typeof target === 'object' && target !== null) { | ||||
|     // 创建容器 | ||||
|  | ||||
| @ -11,14 +11,12 @@ | ||||
|   "packages": { | ||||
|     "@ohos/crypto-js@2.0.3": { | ||||
|       "name": "@ohos/crypto-js", | ||||
|       "version": "2.0.3", | ||||
|       "integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==", | ||||
|       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/crypto-js/-/crypto-js-2.0.3.har", | ||||
|       "registryType": "ohpm" | ||||
|     }, | ||||
|     "@ohos/hypium@1.0.19": { | ||||
|       "name": "@ohos/hypium", | ||||
|       "version": "1.0.19", | ||||
|       "integrity": "sha512-cEjDgLFCm3cWZDeRXk7agBUkPqjWxUo6AQeiu0gEkb3J8ESqlduQLSIXeo3cCsm8U/asL7iKjF85ZyOuufAGSQ==", | ||||
|       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", | ||||
|       "registryType": "ohpm" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user