修复了部分问题
This commit is contained in:
		
							parent
							
								
									6f76677c3e
								
							
						
					
					
						commit
						db2ab39168
					
				| @ -98,7 +98,7 @@ struct UserInfo { | |||||||
|     if (singlePlay) { |     if (singlePlay) { | ||||||
|       return '' |       return '' | ||||||
|     } else { |     } else { | ||||||
|       const { filePhoto } = this; |       const {filePhoto} = this; | ||||||
|       const photoBase64 = await filePhoto.getPhoto(); |       const photoBase64 = await filePhoto.getPhoto(); | ||||||
|       return photoBase64 |       return photoBase64 | ||||||
|     } |     } | ||||||
| @ -119,7 +119,7 @@ struct UserInfo { | |||||||
|       this.ksksLimit = true |       this.ksksLimit = true | ||||||
| 
 | 
 | ||||||
|       if (globalThis.singlePlay) { |       if (globalThis.singlePlay) { | ||||||
|         const { examSubject } = globalThis.carInfo; |         const {examSubject} = globalThis.carInfo; | ||||||
|         this.currentUser.id = '0' |         this.currentUser.id = '0' | ||||||
|         await upDateTableByArray('USER', [this.currentUser]) |         await upDateTableByArray('USER', [this.currentUser]) | ||||||
|         router.pushUrl({ |         router.pushUrl({ | ||||||
| @ -204,6 +204,7 @@ struct UserInfo { | |||||||
|     if (!globalThis.singlePlay) { |     if (!globalThis.singlePlay) { | ||||||
|       // @ts-ignore |       // @ts-ignore | ||||||
|       if (routerParam.type != 1) { |       if (routerParam.type != 1) { | ||||||
|  |         console.info('surenjun', 'Judge返回到UserInfo界面') | ||||||
|         // @ts-ignore |         // @ts-ignore | ||||||
|         this.list = await getSyncData('USERLIST') |         this.list = await getSyncData('USERLIST') | ||||||
|         // @ts-ignore |         // @ts-ignore | ||||||
| @ -212,39 +213,62 @@ struct UserInfo { | |||||||
|         console.log('useruser1,', JSON.stringify(data)) |         console.log('useruser1,', JSON.stringify(data)) | ||||||
| 
 | 
 | ||||||
|         const user = data[0] |         const user = data[0] | ||||||
|         if (user && Number(user.kssycs)) { |         if (!Number(user.kssycs)) { | ||||||
|           let flag = false |  | ||||||
|           this.list.forEach(res => { |  | ||||||
|             if (res.sfzmhm == user.sfzmhm) { |  | ||||||
|               flag = true |  | ||||||
|               res.kssycs = user.kssycs |  | ||||||
|               this.getCurrentStudent(res.sfzmhm) |  | ||||||
|             } |  | ||||||
|           }) |  | ||||||
|           if (!flag) { |  | ||||||
|             this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject) |  | ||||||
|           } |  | ||||||
|         } else if (user && (user.kssycs == '0' || user.kssycs == '')) { |  | ||||||
|           console.log('datadatadatadata') |  | ||||||
|           this.list = this.list.filter(res => { |           this.list = this.list.filter(res => { | ||||||
|             return res.sfzmhm != user.sfzmhm |             return res.sfzmhm != user.sfzmhm | ||||||
|           }) |           }) | ||||||
|           this.pageIndex = 0 |         } | ||||||
|           this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) |         this.pageIndex = 0 | ||||||
|           if (this.dataList.length) { |         this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|             setTimeout(() => { |         if (this.dataList.length) { | ||||||
|               this.currentUser = this.dataList[0] |           setTimeout(() => { | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |             this.currentUser = this.dataList[0] | ||||||
|               globalThis.lsh = this.currentUser.lsh |             this.currentUser.ksy2 = globalThis.kgxm | ||||||
|             }, 200) |             globalThis.lsh = this.currentUser.lsh | ||||||
|           } else { |           }, 200) | ||||||
|             this.currentUser = EmptyCandidateObject |         } else { | ||||||
|           } |           this.currentUser = EmptyCandidateObject | ||||||
|  |           globalThis.lsh = '1111111111111' | ||||||
|         } |         } | ||||||
|         this.list.forEach((res, index) => { |         this.list.forEach((res, index) => { | ||||||
|           res.id = index.toString() |           res.id = index.toString() | ||||||
|         }) |         }) | ||||||
|         await upDateTableByArray('USERLIST', this.list || []) |         await upDateTableByArray('USERLIST', this.list || []) | ||||||
|  | 
 | ||||||
|  |         // if(this.) | ||||||
|  |         // if (user && Number(user.kssycs)) { | ||||||
|  |         // | ||||||
|  |         //   let flag = false | ||||||
|  |         //   this.list.forEach(res => { | ||||||
|  |         //     if (res.sfzmhm == user.sfzmhm) { | ||||||
|  |         //       flag = true | ||||||
|  |         //       res.kssycs = user.kssycs | ||||||
|  |         //       this.getCurrentStudent(res.sfzmhm) | ||||||
|  |         //     } | ||||||
|  |         //   }) | ||||||
|  |         //   if (!flag) { | ||||||
|  |         //     this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject) | ||||||
|  |         //     globalThis.lsh = this.list.length?this.currentUser.lsh:'1111111111111' | ||||||
|  |         //   } | ||||||
|  |         // } else if (user && (user.kssycs == '0' || user.kssycs == '')) { | ||||||
|  |         //   console.log('datadatadatadata') | ||||||
|  |         //   this.list = this.list.filter(res => { | ||||||
|  |         //     return res.sfzmhm != user.sfzmhm | ||||||
|  |         //   }) | ||||||
|  |         //   this.pageIndex = 0 | ||||||
|  |         //   this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|  |         //   if (this.dataList.length) { | ||||||
|  |         //     setTimeout(() => { | ||||||
|  |         //       this.currentUser = this.dataList[0] | ||||||
|  |         //       this.currentUser.ksy2 = globalThis.kgxm | ||||||
|  |         //       globalThis.lsh = this.currentUser.lsh | ||||||
|  |         //     }, 200) | ||||||
|  |         //   } else { | ||||||
|  |         //     this.currentUser = EmptyCandidateObject | ||||||
|  |         //     globalThis.lsh = '1111111111111' | ||||||
|  |         //   } | ||||||
|  |         // } | ||||||
|  | 
 | ||||||
|       } else { |       } else { | ||||||
|         await this.getExaminationStudentInfoFn() |         await this.getExaminationStudentInfoFn() | ||||||
|       } |       } | ||||||
| @ -312,7 +336,7 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|         globalThis.lsh = res.lsh |         globalThis.lsh = res.lsh | ||||||
|         globalThis.ksyh = res.ksy1sfzmhm |         globalThis.ksyh = res.ksy1sfzmhm | ||||||
|         const { examSubject } = globalThis.carInfo; |         const {examSubject} = globalThis.carInfo; | ||||||
|         // this.currentUser.kszp=this.photo+res.kszp |         // this.currentUser.kszp=this.photo+res.kszp | ||||||
|         // this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp |         // this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp | ||||||
|         if (globalThis.singlePlay) { |         if (globalThis.singlePlay) { | ||||||
| @ -339,7 +363,6 @@ struct UserInfo { | |||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         this.currentUser = this.list[0] |         this.currentUser = this.list[0] | ||||||
|         this.currentUser.ksy2 = globalThis.kgxm |         this.currentUser.ksy2 = globalThis.kgxm | ||||||
| 
 |  | ||||||
|         globalThis.lsh = this.currentUser.lsh |         globalThis.lsh = this.currentUser.lsh | ||||||
|       }, 200) |       }, 200) | ||||||
| 
 | 
 | ||||||
| @ -637,19 +660,15 @@ struct UserInfo { | |||||||
|     this.ksksLimit = false |     this.ksksLimit = false | ||||||
|     // this.isBoardPrePareSetPopupOpen=true |     // this.isBoardPrePareSetPopupOpen=true | ||||||
|     this.isFirstBoardPrePareSetPopupBtnShow = false |     this.isFirstBoardPrePareSetPopupBtnShow = false | ||||||
|     console.log('isFirstBoardPrePareSetPopupBtnShow', this.isFirstBoardPrePareSetPopupBtnShow, |     console.log('isFirstBoardPrePareSetPopupBtnShow', this.isFirstBoardPrePareSetPopupBtnShow, this.isBoardPrePareSetPopupOpen) | ||||||
|       this.isBoardPrePareSetPopupOpen) |  | ||||||
|     this.startExam = false |     this.startExam = false | ||||||
|     // await upDateTableByArray('USER', []) |     // await upDateTableByArray('USER', []) | ||||||
|     // await upDateTableByArray('USERLIST', []) |     // await upDateTableByArray('USERLIST', []) | ||||||
|     // await DB.clearTable('USER') | 
 | ||||||
|     // await DB.clearTable('USERLIST') |  | ||||||
|     this.type = '2' |     this.type = '2' | ||||||
|     this.errorDialog.open() |     this.errorDialog.open() | ||||||
|     this.updateTimeLimit = true |     this.updateTimeLimit = true | ||||||
|     const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + |     const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><sfzmhm></sfzmhm></body></getExaminationStudentInfoReq>` | ||||||
|     globalThis.carInfo.examinationRoomId + |  | ||||||
|     globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><sfzmhm></sfzmhm></body></getExaminationStudentInfoReq>` |  | ||||||
|     try { |     try { | ||||||
|       getExaminationStudentInfo(param).then(async (res) => { |       getExaminationStudentInfo(param).then(async (res) => { | ||||||
|         console.log("temp log ", JSON.stringify(res)) |         console.log("temp log ", JSON.stringify(res)) | ||||||
| @ -719,23 +738,24 @@ struct UserInfo { | |||||||
|           return res.kssycs == '1' |           return res.kssycs == '1' | ||||||
|         }) |         }) | ||||||
|         if (this.dataList.length) { |         if (this.dataList.length) { | ||||||
|           if (user.length) { |           // if (user.length) { | ||||||
|             setTimeout(() => { |           //   setTimeout(() => { | ||||||
|               this.currentUser = user[0] |           //     this.currentUser = user[0] | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |           //     this.currentUser.ksy2 = globalThis.kgxm | ||||||
|               globalThis.lsh = this.currentUser.lsh |           //     globalThis.lsh = this.currentUser.lsh | ||||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm |           //     globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||||
|             }, 200) |           //   }, 200) | ||||||
|           } else { |           // } else { | ||||||
|             setTimeout(() => { |           setTimeout(() => { | ||||||
|               this.currentUser = this.dataList[0] |             this.currentUser = this.dataList[0] | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |             this.currentUser.ksy2 = globalThis.kgxm | ||||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm |             globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||||
|               globalThis.lsh = this.currentUser.lsh |             globalThis.lsh = this.currentUser.lsh | ||||||
|             }, 200) |           }, 200) | ||||||
|           } |           // } | ||||||
|         } else { |         } else { | ||||||
|           this.currentUser = EmptyCandidateObject |           this.currentUser = EmptyCandidateObject | ||||||
|  |           globalThis.lsh = '1111111111111' | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -800,8 +820,7 @@ struct UserInfo { | |||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     console.log('JsonJson', JSON.stringify(this.currentUser)) |     console.log('JsonJson', JSON.stringify(this.currentUser)) | ||||||
|     const param = |     const param = `<?xml version="1.0" encoding="UTF-8" ?><examinationStuAbsentReq><body><carId>${globalThis.carInfo.carId}</carId><cardNo>${this.currentUser.sfzmhm}</cardNo><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><lsh>${this.lsh}</lsh></body></examinationStuAbsentReq>` | ||||||
|       `<?xml version="1.0" encoding="UTF-8" ?><examinationStuAbsentReq><body><carId>${globalThis.carInfo.carId}</carId><cardNo>${this.currentUser.sfzmhm}</cardNo><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><lsh>${this.lsh}</lsh></body></examinationStuAbsentReq>` |  | ||||||
|     console.log('carNo1111', param) |     console.log('carNo1111', param) | ||||||
| 
 | 
 | ||||||
|     examinationStuAbsent(param).then(res => { |     examinationStuAbsent(param).then(res => { | ||||||
| @ -837,7 +856,7 @@ struct UserInfo { | |||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     const carInfo = globalThis.carInfo; |     const carInfo = globalThis.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |     const {carId,examinationRoomId} = carInfo; | ||||||
|     const examItems = await getExaminationItem({ |     const examItems = await getExaminationItem({ | ||||||
|       time: getCurrentTime(), |       time: getCurrentTime(), | ||||||
|       carId, |       carId, | ||||||
| @ -859,7 +878,7 @@ struct UserInfo { | |||||||
|     globalThis.statue = 4 |     globalThis.statue = 4 | ||||||
|     this.stepFlag = true |     this.stepFlag = true | ||||||
|     const carInfo = globalThis.carInfo; |     const carInfo = globalThis.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |     const {carId,examinationRoomId} = carInfo; | ||||||
|     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; |     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; | ||||||
|     if (!globalThis.singlePlay) { |     if (!globalThis.singlePlay) { | ||||||
|       //获取已考项目 |       //获取已考项目 | ||||||
| @ -877,7 +896,7 @@ 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() || {}; |       const {code,keystr,message} = await this.beginExam() || {}; | ||||||
|       console.info('surenjun', '开始考试接口调用结束') |       console.info('surenjun', '开始考试接口调用结束') | ||||||
|       // console.info('surenjun',code +'') |       // console.info('surenjun',code +'') | ||||||
|       //@ts-ignore TODO code转换 |       //@ts-ignore TODO code转换 | ||||||
| @ -914,8 +933,8 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   // 检测车门、熄火信号 |   // 检测车门、熄火信号 | ||||||
|   async checkSignal(): Promise<boolean> { |   async checkSignal(): Promise<boolean> { | ||||||
|     const { isCheckFireOpen } = judgeConfig |     const {isCheckFireOpen} = judgeConfig | ||||||
|     const { systemParam, isBoardPrePareSetPopupOpen } = this; |     const {systemParam,isBoardPrePareSetPopupOpen} = this; | ||||||
|     const Param803Str = systemParam.Param803Str |     const Param803Str = systemParam.Param803Str | ||||||
|     if (Param803Str === '') { |     if (Param803Str === '') { | ||||||
|       return true |       return true | ||||||
| @ -1020,8 +1039,8 @@ struct UserInfo { | |||||||
|   // 开始考试 |   // 开始考试 | ||||||
|   async beginExam() { |   async beginExam() { | ||||||
|     const carInfo = globalThis.carInfo; |     const carInfo = globalThis.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |     const {carId,examinationRoomId} = carInfo; | ||||||
|     const { examSubject, plateNo } = carInfo; |     const { examSubject,plateNo } = carInfo; | ||||||
|     const date = new Date() |     const date = new Date() | ||||||
|     globalThis.startHourTime = await getCurrentHourTime() |     globalThis.startHourTime = await getCurrentHourTime() | ||||||
|     const photoBase64 = await this.getPhoto(); |     const photoBase64 = await this.getPhoto(); | ||||||
| @ -1125,13 +1144,11 @@ struct UserInfo { | |||||||
|             } |             } | ||||||
|             .width(165 * this.ratio) |             .width(165 * this.ratio) | ||||||
|             .height(85 * this.ratio) |             .height(85 * this.ratio) | ||||||
|             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : |             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg')) | ||||||
|             $r('app.media.userboxbg')) |  | ||||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) |             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               console.log('this.startExam', this.startExam, this.systemParam.Param364, this.isExamStart) |               console.log('this.startExam', this.startExam, this.systemParam.Param364, this.isExamStart) | ||||||
|               if ((this.isExamStart && !globalThis.singlePlay && this.systemParam.Param341) || |               if (this.startExam && this.systemParam.Param364 == '2') { | ||||||
|                 (this.startExam && this.systemParam.Param364 == '2')) { |  | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               this.currentUser = EmptyCandidateObject |               this.currentUser = EmptyCandidateObject | ||||||
| @ -1205,6 +1222,9 @@ struct UserInfo { | |||||||
|           //   .commStyle() |           //   .commStyle() | ||||||
|           imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.yydj_btn') }) |           imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.yydj_btn') }) | ||||||
|             .margin({ bottom: 12 * this.ratio }) |             .margin({ bottom: 12 * this.ratio }) | ||||||
|  |             .onClick(() => { | ||||||
|  |               globalThis.judgeUdp.askVoice() | ||||||
|  |             }) | ||||||
| 
 | 
 | ||||||
|           // Image($r('app.media.gx_btn')) |           // Image($r('app.media.gx_btn')) | ||||||
|           //   .commStyle() |           //   .commStyle() | ||||||
| @ -1226,17 +1246,14 @@ struct UserInfo { | |||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               // this.avPlayer.playAudio(['button_media.wav']) |               // this.avPlayer.playAudio(['button_media.wav']) | ||||||
|               //  已开始考试不能缺考   已考过一次学员不能缺考                                                 车上不能缺考 |               //  已开始考试不能缺考   已考过一次学员不能缺考                                                 车上不能缺考 | ||||||
|               if (this.ksksLimit || (this.systemParam.Param352Str == '1' && this.currentUser.kssycs == '1') || |               if (this.ksksLimit || (this.systemParam.Param352Str == '1' && this.currentUser.kssycs == '1') || this.systemParam.Param770Str == '1') { | ||||||
|                 this.systemParam.Param770Str == '1') { |  | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               this.ksksLimit = true |               this.ksksLimit = true | ||||||
|               this.qkFlag = true |               this.qkFlag = true | ||||||
|             }) |             }) | ||||||
| 
 | 
 | ||||||
|           if (this.isBoardPrePareSetPopupOpen && |           if (this.isBoardPrePareSetPopupOpen && (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2') && !this.isFirstBoardPrePareSetPopupBtnShow) { | ||||||
|             (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2') && |  | ||||||
|             !this.isFirstBoardPrePareSetPopupBtnShow) { |  | ||||||
|             //上车准备 |             //上车准备 | ||||||
|             // Image($r('app.media.sczb_btn')).commStyle() |             // Image($r('app.media.sczb_btn')).commStyle() | ||||||
|             imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.sczb_btn') }) |             imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.sczb_btn') }) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user