fix: 语音播报两边
This commit is contained in:
		
							parent
							
								
									98e17164e1
								
							
						
					
					
						commit
						fff89ecf75
					
				| @ -125,28 +125,30 @@ export class BaseJudge { | |||||||
|           ProjectStart(xmdm, that.xmxh, judgeUI) |           ProjectStart(xmdm, that.xmxh, judgeUI) | ||||||
|           UploadProgressPhoto(xmdm, that.plcData!, judgeUI) |           UploadProgressPhoto(xmdm, that.plcData!, judgeUI) | ||||||
|         } |         } | ||||||
|  |         // this.judgeUI.projectsObj[xmdm].isUpload = true | ||||||
|  | 
 | ||||||
|         break; |         break; | ||||||
|       } |       } | ||||||
|       case 2: { |       case 2: { | ||||||
|         dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定1") |         dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定1") | ||||||
|         const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) |         const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) | ||||||
|         const isStart = await this.checkProjectIsStart(xmdm, 2, judgeUI, that) |         // const isStart = await this.checkProjectIsStart(xmdm, 1, judgeUI, that, kf) | ||||||
| 
 | 
 | ||||||
|         if (isStart) { |         // if (isStart) { | ||||||
|           // 项目结束了就不再生成数据 |         //   // 项目结束了就不再生成数据 | ||||||
|           dConsole.info(JudgeTag, ExamProcessDataTag, ' 项目是否结束 =>', project.isEnd) |         //   dConsole.info(JudgeTag, ExamProcessDataTag, ' 项目是否结束 =>', project.isEnd) | ||||||
|           if (!project.isEnd) { |         //   if (!project.isEnd) { | ||||||
|             // judgeTask.addTask(async () => { |         // judgeTask.addTask(async () => { | ||||||
|             //   dConsole.info(JudgeTag, `项目结束-${xmdm}-${project.name}`) |         //   dConsole.info(JudgeTag, `项目结束-${xmdm}-${project.name}`) | ||||||
|             //   await endProject(xmdm); |         //   await endProject(xmdm); | ||||||
|             //   this.xmmcSingleCode = '0'; |         //   this.xmmcSingleCode = '0'; | ||||||
|             //   this.xmmcEndCode = undefined; |         //   this.xmmcEndCode = undefined; | ||||||
|             // }, { |         // }, { | ||||||
|             //   isDelay: true |         //   isDelay: true | ||||||
|             // }) |         // }) | ||||||
|             ProjectEnd(xmdm, that.xmxh, judgeUI) |         ProjectEnd(xmdm, that.xmxh, judgeUI) | ||||||
|           } |         //   } | ||||||
|         } |         // } | ||||||
|         dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定3") |         dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定3") | ||||||
|         try { |         try { | ||||||
|           const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(','); |           const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(','); | ||||||
| @ -169,16 +171,19 @@ export class BaseJudge { | |||||||
|           that.avPlayer?.playAudio([`voice/${currentKf.markcatalog}.mp3`, |           that.avPlayer?.playAudio([`voice/${currentKf.markcatalog}.mp3`, | ||||||
|             `voice/mark_${Math.abs(currentKf?.score || 0)}.mp3`]) |             `voice/mark_${Math.abs(currentKf?.score || 0)}.mp3`]) | ||||||
|         } |         } | ||||||
|         const isStart = await this.checkProjectIsStart(Number(currentKf.xmdm), 2, judgeUI, that); |         // const isStart = await this.checkProjectIsStart(Number(currentKf.xmdm), 2, judgeUI, that, kf); | ||||||
|         if (isStart) { |         // if (isStart) { | ||||||
|           // await judgeTask.addTask(async () => { |         // await judgeTask.addTask(async () => { | ||||||
|           //   dConsole.info(JudgeTag, `项目扣分-${currentKf.markcatalog}-${currentKf.desc}`) |         //   dConsole.info(JudgeTag, `项目扣分-${currentKf.markcatalog}-${currentKf.desc}`) | ||||||
|           //   await pointsDedute(Number(currentKf.xmdm), currentKf) |         //   await pointsDedute(Number(currentKf.xmdm), currentKf) | ||||||
|           // }, { |         // }, { | ||||||
|           //   isDelay: true |         //   isDelay: true | ||||||
|           // }) |         // }) | ||||||
|           DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI) |         DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI) | ||||||
|  |         if (judgeUI.totalScore < judgeUI.passingScore) { | ||||||
|  |           ProjectEnd(xmdm, that.xmxh, judgeUI) | ||||||
|         } |         } | ||||||
|  |         // } | ||||||
|         break |         break | ||||||
|       } |       } | ||||||
|       case 5: { |       case 5: { | ||||||
| @ -367,7 +372,6 @@ export class BaseJudge { | |||||||
|       }) |       }) | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     // |  | ||||||
|     that.avPlayer?.playAudio(['voice/exam_waiting.mp3'], judgeUI.singlePlay, async () => { |     that.avPlayer?.playAudio(['voice/exam_waiting.mp3'], judgeUI.singlePlay, async () => { | ||||||
|       try { |       try { | ||||||
|         if (!judgeUI.singlePlay) { |         if (!judgeUI.singlePlay) { | ||||||
| @ -393,7 +397,6 @@ export class BaseJudge { | |||||||
|           await this.endExam(judgeUI, that) |           await this.endExam(judgeUI, that) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|       await this.endExam(judgeUI, that) |  | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -402,7 +405,6 @@ export class BaseJudge { | |||||||
|     const singlePlay = judgeUI.singlePlay |     const singlePlay = judgeUI.singlePlay | ||||||
|     //TODO 断网考试结束补传 |     //TODO 断网考试结束补传 | ||||||
|     // await uploadDisConnectData(); |     // await uploadDisConnectData(); | ||||||
| 
 |  | ||||||
|     let backTimeOut = setTimeout(() => { |     let backTimeOut = setTimeout(() => { | ||||||
|       router.back() |       router.back() | ||||||
|     }, 90 * 1000) |     }, 90 * 1000) | ||||||
| @ -506,58 +508,62 @@ export class BaseJudge { | |||||||
|         }, param302 === "8" ? 3000 : 0) |         }, param302 === "8" ? 3000 : 0) | ||||||
|       }) |       }) | ||||||
|     } |     } | ||||||
| 
 |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /** |   /** | ||||||
|    *  检测扣分、结束项目时该项目是否开始 |    *  检测扣分、结束项目时该项目是否开始 | ||||||
|    * |    * | ||||||
|    */ |    */ | ||||||
|   async checkProjectIsStart(xmdm: number, currentType: 1 | 2, judgeUI: JudgePage, that: JudgeBusiness, kf?: MarkRule): Promise<boolean> { |   // async checkProjectIsStart(xmdm: number, currentType: 1 | 2, judgeUI: JudgePage, that: JudgeBusiness, kf?: MarkRule[]): Promise<boolean> { | ||||||
|     if (xmdm == 20) { |   //   if (xmdm == 20) { | ||||||
|       return true |   //     return true | ||||||
|     } |   //   } | ||||||
|     const currentProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) |   //   const currentProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm) | ||||||
| 
 |   // | ||||||
|     if (!currentProject.isUpload) { |   //   if (!currentProject.isUpload) { | ||||||
|       dConsole.info(JudgeTag, '项目补传开始') |   //     dConsole.info(JudgeTag, '项目补传开始') | ||||||
|       // judgeTask.addTask(async () => { |   //     // judgeTask.addTask(async () => { | ||||||
|       //   await this.beginProject(xmdm) |   //     //   await this.beginProject(xmdm) | ||||||
|       // }, { |   //     // }, { | ||||||
|       //   isDelay: true |   //     //   isDelay: true | ||||||
|       // }) |   //     // }) | ||||||
|       // judgeTask.addTask(async () => { |   //     // judgeTask.addTask(async () => { | ||||||
|       //   await this.uploadProgressPhoto(xmdm) |   //     //   await this.uploadProgressPhoto(xmdm) | ||||||
|       // }, { |   //     // }, { | ||||||
|       //   isDelay: true |   //     //   isDelay: true | ||||||
|       // }) |   //     // }) | ||||||
|       currentProject.isUpload = true; |   //     ProjectStart(xmdm, that.xmxh, judgeUI) | ||||||
|       Reflect.set(judgeUI.projectsObj, xmdm, currentProject) |   //     UploadProgressPhoto(xmdm, that.plcData!, judgeUI) | ||||||
|       if (currentType == 2) { |   //     currentProject.isUpload = true; | ||||||
|         //项目结束需要等补传完毕 |   //     Reflect.set(judgeUI.projectsObj, xmdm, currentProject) | ||||||
|         // judgeTask.addTask(async () => { |   //     if (currentType == 2) { | ||||||
|         //   await this.pointsDedute(xmdm, kf!) |   //       //项目结束需要等补传完毕 | ||||||
|         // }, { |   //       // judgeTask.addTask(async () => { | ||||||
|         //   isDelay: true |   //       //   await this.pointsDedute(xmdm, kf!) | ||||||
|         // }) |   //       // }, { | ||||||
|       } |   //       //   isDelay: true | ||||||
|       //扣分补传判断是否合格 不合格补传项目结束 |   //       // })\ | ||||||
|       if (currentType == 1 || (currentType == 2 && that.totalScore < judgeUI.passingScore)) { |   //       const currentKf = kf[kf.length -1]; | ||||||
|         // judgeTask.addTask(async () => { |   //       DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI) | ||||||
|         //   await this.endProject(xmdm) |   //     } | ||||||
|         // }, { |   //     //扣分补传判断是否合格 不合格补传项目结束 | ||||||
|         //   isDelay: true |   //     if (currentType == 1 || (currentType == 2 && that.totalScore < judgeUI.passingScore)) { | ||||||
|         // }) |   //       // judgeTask.addTask(async () => { | ||||||
|         currentProject.isEnd = true; |   //       //   await this.endProject(xmdm) | ||||||
|         Reflect.set(judgeUI.projectsObj, xmdm, currentProject) |   //       // }, { | ||||||
|       } |   //       //   isDelay: true | ||||||
|       // judgeTask.addTask(async () => { |   //       // }) | ||||||
|       //   this.checkExamIsEnd() |   //       ProjectEnd(xmdm, that.xmxh, judgeUI) | ||||||
|       // }) |   //       currentProject.isEnd = true; | ||||||
|       return false; |   //       Reflect.set(judgeUI.projectsObj, xmdm, currentProject) | ||||||
|     } |   //     } | ||||||
|     return true |   //     // judgeTask.addTask(async () => { | ||||||
|   } |   //     //   this.checkExamIsEnd() | ||||||
|  |   //     // }) | ||||||
|  |   //     return false; | ||||||
|  |   //   } | ||||||
|  |   //   return true | ||||||
|  |   // } | ||||||
| 
 | 
 | ||||||
