Compare commits
	
		
			No commits in common. "0f400c7467043aca77d3b91cf3dc9620e438acc4" and "d8be9c65401dff40153bc7f5f95d2b1f3d6d45b4" have entirely different histories.
		
	
	
		
			0f400c7467
			...
			d8be9c6540
		
	
		
| @ -1,5 +1,5 @@ | ||||
| { | ||||
|   "lockfileVersion": 2, | ||||
|   "lockfileVersion": 1, | ||||
|   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||||
|   "specifiers": {}, | ||||
|   "packages": {} | ||||
|  | ||||
| @ -174,7 +174,6 @@ export struct JudgePage { | ||||
|     builder: ConfirmDialog({ | ||||
|       text: "确认结束考试?", | ||||
|       onConfirm: async () => { | ||||
|         dConsole.log(JudgeTag, "点击确认结束") | ||||
|         if (this.isErrorMsgEnd) { | ||||
|           dConsole.log(JudgeTag, "router back1") | ||||
|           router.back() | ||||
|  | ||||
| @ -282,7 +282,6 @@ export class BaseJudge { | ||||
|     if (!judgeUI.singlePlay && that.isManual && !judgeUI.isAllProjectsEnd && judgeUI.totalScore >= judgeUI.passingScore) { | ||||
|       that.avPlayer?.playAudio(['voice/empty.mp3'], true, () => { | ||||
|         this.isUdpEnd = true | ||||
|         dConsole.log(JudgeTag, "考试结束自动退出1") | ||||
|         router.back(); | ||||
|       }) | ||||
|       return | ||||
| @ -310,27 +309,22 @@ export class BaseJudge { | ||||
|       } catch (e) { | ||||
|         console.info(JudgeTag, JSON.stringify(e)) | ||||
|       } | ||||
|       if (judgeUI.singlePlay) { | ||||
|         // 单机结束 | ||||
|         await this.endExam(judgeUI, that) | ||||
|       } else { | ||||
|         TheExamIsOver(judgeUI, that, async (res: WR) => { | ||||
|           dConsole.log(JudgeTag, ExamProcessDataTag, "考试结束接口完成", res) | ||||
|           const code = res.code!.toString() | ||||
|           if (code !== "1") { | ||||
|             that?.avPlayer?.playAudio(['voice/监管失败.mp3']) | ||||
|             judgeUI.errorMsg = decodeURIComponent(res?.message || "") | ||||
|             if (code.toString() === "2300028" || code.toString() === "2300007") { | ||||
|               judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' | ||||
|             } | ||||
|             judgeUI.generateExamRecordsDialogController.close(); | ||||
|             return | ||||
|           } else { | ||||
|             await this.endExam(judgeUI, that) | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|       TheExamIsOver(judgeUI, that, async (res: WR) => { | ||||
|         dConsole.log(JudgeTag, ExamProcessDataTag, "考试结束接口完成", res) | ||||
|         const code = res.code!.toString() | ||||
|         if (code !== "1") { | ||||
|           that?.avPlayer?.playAudio(['voice/监管失败.mp3']) | ||||
|           judgeUI.errorMsg = decodeURIComponent(res?.message || "") | ||||
| 
 | ||||
|           if (code.toString() === "2300028" || code.toString() === "2300007") { | ||||
|             judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' | ||||
|           } | ||||
|           judgeUI.generateExamRecordsDialogController.close(); | ||||
|           return | ||||
|         } else { | ||||
|           await this.endExam(judgeUI, that) | ||||
|         } | ||||
|       }) | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
| @ -418,7 +412,6 @@ export class BaseJudge { | ||||
|               if (judgeUI.kfArr.length - 1 === index) { | ||||
|                 that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { | ||||
|                   this.isUdpEnd = true | ||||
|                   dConsole.log(JudgeTag, "考试结束自动退出2") | ||||
|                   router.back(); | ||||
|                 }) | ||||
|                 throw new Error('End Loop') | ||||
| @ -427,7 +420,6 @@ export class BaseJudge { | ||||
|             } else { | ||||
|               that.avPlayer?.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { | ||||
|                 this.isUdpEnd = true | ||||
|                 dConsole.log(JudgeTag, "考试结束自动退出3") | ||||
|                 router.back(); | ||||
|               }) | ||||
|               throw new Error('End Loop') | ||||
| @ -441,7 +433,6 @@ export class BaseJudge { | ||||
|       that.avPlayer?.playAudio([voiceURL], true, () => { | ||||
|         setTimeout(() => { | ||||
|           this.isUdpEnd = true | ||||
|           dConsole.log(JudgeTag, "考试结束自动退出5") | ||||
|           router.back(); | ||||
|         }, param302 === "8" ? 3000 : 0) | ||||
|       }) | ||||
| @ -761,6 +752,7 @@ export class BaseJudge { | ||||
| 
 | ||||
|   async judgeEnd(judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) { | ||||
|     dConsole.info(JudgeTag, '收到远程结束考试消息3') | ||||
|     dConsole.closeProcessData() | ||||
|     const isAllProjectsEnd = judgeUI.isAllProjectsEnd | ||||
|     const examSubject = judgeUI.examSubject | ||||
|     const singlePlay = judgeUI.singlePlay | ||||
| @ -770,12 +762,9 @@ export class BaseJudge { | ||||
|     const passingScore = Number(judgeUI.passingScore) | ||||
|     const jl = judgeUI.jl | ||||
|     if (that.isExamEnd) { | ||||
|       dConsole.log("JudgeTag", "已经结束考试") | ||||
|       return | ||||
|     } | ||||
|     if (isManual) { | ||||
|       dConsole.log(JudgeTag, '收到远程结束考试消息5') | ||||
|       judgeUI.generateExamRecordsDialogController.close() | ||||
|       // 考试不合格 | ||||
|       await examJudgeEndExam() | ||||
|       that.isExamEnd = true | ||||
| @ -784,7 +773,7 @@ export class BaseJudge { | ||||
|       const param302: number = Reflect.get(judgeConfigObj, '302') | ||||
|       const param342: number = Reflect.get(judgeConfigObj, '342') | ||||
|       const param512: number[] = (Reflect.get(judgeConfigObj, '512') || '').split(','); | ||||
|       dConsole.log(JudgeTag, '收到远程结束考试消息4') | ||||
| 
 | ||||
|       //单机模式 | ||||
|       if (singlePlay) { | ||||
|         dConsole.info(JudgeTag + ' 单机模式结束 => ', isAllProjectsEnd) | ||||
|  | ||||
| @ -219,7 +219,6 @@ struct UserInfoPage { | ||||
|   ] | ||||
| 
 | ||||
|   async onPageShow() { | ||||
|     dConsole.closeProcessData() | ||||
|     this.avPlayer = new VoiceAnnounce(this.context); | ||||
|     this.isExamStart = false | ||||
|     this.startExam = false | ||||
| @ -1184,7 +1183,6 @@ struct UserInfoPage { | ||||
|               .onClick(() => { | ||||
|                 if ((this.systemParam.Param352Str == '1' && this.currentUser.kssycs == '1') || | ||||
|                   this.systemParam.Param770Str == '1') { | ||||
|                   dConsole.log(UserInfoTag, '不允许缺考') | ||||
|                   return | ||||
|                 } | ||||
|                 // this.qkFlag = true | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| // 日志向外暴露的方法 | ||||
| import worker from '@ohos.worker'; | ||||
| import { GlobalConfig, LogTag } from '../config'; | ||||
| import { GlobalConfig } from '../config'; | ||||
| import { LogWorkerMessage, ProcessDataEnumType, WorkerMessageType } from '../model/index'; | ||||
| import dayTs from './Date'; | ||||
| 
 | ||||
| @ -87,11 +87,12 @@ class logWorker { | ||||
| 
 | ||||
|   // 关闭过程数据写入 | ||||
|   closeProcessData() { | ||||
|     dConsole.log(LogTag, "关闭过程数据1") | ||||
|     let params: LogWorkerMessage = { | ||||
|       type: WorkerMessageType.CloseProcessData, | ||||
|     } | ||||
|     this.workerInstance?.postMessage(JSON.stringify(params)) | ||||
|     if (this.isLogEnabled === "1") { | ||||
|       this.workerInstance?.postMessage(JSON.stringify(params)) | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // 通用日志方法 | ||||
|  | ||||
| @ -33,7 +33,6 @@ workerPort.onmessage = (e: MessageEvents) => { | ||||
|   } | ||||
|   //   关闭过程数据 | ||||
|   if (result.type === WorkerMessageType.CloseProcessData) { | ||||
|     console.log(LogTag, "关闭过程数据") | ||||
|     CloseProcessData() | ||||
|   } | ||||
| } | ||||
| @ -114,13 +113,10 @@ async function processQueue() { | ||||
| 
 | ||||
| // 关闭过程数据 | ||||
| function CloseProcessData() { | ||||
|   if (fileFdArr.length > 0) { | ||||
|     console.log(LogTag, "有文件需要 关闭过程数据") | ||||
|     fileFdArr.forEach((item: number) => { | ||||
|       fs.closeSync(item) | ||||
|     }) | ||||
|     fileFdArr = [] | ||||
|   } | ||||
|   fileFdArr.forEach((item: number) => { | ||||
|     fs.closeSync(item) | ||||
|   }) | ||||
|   console.log(LogTag, "关闭过程数据") | ||||
| } | ||||
| 
 | ||||
| workerPort.onmessageerror = (e: MessageEvents) => { | ||||
|  | ||||
| @ -1,20 +1,18 @@ | ||||
| { | ||||
|   "lockfileVersion": 2, | ||||
|   "lockfileVersion": 1, | ||||
|   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||||
|   "specifiers": { | ||||
|     "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19", | ||||
|     "@ohos/crypto-js@2.0.3": "@ohos/crypto-js@2.0.3" | ||||
|     "@ohos/crypto-js@2.0.3": "@ohos/crypto-js@2.0.3", | ||||
|     "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19" | ||||
|   }, | ||||
|   "packages": { | ||||
|     "@ohos/hypium@1.0.19": { | ||||
|       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", | ||||
|       "integrity": "sha512-cEjDgLFCm3cWZDeRXk7agBUkPqjWxUo6AQeiu0gEkb3J8ESqlduQLSIXeo3cCsm8U/asL7iKjF85ZyOuufAGSQ==", | ||||
|       "registryType": "ohpm" | ||||
|     }, | ||||
|     "@ohos/crypto-js@2.0.3": { | ||||
|       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/crypto-js/-/crypto-js-2.0.3.har", | ||||
|       "integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==", | ||||
|       "registryType": "ohpm" | ||||
|       "integrity": "sha512-LuHaR1kD5PxnOXnuR1fWvPwGtbed9Q/QGzk6JOh8y5Wdzvi8brPesODZiaWf9scOVRHsbTPOtZw91vWB35p1vQ==" | ||||
|     }, | ||||
|     "@ohos/hypium@1.0.19": { | ||||
|       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.19.har", | ||||
|       "integrity": "sha512-cEjDgLFCm3cWZDeRXk7agBUkPqjWxUo6AQeiu0gEkb3J8ESqlduQLSIXeo3cCsm8U/asL7iKjF85ZyOuufAGSQ==" | ||||
|     } | ||||
|   } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user