弹窗异常关闭
This commit is contained in:
		
							parent
							
								
									2a9b4a4f4d
								
							
						
					
					
						commit
						bd41dc0ad2
					
				| @ -54,59 +54,6 @@ struct Index { | |||||||
|     }), |     }), | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|      |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     customStyle: true, |     customStyle: true, | ||||||
|     alignment: DialogAlignment.Center, |     alignment: DialogAlignment.Center, | ||||||
|   }) |   }) | ||||||
| @ -507,7 +454,6 @@ struct Index { | |||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     }); |     }); | ||||||
| 
 |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   aboutToDisappear() { |   aboutToDisappear() { | ||||||
| @ -518,10 +464,6 @@ struct Index { | |||||||
|     if (this.loading) { |     if (this.loading) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     // let mode=globalThis.timeInfo?.mode?globalThis.timeInfo?.mode:1 |  | ||||||
| 
 |  | ||||||
|     // console.log('mode',mode) |  | ||||||
| 
 |  | ||||||
|     const param = { |     const param = { | ||||||
|       carId: globalThis.carInfo?.carId, |       carId: globalThis.carInfo?.carId, | ||||||
|       examinationRoomId: globalThis.carInfo?.examinationRoomId, |       examinationRoomId: globalThis.carInfo?.examinationRoomId, | ||||||
| @ -536,30 +478,18 @@ struct Index { | |||||||
|       singlePlay: globalThis.singlePlay |       singlePlay: globalThis.singlePlay | ||||||
|     } |     } | ||||||
|     this.loading = true |     this.loading = true | ||||||
|     console.log("sql 1111") |  | ||||||
| 
 | 
 | ||||||
|     getSingleCenterTable(param).then((ret) => { |     getSingleCenterTable(param).then((ret) => { | ||||||
|       console.log('teststetfinsh1', ret) |       console.log('getSingleCenterTable finish', ret) | ||||||
|       // DB.queryListBySql('select * from MA_SYSSET', [{ |  | ||||||
|       //   name: "v_no", |  | ||||||
|       //   type: ColumnType.STRING, |  | ||||||
|       //   columnName: "v_no" |  | ||||||
|       // }]).then((res) => { |  | ||||||
|       //   console.log('sql success', JSON.stringify(res)) |  | ||||||
|       // }).catch((err) => { |  | ||||||
|       //   console.log('sql error1', err) |  | ||||||
|       // }) |  | ||||||
|       if (ret) { |       if (ret) { | ||||||
|         getSyncData('MA_SYSSET').then(data => { |         getSyncData('MA_SYSSET').then((data: any[]) => { | ||||||
|           console.log('datadata', JSON.stringify(data)) |           console.log('MA_SYSSET data', JSON.stringify(data)) | ||||||
|           // @ts-ignore |  | ||||||
|           data.forEach(sys => { |           data.forEach(sys => { | ||||||
|             //判断是否能点开始考试 |             //判断是否能点开始考试 | ||||||
|             if (sys.v_no === '854') { |             if (sys.v_no === '854') { | ||||||
|               globalThis.param854Str = sys.v_value |               globalThis.param854Str = sys.v_value | ||||||
|             } |             } | ||||||
|             if (sys.v_no === '824' && decodeURIComponent(sys.v_value) == '0') { |             if (sys.v_no === '824' && decodeURIComponent(sys.v_value) == '0') { | ||||||
|               // this.Param612Str= decodeURIComponent(sys.v_value) |  | ||||||
|               router.pushUrl({ |               router.pushUrl({ | ||||||
|                 url: 'pages/CarCheck', |                 url: 'pages/CarCheck', | ||||||
|                 params: { |                 params: { | ||||||
| @ -572,9 +502,12 @@ struct Index { | |||||||
|               }, router.RouterMode.Single) |               }, router.RouterMode.Single) | ||||||
|             } |             } | ||||||
|           }) |           }) | ||||||
|  |         }).finally(() => { | ||||||
|  |           this.loading = false | ||||||
|         }); |         }); | ||||||
| 
 |  | ||||||
|       } |       } | ||||||
|  |     }).finally(() => { | ||||||
|  |       this.loading = false | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -623,9 +556,7 @@ struct Index { | |||||||
|       globalThis.singlePlay = false |       globalThis.singlePlay = false | ||||||
|     } |     } | ||||||
|     this.isSingle = globalThis.singlePlay |     this.isSingle = globalThis.singlePlay | ||||||
|     // this.loading = false |  | ||||||
|     this.num = 0 |     this.num = 0 | ||||||
|     // const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort) |  | ||||||
|     globalThis.lsh = '1111111111111' |     globalThis.lsh = '1111111111111' | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -666,7 +597,6 @@ struct Index { | |||||||
|         console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`); |         console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`); | ||||||
|       }) |       }) | ||||||
|     }) |     }) | ||||||
| 
 |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async initParams() { |   async initParams() { | ||||||
|  | |||||||
| @ -109,7 +109,6 @@ struct UserInfo { | |||||||
|     if (this.ksksLimit) { |     if (this.ksksLimit) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     console.log('routerParamrouterParam') |  | ||||||
|     try { |     try { | ||||||
|       await this.checkSignal() |       await this.checkSignal() | ||||||
|       this.faceCompareSucess = 0 |       this.faceCompareSucess = 0 | ||||||
| @ -140,7 +139,6 @@ struct UserInfo { | |||||||
|         //   同一学员连续第二次考试时不再验证身份 |         //   同一学员连续第二次考试时不再验证身份 | ||||||
|         if (this.currentUser.kssycs == '1' && this.systemParam.Param830Str == '1') { |         if (this.currentUser.kssycs == '1' && this.systemParam.Param830Str == '1') { | ||||||
|           this.sfbdinterfaceFn() |           this.sfbdinterfaceFn() | ||||||
| 
 |  | ||||||
|         } else { |         } else { | ||||||
|           this.ksksLimit = false |           this.ksksLimit = false | ||||||
|           this.showFaceCompare = true |           this.showFaceCompare = true | ||||||
| @ -891,14 +889,24 @@ struct UserInfo { | |||||||
|     const {carId,examinationRoomId} = carInfo; |     const {carId,examinationRoomId} = carInfo; | ||||||
|     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; |     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; | ||||||
|     if (!globalThis.singlePlay) { |     if (!globalThis.singlePlay) { | ||||||
|       //获取已考项目 |       try { | ||||||
|       // @ts-ignore |         //获取已考项目 | ||||||
|       examItems = await getExaminationItem({ |         // @ts-ignore | ||||||
|         time: getCurrentTime(), |         examItems = await getExaminationItem({ | ||||||
|         carId, |           time: getCurrentTime(), | ||||||
|         lsh: this.currentUser.lsh || '', |           carId, | ||||||
|         examinationRoomId |           lsh: this.currentUser.lsh || '', | ||||||
|       }) |           examinationRoomId | ||||||
|  |         }) | ||||||
|  |       } catch (e) { | ||||||
|  |         promptAction.showToast({ | ||||||
|  |           message: "获取考试信息失败,请重试", | ||||||
|  |           duration: 3000 | ||||||
|  |         }) | ||||||
|  |         this.isLoadingPopupVisible = false | ||||||
|  |         this.isExamStart = false | ||||||
|  |         return | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|     this.currentUser.id = '1' |     this.currentUser.id = '1' | ||||||
|     const avPlayer = this.avPlayer; |     const avPlayer = this.avPlayer; | ||||||
| @ -906,38 +914,45 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { |     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { | ||||||
|       console.info('surenjun', '播放结束开始考试接口调用') |       console.info('surenjun', '播放结束开始考试接口调用') | ||||||
|       const {code,keystr,message} = await this.beginExam() || {}; |       try { | ||||||
|       console.info('surenjun', '开始考试接口调用结束') |         const {code,keystr,message} = await this.beginExam() || {}; | ||||||
|       // console.info('surenjun',code +'') |         console.info('surenjun', '开始考试接口调用结束') | ||||||
|       //@ts-ignore TODO code转换 |         if (code != 1) { | ||||||
| 
 |           avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']); | ||||||
|       if (code != 1) { |           this.isLoadingPopupVisible = false | ||||||
|         avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']); |           this.isExamStart = false | ||||||
|  |           promptAction.showToast({ | ||||||
|  |             message, | ||||||
|  |             duration: 4000 | ||||||
|  |           }) | ||||||
|  |           return | ||||||
|  |         } | ||||||
|  |         this.currentUser.id = '0' | ||||||
|  |         await upDateTableByArray('USER', [this.currentUser]) | ||||||
|  |         this.stepFlag = false | ||||||
|  |         this.isLoadingPopupVisible = false | ||||||
|  |         router.pushUrl({ | ||||||
|  |           url: 'pages/Judge', | ||||||
|  |           params: { | ||||||
|  |             examItems: examItems?.getExaminationItemRsp?.body?.ykxx, | ||||||
|  |             sczb: Number(this.isBoardPrePareSetPopupOpen), | ||||||
|  |             kfdm: this.sczbkf, | ||||||
|  |             //真实监管项目 | ||||||
|  |             kString: decodeURIComponent(keystr || '') | ||||||
|  |           } | ||||||
|  |         }, router.RouterMode.Single); | ||||||
|  |         this.updateTimeLimit = false | ||||||
|  |         this.stopDeviceById() | ||||||
|  |         this.stepFlag = false | ||||||
|  |       } catch (e) { | ||||||
|  |         promptAction.showToast({ | ||||||
|  |           message: "监管审核失败,请重试", | ||||||
|  |           duration: 3000 | ||||||
|  |         }) | ||||||
|         this.isLoadingPopupVisible = false |         this.isLoadingPopupVisible = false | ||||||
|         this.isExamStart = false |         this.isExamStart = false | ||||||
|         promptAction.showToast({ |  | ||||||
|           message, |  | ||||||
|           duration: 4000 |  | ||||||
|         }) |  | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
|       this.currentUser.id = '0' |  | ||||||
|       await upDateTableByArray('USER', [this.currentUser]) |  | ||||||
|       this.stepFlag = false |  | ||||||
|       this.isLoadingPopupVisible = false |  | ||||||
|       router.pushUrl({ |  | ||||||
|         url: 'pages/Judge', |  | ||||||
|         params: { |  | ||||||
|           examItems: examItems?.getExaminationItemRsp?.body?.ykxx, |  | ||||||
|           sczb: Number(this.isBoardPrePareSetPopupOpen), |  | ||||||
|           kfdm: this.sczbkf, |  | ||||||
|           //真实监管项目 |  | ||||||
|           kString: decodeURIComponent(keystr || '') |  | ||||||
|         } |  | ||||||
|       }, router.RouterMode.Single); |  | ||||||
|       this.updateTimeLimit = false |  | ||||||
|       this.stopDeviceById() |  | ||||||
|       this.stepFlag = false |  | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -1097,9 +1112,7 @@ struct UserInfo { | |||||||
|       }).catch(err => { |       }).catch(err => { | ||||||
|         console.log("USER insert fail", JSON.stringify(err)) |         console.log("USER insert fail", JSON.stringify(err)) | ||||||
|       }) |       }) | ||||||
|       // await upDateTableByArray('USER', [this.currentUser]) |  | ||||||
|       console.log("User", JSON.stringify(this.currentUser)) |       console.log("User", JSON.stringify(this.currentUser)) | ||||||
|       // await sqlInsertCommonFn("USER", [this.currentUser]) |  | ||||||
|       globalThis.statue = 4 |       globalThis.statue = 4 | ||||||
|       this.isBoardPrePareSetPopupShow = true; |       this.isBoardPrePareSetPopupShow = true; | ||||||
|       this.isFirstBoardPrePareSetPopupBtnShow = true; |       this.isFirstBoardPrePareSetPopupBtnShow = true; | ||||||
| @ -1284,9 +1297,9 @@ struct UserInfo { | |||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|                 //835参数值和预约考试次数对比 |                 //835参数值和预约考试次数对比 | ||||||
|                 if(Number(this.systemParam.Param835)<=Number(this.currentUser.yycs)&&!globalThis.singlePlay){ |                 if (Number(this.systemParam.Param835) <= Number(this.currentUser.yycs) && !globalThis.singlePlay) { | ||||||
|                   this.type='4' |                   this.type = '4' | ||||||
|                   this.title='当前考生预约考试次数为'+this.currentUser.yycs |                   this.title = '当前考生预约考试次数为' + this.currentUser.yycs | ||||||
|                   this.errorDialog.open() |                   this.errorDialog.open() | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
| @ -1446,5 +1459,5 @@ type systemParam = { | |||||||
|   'Param830Str': string, //同一学员连续第二次考试时不再验证身份 |   'Param830Str': string, //同一学员连续第二次考试时不再验证身份 | ||||||
|   'Param364': string, //考前上车准备 |   'Param364': string, //考前上车准备 | ||||||
|   'Param398': string, //考前上车准备 |   'Param398': string, //考前上车准备 | ||||||
|   'Param835' :string |   'Param835': string | ||||||
| } | } | ||||||
| @ -54,6 +54,7 @@ import { | |||||||
|   examJudgeVersion |   examJudgeVersion | ||||||
| } from './api/index'; | } from './api/index'; | ||||||
| import { getSyncData, upDateTableByArray } from '../../common/service/initable'; | import { getSyncData, upDateTableByArray } from '../../common/service/initable'; | ||||||
|  | import promptAction from '@ohos.promptAction'; | ||||||
| 
 | 
 | ||||||
| const judgeTag = 'SURENJUN_JUDGE' | const judgeTag = 'SURENJUN_JUDGE' | ||||||
| 
 | 
 | ||||||
| @ -382,10 +383,10 @@ export default class Judge { | |||||||
|           //成绩不合格
 |           //成绩不合格
 | ||||||
|           if (totalScore < passingGrade) { |           if (totalScore < passingGrade) { | ||||||
|             //科目三不合格报靠边停车
 |             //科目三不合格报靠边停车
 | ||||||
|             if (examSubject == 3 ) { |             if (examSubject == 3) { | ||||||
|               if( param302 == 1){ |               if (param302 == 1) { | ||||||
|                 avPlayer.playAudio([`voice/考试结束.mp3`]); |                 avPlayer.playAudio([`voice/考试结束.mp3`]); | ||||||
|               }else if(param302 == 0){ |               } else if (param302 == 0) { | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
| @ -895,7 +896,7 @@ export default class Judge { | |||||||
|     //扣分
 |     //扣分
 | ||||||
|       case 3: |       case 3: | ||||||
|         const thisKf = getKfStr(`${kf.xmdm}_${kf.kfdm}`) |         const thisKf = getKfStr(`${kf.xmdm}_${kf.kfdm}`) | ||||||
|         //扣分信息
 |       //扣分信息
 | ||||||
|         this.kfArr.push({ |         this.kfArr.push({ | ||||||
|           //扣分项目名称
 |           //扣分项目名称
 | ||||||
|           xmmcStr: getDqxmStr(kf.xmdm), |           xmmcStr: getDqxmStr(kf.xmdm), | ||||||
| @ -1037,20 +1038,20 @@ export default class Judge { | |||||||
|         const code = projectsObj[xmdm].projectCodeCenter; |         const code = projectsObj[xmdm].projectCodeCenter; | ||||||
|         const isEnd = projectsObj[xmdm].isEnd; |         const isEnd = projectsObj[xmdm].isEnd; | ||||||
|         const kmCode = getKmProjectVoice(code, 1, judgeConfigObj, lane, xmxh) |         const kmCode = getKmProjectVoice(code, 1, judgeConfigObj, lane, xmxh) | ||||||
|         // if (!ignoreVoiceCodeArr.includes(code)) {
 |       // if (!ignoreVoiceCodeArr.includes(code)) {
 | ||||||
|         //   if(examSubject == 2 && ((xmdm == 0 && f == 2) || (xmdm == 1 && s == 2) || xmdm == 3)){
 |       //   if(examSubject == 2 && ((xmdm == 0 && f == 2) || (xmdm == 1 && s == 2) || xmdm == 3)){
 | ||||||
|         //     //倒出入库、桩考\进项目语音控制
 |       //     //倒出入库、桩考\进项目语音控制
 | ||||||
|         //   }else{
 |       //   }else{
 | ||||||
|         //     kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true)
 |       //     kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true)
 | ||||||
|         //   }
 |       //   }
 | ||||||
|         // }
 |       // }
 | ||||||
|         setTimeout(() => { |         setTimeout(() => { | ||||||
|           if (param512[7] != 0) { |           if (param512[7] != 0) { | ||||||
|             clearTimeout(this.deductedPopShowTimer) |             clearTimeout(this.deductedPopShowTimer) | ||||||
|             this.judgeUI.isDeductedPopShow = true |             this.judgeUI.isDeductedPopShow = true | ||||||
|           } |           } | ||||||
|         }, 200) |         }, 200) | ||||||
|         //项目已考不上传监管信息
 |       //项目已考不上传监管信息
 | ||||||
|         if (!isEnd) { |         if (!isEnd) { | ||||||
|           judgeTask.addTask(async () => { |           judgeTask.addTask(async () => { | ||||||
|             console.info(judgeTag, `项目开始-${xmdm}-${projectsObj[xmdm].name}`) |             console.info(judgeTag, `项目开始-${xmdm}-${projectsObj[xmdm].name}`) | ||||||
| @ -1103,7 +1104,7 @@ export default class Judge { | |||||||
|     // 扣分
 |     // 扣分
 | ||||||
|       case 3: |       case 3: | ||||||
|         console.info('surenjun', '扣分开始') |         console.info('surenjun', '扣分开始') | ||||||
|         //扣分时实时播报语音(0-否+1-是)
 |       //扣分时实时播报语音(0-否+1-是)
 | ||||||
|         const currentKf = kf[kfLen -1]; |         const currentKf = kf[kfLen -1]; | ||||||
|         if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') || |         if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') || | ||||||
|           (examSubject == 3 && judgeConfigObj['418'] == '1')) { |           (examSubject == 3 && judgeConfigObj['418'] == '1')) { | ||||||
| @ -1127,7 +1128,7 @@ export default class Judge { | |||||||
|     // 考试结束
 |     // 考试结束
 | ||||||
|       case 5: |       case 5: | ||||||
|         console.info(judgeTag, '考试结束') |         console.info(judgeTag, '考试结束') | ||||||
|         //关闭录像
 |       //关闭录像
 | ||||||
|         if (!globalThis.singlePlay) { |         if (!globalThis.singlePlay) { | ||||||
|           await endRecordVideo(this.videoData) |           await endRecordVideo(this.videoData) | ||||||
|         } |         } | ||||||
| @ -1226,7 +1227,7 @@ export default class Judge { | |||||||
|       }) |       }) | ||||||
|     } else { |     } else { | ||||||
|       //收到综合评判语音时,显示综合评判弹窗
 |       //收到综合评判语音时,显示综合评判弹窗
 | ||||||
|       if(code[0] == 'zhpp'){ |       if (code[0] == 'zhpp') { | ||||||
|         clearTimeout(this.deductedPopShowTimer) |         clearTimeout(this.deductedPopShowTimer) | ||||||
|         this.judgeUI.isDeductedPopShow = true |         this.judgeUI.isDeductedPopShow = true | ||||||
|         this.judgeUI.defaultTabIndex = 1 |         this.judgeUI.defaultTabIndex = 1 | ||||||
| @ -1298,135 +1299,142 @@ export default class Judge { | |||||||
|       judgeUI, |       judgeUI, | ||||||
|       ksjs, |       ksjs, | ||||||
|       getPhoto, |       getPhoto, | ||||||
|       uploadProgressData, |  | ||||||
|       uploadDisConnectData, |  | ||||||
|       avPlayer, |       avPlayer, | ||||||
|       kfArr, |       kfArr, | ||||||
|       judgeTask, |  | ||||||
|       filePath, |       filePath, | ||||||
|       closeAllFiles |       closeAllFiles | ||||||
|     } = this; |     } = this; | ||||||
|     const { lsh, idCard, serialNumber, kssycs, totalScore, judgeConfigObj, isAllProjectsEnd, passingScore } = judgeUI |     const { lsh, idCard, serialNumber, kssycs, totalScore, judgeConfigObj, isAllProjectsEnd, passingScore } = judgeUI | ||||||
|     //TODO 断网考试结束补传
 |     //TODO 断网考试结束补传
 | ||||||
|     // await uploadDisConnectData();
 |     // await uploadDisConnectData();
 | ||||||
|     const time = await getCurrentTime(); |     try { | ||||||
|     const photoBase64 = await getPhoto(); |       const time = await getCurrentTime(); | ||||||
|     const { d1, d2, d3, d4, d5 } = ksjs |       const photoBase64 = await getPhoto(); | ||||||
|     const data = { |       const { d1, d2, d3, d4, d5 } = ksjs | ||||||
|       xtlb: '17', |       const data = { | ||||||
|       jkxlh: serialNumber, |         xtlb: '17', | ||||||
|       jkid: '17C56', |         jkxlh: serialNumber, | ||||||
|       drvexam: { |         jkid: '17C56', | ||||||
|         lsh, |         drvexam: { | ||||||
|         kchp: encodeURI(plateNo), |           lsh, | ||||||
|         kskm: examSubject, |           kchp: encodeURI(plateNo), | ||||||
|         sfzmhm: idCard, |           kskm: examSubject, | ||||||
|         //@ts-ignore
 |           sfzmhm: idCard, | ||||||
|         zp: photoBase64, |           //@ts-ignore
 | ||||||
|         jssj: time, |           zp: photoBase64, | ||||||
|         kscj: (totalScore * 1) > 0 ? totalScore : 0, |           jssj: time, | ||||||
|         kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100), |           kscj: (totalScore * 1) > 0 ? totalScore : 0, | ||||||
|         // 1,22;2,560;3,128;4,0;5,0;
 |           kslc: Math.ceil(((ksjs?.qjjl + ksjs?.dcjl) || 0) / 100), | ||||||
|         dwlc: [d1, d2, d3, d4, d5].map((d, index) => `${index + 1},${Math.floor(d / 100)}`).join(';'), |           // 1,22;2,560;3,128;4,0;5,0;
 | ||||||
|  |           dwlc: [d1, d2, d3, d4, d5].map((d, index) => `${index + 1},${Math.floor(d / 100)}`).join(';'), | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     } |       let backTimeOut = setTimeout(() => { | ||||||
|     let backTimeOut = setTimeout(() => { |         router.back() | ||||||
|       router.back() |       }, 90 * 1000) | ||||||
|     }, 90 * 1000) |       const { code, keystr, message } = await this.sendWriteObjectOut(data, filePath); | ||||||
|     const { code, keystr, message } = await this.sendWriteObjectOut(data, filePath); |       promptWxCode('17C56', code) | ||||||
|     promptWxCode('17C56', code) |  | ||||||
| 
 | 
 | ||||||
|     if (code != 1) { |       if (code != 1) { | ||||||
|       avPlayer.playAudio(['voice/监管失败.mp3']) |         avPlayer.playAudio(['voice/监管失败.mp3']) | ||||||
|       this.judgeUI.errorMsg = decodeURIComponent(message) |         this.judgeUI.errorMsg = decodeURIComponent(message) | ||||||
| 
 | 
 | ||||||
|       if (code == 2300028 || code == 2300007) { |         if (code == 2300028 || code == 2300007) { | ||||||
|         this.judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' |           this.judgeUI.errorMsg = '当前的考试过程信息监管审核未通过,程序将退出!' | ||||||
|  |         } | ||||||
|  |         this.isUdpEnd = true; | ||||||
|  |         closeAllFiles() | ||||||
|  |         this.judgeUI.loadingPopupVisible = false; | ||||||
|  |         return | ||||||
|       } |       } | ||||||
|       this.isUdpEnd = true; |       console.info(judgeTag, '考试结束 end') | ||||||
|       closeAllFiles() |       const param302 = judgeConfigObj['302']; | ||||||
|       this.judgeUI.loadingPopupVisible = false; |       judgeUI.loadingPopupVisible = true; | ||||||
|       return |       let currentKssycs = 0; | ||||||
|     } |       let voiceURL = '' | ||||||
|     console.info(judgeTag, '考试结束 end') |       if (examSubject == 2) { | ||||||
|     const param302 = judgeConfigObj['302']; |         if (isAllProjectsEnd) { | ||||||
|     judgeUI.loadingPopupVisible = true; |           voiceURL = | ||||||
|     let currentKssycs = 0; |             (totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3') | ||||||
|     let voiceURL = '' |         } else { | ||||||
|     if (examSubject == 2) { |           voiceURL = `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` | ||||||
|       if (isAllProjectsEnd) { |           currentKssycs = kssycs == 1 ? 0 : 1 | ||||||
|         voiceURL = |         } | ||||||
|           (totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3') |         switch (voiceURL) { | ||||||
|       } else { |           case 'voice/unqualified_one.wav': | ||||||
|         voiceURL = `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` |             currentKssycs = 0; | ||||||
|         currentKssycs = kssycs == 1 ? 0 : 1 |             break; | ||||||
|       } |  | ||||||
|       switch (voiceURL) { |  | ||||||
|         case 'voice/unqualified_one.wav': |  | ||||||
|           currentKssycs = 0; |  | ||||||
|           break; |  | ||||||
| 
 | 
 | ||||||
|         case 'voice/unqualified_two.wav': |           case 'voice/unqualified_two.wav': | ||||||
|           currentKssycs = 1; |             currentKssycs = 1; | ||||||
|           break; |             break; | ||||||
| 
 | 
 | ||||||
|         case 'voice/qualified.mp3': |           case 'voice/qualified.mp3': | ||||||
|           currentKssycs = 0; |             currentKssycs = 0; | ||||||
|           break; |             break; | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     } |       if (examSubject == 3) { | ||||||
|     if (examSubject == 3) { |         if (isAllProjectsEnd) { | ||||||
|       if (isAllProjectsEnd) { |           if (totalScore < passingScore) { | ||||||
|         if (totalScore < passingScore) { |             voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` | ||||||
|  |             currentKssycs = kssycs == 1 ? 0 : 1 | ||||||
|  |           } else { | ||||||
|  |             voiceURL = 'voice/exam_pass.mp3' | ||||||
|  |             currentKssycs = 0 | ||||||
|  |           } | ||||||
|  |         } else { | ||||||
|           voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` |           voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` | ||||||
|           currentKssycs = kssycs == 1 ? 0 : 1 |           currentKssycs = kssycs == 1 ? 0 : 1 | ||||||
|         } else { |  | ||||||
|           voiceURL = 'voice/exam_pass.mp3' |  | ||||||
|           currentKssycs = 0 |  | ||||||
|         } |         } | ||||||
|       } else { |         switch (voiceURL) { | ||||||
|         voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3` |           case 'voice/exam_no_pass_finish.mp3': | ||||||
|         currentKssycs = kssycs == 1 ? 0 : 1 |             currentKssycs = 0; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |           case 'voice/exam_no_pass.mp3': | ||||||
|  |             currentKssycs = 1; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |           case 'voice/exam_pass.mp3': | ||||||
|  |             currentKssycs = 0; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|       switch (voiceURL) { |  | ||||||
|         case 'voice/exam_no_pass_finish.mp3': |  | ||||||
|           currentKssycs = 0; |  | ||||||
|           break; |  | ||||||
| 
 | 
 | ||||||
|         case 'voice/exam_no_pass.mp3': |       const USER = await getSyncData('USER'); | ||||||
|           currentKssycs = 1; |       await upDateTableByArray('USER', [{ | ||||||
|           break; |         ...USER[0], | ||||||
| 
 |         kssycs: currentKssycs | ||||||
|         case 'voice/exam_pass.mp3': |       }]) | ||||||
|           currentKssycs = 0; |  | ||||||
|           break; |  | ||||||
| 
 | 
 | ||||||
|  |       console.info(judgeTag, `考试成绩:${totalScore}`) | ||||||
|  |       if (!singlePlay) { | ||||||
|  |         // await uploadProgressData();
 | ||||||
|       } |       } | ||||||
|     } |       clearTimeout(backTimeOut) | ||||||
| 
 |       //语音播放扣分项
 | ||||||
|     const USER = await getSyncData('USER'); |       let score = 0; | ||||||
|     await upDateTableByArray('USER', [{ |       //结束考试时候是否播报一遍所有扣分
 | ||||||
|       ...USER[0], |       const param634 = judgeConfigObj['634']; | ||||||
|       kssycs: currentKssycs |       if (kfArr.length && ((examSubject == 2 && param634 == 1) || examSubject == 3)) { | ||||||
|     }]) |         avPlayer.playAudio([`voice/kfdesc.mp3`], false, () => { | ||||||
| 
 |           try { | ||||||
|     console.info(judgeTag, `考试成绩:${totalScore}`) |             kfArr.forEach((kf, index) => { | ||||||
|     if (!singlePlay) { |               score += Math.abs(Number(kf.score)); | ||||||
|       // await uploadProgressData();
 |               //TODO 考试分数待替换
 | ||||||
|     } |               if (score <= (examSubject == 3 ? 10 : 20)) { | ||||||
|     clearTimeout(backTimeOut) |                 if (kfArr.length - 1 === index) { | ||||||
|     //语音播放扣分项
 |                   avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { | ||||||
|     let score = 0; |                     this.isUdpEnd = true; | ||||||
|     //结束考试时候是否播报一遍所有扣分
 |                     closeAllFiles() | ||||||
|     const param634 = judgeConfigObj['634']; |                     router.back(); | ||||||
|     if (kfArr.length && ((examSubject == 2 && param634 == 1) || examSubject == 3)) { |                   }) | ||||||
|       avPlayer.playAudio([`voice/kfdesc.mp3`], false, () => { |                   throw new Error('End Loop') | ||||||
|         try { |                 } | ||||||
|           kfArr.forEach((kf, index) => { |                 avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`]) | ||||||
|             score += Math.abs(Number(kf.score)); |               } else { | ||||||
|             //TODO 考试分数待替换
 |  | ||||||
|             if (score <= (examSubject == 3 ? 10 : 20)) { |  | ||||||
|               if (kfArr.length - 1 === index) { |  | ||||||
|                 avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { |                 avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { | ||||||
|                   this.isUdpEnd = true; |                   this.isUdpEnd = true; | ||||||
|                   closeAllFiles() |                   closeAllFiles() | ||||||
| @ -1434,28 +1442,27 @@ export default class Judge { | |||||||
|                 }) |                 }) | ||||||
|                 throw new Error('End Loop') |                 throw new Error('End Loop') | ||||||
|               } |               } | ||||||
|               avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`]) |             }) | ||||||
|             } else { |           } catch (e) { | ||||||
|               avPlayer.playAudio([`voice/${kf.markcatalog}.mp3`, voiceURL], false, () => { |             console.info(judgeTag, JSON.stringify(e)) | ||||||
|                 this.isUdpEnd = true; |           } | ||||||
|                 closeAllFiles() |         }) | ||||||
|                 router.back(); |       } else { | ||||||
|               }) |         avPlayer.playAudio([voiceURL], true, () => { | ||||||
|               throw new Error('End Loop') |           setTimeout(() => { | ||||||
|             } |             this.isUdpEnd = true | ||||||
|           }) |             closeAllFiles() | ||||||
|         } catch (e) { |             router.back(); | ||||||
|           console.info(judgeTag, JSON.stringify(e)) |           }, param302 == 8 ? 3000 : 0) | ||||||
|         } |         }) | ||||||
|       }) |       } | ||||||
|     } else { | 
 | ||||||
|       avPlayer.playAudio([voiceURL], true, () => { |     } catch (e) { | ||||||
|         setTimeout(() => { |       promptAction.showToast({ | ||||||
|           this.isUdpEnd = true |         message: "考试结束异常,请尝试重新结束", | ||||||
|           closeAllFiles() |         duration: 3000 | ||||||
|           router.back(); |  | ||||||
|         }, param302 == 8 ? 3000 : 0) |  | ||||||
|       }) |       }) | ||||||
|  |       judgeUI.loadingPopupVisible = false | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   } |   } | ||||||
| @ -1742,7 +1749,7 @@ export default class Judge { | |||||||
| 
 | 
 | ||||||
|       case 4: |       case 4: | ||||||
|         this.judgeUI.isDwztRight = false; |         this.judgeUI.isDwztRight = false; | ||||||
|         //差分异常上报
 |       //差分异常上报
 | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user