|   async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) { |   async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) { | ||||||
|     const name = judgeUI.name |     const name = judgeUI.name | ||||||
|  | |||||||
| @ -708,7 +708,7 @@ struct UserInfoPage { | |||||||
| 
 | 
 | ||||||
|         this.list = JSON.parse(JSON.stringify(dataList)) |         this.list = JSON.parse(JSON.stringify(dataList)) | ||||||
| 
 | 
 | ||||||
|         dConsole.log("temp list", JSON.stringify(this.list)) |         dConsole.log(UserInfoTag, "temp list", JSON.stringify(this.list)) | ||||||
|         this.list.forEach((listData, index) => { |         this.list.forEach((listData, index) => { | ||||||
|           //考过一次不允许切换学员 |           //考过一次不允许切换学员 | ||||||
|           if (listData.kssycs == '1') { |           if (listData.kssycs == '1') { | ||||||
| @ -730,7 +730,7 @@ struct UserInfoPage { | |||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|         // await upDateTableByArray('USERLIST', this.list || []) |         // await upDateTableByArray('USERLIST', this.list || []) | ||||||
|         dConsole.log("temp list", JSON.stringify(this.list)) |         dConsole.log(UserInfoTag, "temp list", JSON.stringify(this.list)) | ||||||
| 
 | 
 | ||||||
|         // await sqlInsertCommonFn("USERLIST", this.list || []) |         // await sqlInsertCommonFn("USERLIST", this.list || []) | ||||||
|         await SqlInsertTable('USERLIST', this.list || []) |         await SqlInsertTable('USERLIST', this.list || []) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user