globalThis index userinfo修改
This commit is contained in:
		
							parent
							
								
									34f77cac8d
								
							
						
					
					
						commit
						5cb335da5d
					
				| @ -29,7 +29,8 @@ struct Index { | |||||||
|   @State url: string = '' |   @State url: string = '' | ||||||
|   @State hasAuth: boolean = false; |   @State hasAuth: boolean = false; | ||||||
|   @State dialogVisiable: boolean = false; |   @State dialogVisiable: boolean = false; | ||||||
|   @State isSingle: boolean = false; |   @State singlePlay: boolean = false; | ||||||
|  |   @State baseInfo: object = {  }; | ||||||
|   @State deviceId: string = ''; |   @State deviceId: string = ''; | ||||||
|   @State angle: number = 0 |   @State angle: number = 0 | ||||||
|   @State dialogRatio: number = 0.8 |   @State dialogRatio: number = 0.8 | ||||||
| @ -38,12 +39,13 @@ struct Index { | |||||||
|   @State loading: boolean = false |   @State loading: boolean = false | ||||||
|   @State initParamFlag: boolean = false |   @State initParamFlag: boolean = false | ||||||
|   @State fd: number = -1; |   @State fd: number = -1; | ||||||
|  |   @State carInfo: object = {}; | ||||||
|   @State num: number = 0; |   @State num: number = 0; | ||||||
|   fileHelper = null; |   fileHelper = null; | ||||||
|   errorDialog: CustomDialogController = new CustomDialogController({ |   errorDialog: CustomDialogController = new CustomDialogController({ | ||||||
|     builder: errorMsgDialog({ |     builder: errorMsgDialog({ | ||||||
|       title: globalThis.title, |       title:AppStorage.get('title'), | ||||||
|       type: globalThis.type, |       type: AppStorage.get('type'), | ||||||
|       cancel: () => { |       cancel: () => { | ||||||
|       }, |       }, | ||||||
|       confirm: () => { |       confirm: () => { | ||||||
| @ -54,9 +56,10 @@ struct Index { | |||||||
|   }, |   }, | ||||||
|   ) |   ) | ||||||
|   private fileUtil: FileUtil |   private fileUtil: FileUtil | ||||||
|   private interval = null; |   private interval = -1; | ||||||
|   // private vocObj = null; |   // private vocObj = null; | ||||||
|   private avPlayer |   private avPlayer | ||||||
|  |   private timeInfo | ||||||
|   private workerInstance = null; |   private workerInstance = null; | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
| 
 | 
 | ||||||
| @ -105,9 +108,9 @@ struct Index { | |||||||
| 
 | 
 | ||||||
|       Column() { |       Column() { | ||||||
|         Row() { |         Row() { | ||||||
|           if (!this.isSingle) { |           if (!this.singlePlay) { | ||||||
|             imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_lw') }) |             imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_lw') }) | ||||||
|               .margin({ left: 80 * globalThis.ratio }) |               .margin({ left: 80 * this.ratio }) | ||||||
|               .onClick(async () => { |               .onClick(async () => { | ||||||
|                 // this.vocObj.playAudio({ |                 // this.vocObj.playAudio({ | ||||||
|                 //   type: 1, |                 //   type: 1, | ||||||
| @ -115,7 +118,6 @@ struct Index { | |||||||
|                 // }) |                 // }) | ||||||
|                 // ||!this.initParamFlag |                 // ||!this.initParamFlag | ||||||
|                 if (this.loading) { |                 if (this.loading) { | ||||||
|                   // globalThis.title = '正在初始化,请等待5s后重试' |  | ||||||
|                   // this.errorDialog.open() |                   // this.errorDialog.open() | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
| @ -123,9 +125,9 @@ struct Index { | |||||||
|                   this.angle = 360 |                   this.angle = 360 | ||||||
|                 }, 1000) |                 }, 1000) | ||||||
|                 this.angle = 0 |                 this.angle = 0 | ||||||
|                 if (!globalThis.timeInfo) { |                 if (!this.timeInfo) { | ||||||
|                   globalThis.type = '1' |                   AppStorage.setOrCreate('type',1) | ||||||
|                   globalThis.title = '时间同步接口连接失败' |                   AppStorage.setOrCreate('title','时间同步接口连接失败') | ||||||
|                   this.errorDialog.open() |                   this.errorDialog.open() | ||||||
|                   promptAction.showToast({ |                   promptAction.showToast({ | ||||||
|                     message: `时间同步接口连接失败`, |                     message: `时间同步接口连接失败`, | ||||||
| @ -134,13 +136,13 @@ struct Index { | |||||||
|                   this.loading = false |                   this.loading = false | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|                 if (!globalThis.carInfo) { |                 if (!this.carInfo) { | ||||||
|                   promptAction.showToast({ |                   promptAction.showToast({ | ||||||
|                     message: `车辆信息接口获取失败`, |                     message: `车辆信息接口获取失败`, | ||||||
|                     duration: 3000 |                     duration: 3000 | ||||||
|                   }); |                   }); | ||||||
|                   globalThis.type = '1' |                   AppStorage.setOrCreate('type',1) | ||||||
|                   globalThis.title = '车辆信息接口获取失败' |                   AppStorage.setOrCreate('title','车辆信息接口获取失败') | ||||||
|                   this.errorDialog.open() |                   this.errorDialog.open() | ||||||
|                   this.loading = false |                   this.loading = false | ||||||
|                   return |                   return | ||||||
| @ -150,9 +152,9 @@ struct Index { | |||||||
| 
 | 
 | ||||||
|               }) |               }) | ||||||
|           } |           } | ||||||
|           if (this.isSingle) { |           if (this.singlePlay) { | ||||||
|             imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_dj') }) |             imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_dj') }) | ||||||
|               .margin({ left: 80 * globalThis.ratio }) |               .margin({ left: 80 * this.ratio }) | ||||||
|               .onClick(() => { |               .onClick(() => { | ||||||
|                 if (this.loading) { |                 if (this.loading) { | ||||||
|                   return |                   return | ||||||
| @ -181,7 +183,7 @@ struct Index { | |||||||
|               }) |               }) | ||||||
|           } |           } | ||||||
|           imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_zj') }) |           imageBtn({ btnWidth: '28%', btnHeight: '71%', imgSrc: $r('app.media.index_zj') }) | ||||||
|             .margin({ right: 80 * globalThis.ratio }) |             .margin({ right: 80 * this.ratio }) | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               if (this.loading) { |               if (this.loading) { | ||||||
|                 return |                 return | ||||||
| @ -202,24 +204,20 @@ struct Index { | |||||||
|       Column() { |       Column() { | ||||||
|         Row() { |         Row() { | ||||||
|           Column() { |           Column() { | ||||||
|             Text('V外壳:' + globalThis.version) |             Text('V外壳:' + this.baseInfo.version) | ||||||
|               .fontColor('#CCAE7A') |               .fontColor('#CCAE7A') | ||||||
|               .fontSize(18 * globalThis.ratio) |               .fontSize(18 * this.ratio) | ||||||
|               .width('30%') |               .width('30%') | ||||||
|               .margin({ bottom: 10 }) |               .margin({ bottom: 10 }) | ||||||
|             Text('V评判:' + globalThis.judgeVersion) |             Text('V评判:' +  this.baseInfo.judgeVersion) | ||||||
|               .fontColor('#CCAE7A') |               .fontColor('#CCAE7A') | ||||||
|               .fontSize(18 * globalThis.ratio) |               .fontSize(18 * this.ratio) | ||||||
|               .width('30%') |               .width('30%') | ||||||
|               .margin({ bottom: 10 }) |               .margin({ bottom: 10 }) | ||||||
|             // Text('V 1.0') | 
 | ||||||
|             //   .fontColor('#CCAE7A') |  | ||||||
|             //   .fontSize(22 * globalThis.ratio) |  | ||||||
|             //   .width('30%') |  | ||||||
|             //   .margin({ bottom: 10 }) |  | ||||||
|             Text('授权信息:' + (this.hasAuth ? '已授权' : '未授权')) |             Text('授权信息:' + (this.hasAuth ? '已授权' : '未授权')) | ||||||
|               .fontColor('#CCAE7A') |               .fontColor('#CCAE7A') | ||||||
|               .fontSize(18 * globalThis.ratio) |               .fontSize(18 * this.ratio) | ||||||
|               .width('30%') |               .width('30%') | ||||||
|           } |           } | ||||||
|           .margin({ left: 24 }) |           .margin({ left: 24 }) | ||||||
| @ -228,16 +226,16 @@ struct Index { | |||||||
|               TapGesture({ count: 2 }) |               TapGesture({ count: 2 }) | ||||||
|                 .onAction(() => { |                 .onAction(() => { | ||||||
|                   // takePhotoFn(this.context) |                   // takePhotoFn(this.context) | ||||||
|  |                   this.singlePlay = !this.singlePlay | ||||||
|  |                   AppStorage.setOrCreate('singlePlay',this.singlePlay) | ||||||
| 
 | 
 | ||||||
|                   globalThis.singlePlay = !globalThis.singlePlay |  | ||||||
|                   this.isSingle = globalThis.singlePlay |  | ||||||
|                 }) |                 }) | ||||||
|             ) |             ) | ||||||
|           ) |           ) | ||||||
| 
 | 
 | ||||||
|           Text('考车号:' + this.deviceId) |           Text('考车号:' + this.deviceId) | ||||||
|             .fontColor('#CCAE7A') |             .fontColor('#CCAE7A') | ||||||
|             .fontSize(22 * globalThis.ratio) |             .fontSize(22 * this.ratio) | ||||||
|             .margin({ right: 24 }) |             .margin({ right: 24 }) | ||||||
|         } |         } | ||||||
|         .width('100%') |         .width('100%') | ||||||
| @ -293,9 +291,9 @@ struct Index { | |||||||
|       if (this.delLoading) { |       if (this.delLoading) { | ||||||
|         Column() { |         Column() { | ||||||
|           Image($r('app.media.open_loading')) |           Image($r('app.media.open_loading')) | ||||||
|             .width(200 * globalThis.ratio) |             .width(200 * this.ratio) | ||||||
|             .rotate({ angle: this.angle }) |             .rotate({ angle: this.angle }) | ||||||
|             .height(200 * globalThis.ratio) |             .height(200 * this.ratio) | ||||||
|             .animation({ |             .animation({ | ||||||
|               duration: 5000, // 动画时长 |               duration: 5000, // 动画时长 | ||||||
|               curve: Curve.EaseOut, // 动画曲线 |               curve: Curve.EaseOut, // 动画曲线 | ||||||
| @ -303,27 +301,27 @@ struct Index { | |||||||
|               iterations: -1, // 播放次数 |               iterations: -1, // 播放次数 | ||||||
|               playMode: PlayMode.Normal, // 动画模式 |               playMode: PlayMode.Normal, // 动画模式 | ||||||
|             }) |             }) | ||||||
|             .margin({ top: 30 * globalThis.ratio }) |             .margin({ top: 30 * this.ratio }) | ||||||
| 
 | 
 | ||||||
|           Text('正在清理本地数据,请稍候……') |           Text('正在清理本地数据,请稍候……') | ||||||
|             .fontSize(24 * globalThis.ratio) |             .fontSize(24 * this.ratio) | ||||||
|             .margin({ top: 20 * globalThis.ratio }) |             .margin({ top: 20 * this.ratio }) | ||||||
|             .fontWeight(400) |             .fontWeight(400) | ||||||
|         } |         } | ||||||
|         .visibility(this.delLoading ? Visibility.Visible : Visibility.Hidden) |         .visibility(this.delLoading ? Visibility.Visible : Visibility.Hidden) | ||||||
|         .width(660 * globalThis.ratio) |         .width(660 * this.ratio) | ||||||
|         .height(360 * globalThis.ratio) |         .height(360 * this.ratio) | ||||||
|         .position({ x: 150 * globalThis.ratio, y: 98 * globalThis.ratio }) |         .position({ x: 150 * this.ratio, y: 98 * this.ratio }) | ||||||
|         .backgroundColor('#E6E3DF') |         .backgroundColor('#E6E3DF') | ||||||
|         .borderRadius(19 * globalThis.ratio) |         .borderRadius(19 * this.ratio) | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       if (this.loading) { |       if (this.loading) { | ||||||
|         Column() { |         Column() { | ||||||
|           Image($r('app.media.open_loading')) |           Image($r('app.media.open_loading')) | ||||||
|             .width(200 * globalThis.ratio) |             .width(200 * this.ratio) | ||||||
|             .rotate({ angle: this.angle }) |             .rotate({ angle: this.angle }) | ||||||
|             .height(200 * globalThis.ratio) |             .height(200 * this.ratio) | ||||||
|             .animation({ |             .animation({ | ||||||
|               duration: 5000, // 动画时长 |               duration: 5000, // 动画时长 | ||||||
|               curve: Curve.EaseOut, // 动画曲线 |               curve: Curve.EaseOut, // 动画曲线 | ||||||
| @ -331,22 +329,22 @@ struct Index { | |||||||
|               iterations: -1, // 播放次数 |               iterations: -1, // 播放次数 | ||||||
|               playMode: PlayMode.Normal, // 动画模式 |               playMode: PlayMode.Normal, // 动画模式 | ||||||
|             }) |             }) | ||||||
|             .margin({ top: 30 * globalThis.ratio }) |             .margin({ top: 30 * this.ratio }) | ||||||
|           Image($r('app.media.car')) |           Image($r('app.media.car')) | ||||||
|             .width(80 * globalThis.ratio) |             .width(80 * this.ratio) | ||||||
|             .height(80 * globalThis.ratio) |             .height(80 * this.ratio) | ||||||
|             .position({ x: 288 * globalThis.ratio, y: 89 * globalThis.ratio }) |             .position({ x: 288 * this.ratio, y: 89 * this.ratio }) | ||||||
|           Text('获取考车信息,请稍候……') |           Text('获取考车信息,请稍候……') | ||||||
|             .fontSize(24 * globalThis.ratio) |             .fontSize(24 * this.ratio) | ||||||
|             .margin({ top: 20 * globalThis.ratio }) |             .margin({ top: 20 * this.ratio }) | ||||||
|             .fontWeight(400) |             .fontWeight(400) | ||||||
|         } |         } | ||||||
|         .visibility(this.loading ? Visibility.Visible : Visibility.Hidden) |         .visibility(this.loading ? Visibility.Visible : Visibility.Hidden) | ||||||
|         .width(660 * globalThis.ratio) |         .width(660 * this.ratio) | ||||||
|         .height(360 * globalThis.ratio) |         .height(360 * this.ratio) | ||||||
|         .position({ x: 150 * globalThis.ratio, y: 98 * globalThis.ratio }) |         .position({ x: 150 * this.ratio, y: 98 * this.ratio }) | ||||||
|         .backgroundColor('#E6E3DF') |         .backgroundColor('#E6E3DF') | ||||||
|         .borderRadius(19 * globalThis.ratio) |         .borderRadius(19 * this.ratio) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|     .width('100%') |     .width('100%') | ||||||
| @ -358,28 +356,16 @@ struct Index { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async aboutToAppear() { |   async aboutToAppear() { | ||||||
|     // setInterval(() => { |  | ||||||
|     //   let date = new Date(); |  | ||||||
|     //   console.info('jiangsong1:timeSynchronization begin '); |  | ||||||
|     //   uploadProgressData() |  | ||||||
|     //   let params = { |  | ||||||
|     //     time: dateFormat(date), |  | ||||||
|     //     deviceNo: globalThis.deviceNo, |  | ||||||
|     //     version: globalThis.version, |  | ||||||
|     //     judgeVersion: globalThis.judgeVersion |  | ||||||
|     //   } |  | ||||||
|     //   timeSynchronizationHTTP(params) |  | ||||||
|     // }, 1000) |  | ||||||
| 
 |  | ||||||
|     console.log('diyidiy') |  | ||||||
| 
 |  | ||||||
|     this.avPlayer = new VoiceAnnounce(); |     this.avPlayer = new VoiceAnnounce(); | ||||||
|  |     this.ratio = AppStorage.get('ratio') | ||||||
|     this.initParamFlag = false |     this.initParamFlag = false | ||||||
|     this.delLoading = false |     this.delLoading = false | ||||||
|     this.dialogVisiable = false |     this.dialogVisiable = false | ||||||
|     this.angle = 0 |     this.angle = 0 | ||||||
|     this.loading = false |     this.loading = false | ||||||
|     globalThis.lsh = '1111111111111' |     const baseInfo=AppStorage.get('baseInfo') | ||||||
|  |     baseInfo.lsh = '1111111111111' | ||||||
|  |     AppStorage.setOrCreate('baseInfo',baseInfo) | ||||||
|     globalThis.errorDialog = this.errorDialog |     globalThis.errorDialog = this.errorDialog | ||||||
|     globalThis.udpEvent = new UdpEvent(); |     globalThis.udpEvent = new UdpEvent(); | ||||||
|     getSyncData('MA_SYSSET').then(async data => { |     getSyncData('MA_SYSSET').then(async data => { | ||||||
| @ -417,17 +403,17 @@ struct Index { | |||||||
|     // console.log('mode',mode) |     // console.log('mode',mode) | ||||||
| 
 | 
 | ||||||
|     const param = { |     const param = { | ||||||
|       carId: globalThis.carInfo?.carId, |       carId: this.carInfo?.carId, | ||||||
|       examinationRoomId: globalThis.carInfo?.examinationRoomId, |       examinationRoomId: this.carInfo?.examinationRoomId, | ||||||
|       judgeVersion: globalThis.judgeVersion, |       judgeVersion: this.baseInfo.judgeVersion, | ||||||
|       shellVersion: globalThis.version, |       shellVersion: this.baseInfo.version, | ||||||
|       paraKdid: globalThis.timeInfo?.paraKdid || globalThis.timeInfo?.kdid, |       paraKdid: this.timeInfo?.paraKdid || this.timeInfo?.kdid, | ||||||
|       kdid: globalThis.timeInfo?.kdid || globalThis.timeInfo?.paraKdid, |       kdid: this..timeInfo?.kdid || this.timeInfo?.paraKdid, | ||||||
|       mode: globalThis.timeInfo?.mode, |       mode: this.timeInfo?.mode, | ||||||
|       context: this.context, |       context: this.context, | ||||||
|       host: globalThis.host, |       host: AppStorage.get('host'), | ||||||
|       centerHost: globalThis.timeInfo?.url, |       centerHost: this.timeInfo?.url, | ||||||
|       singlePlay: globalThis.singlePlay |       singlePlay: this.singlePlay | ||||||
|     } |     } | ||||||
|     this.loading = true |     this.loading = true | ||||||
|     console.log("sql 1111") |     console.log("sql 1111") | ||||||
| @ -450,7 +436,7 @@ struct Index { | |||||||
|           data.forEach(sys => { |           data.forEach(sys => { | ||||||
|             //判断是否能点开始考试 |             //判断是否能点开始考试 | ||||||
|             if (sys.v_no === '854') { |             if (sys.v_no === '854') { | ||||||
|               globalThis.param854Str = sys.v_value |               AppStorage.setOrCreate('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) |               // this.Param612Str= decodeURIComponent(sys.v_value) | ||||||
| @ -514,11 +500,14 @@ struct Index { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async heartMsg() { |   async heartMsg() { | ||||||
|     const arr = [globalThis.signNum || 0, globalThis.statue || 1] |     const signNum=AppStorage.get('signNum') as Number | ||||||
|  |     const statue=AppStorage.get('statue') as Number | ||||||
|  |     const lsh=AppStorage.get('lsh') as String | ||||||
|  |     const arr = [signNum || 0, statue || 1] | ||||||
|     let tmpList = []; |     let tmpList = []; | ||||||
|     tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) |     tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) | ||||||
|     tmpList.push(string2Bytes(arr[1], 1 * 8)[0]) |     tmpList.push(string2Bytes(arr[1], 1 * 8)[0]) | ||||||
|     const str = globalThis.lsh || '0000000000000' |     const str = lsh || '0000000000000' | ||||||
|     for (let i = 0; i < str.length; i++) { |     for (let i = 0; i < str.length; i++) { | ||||||
|       tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0]) |       tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0]) | ||||||
|     } |     } | ||||||
| @ -526,8 +515,8 @@ struct Index { | |||||||
|     const param = { |     const param = { | ||||||
|       id: 31, |       id: 31, | ||||||
|       list: tmpList, |       list: tmpList, | ||||||
|       carNo: globalThis.carInfo.carNo, |       carNo: this.carInfo.carNo, | ||||||
|       placeId: globalThis.carInfo.examinationRoomId |       placeId: this.carInfo.examinationRoomId | ||||||
|     } |     } | ||||||
|     // globalThis.udpClient2.initHeartSendMsg(param,this.context) |     // globalThis.udpClient2.initHeartSendMsg(param,this.context) | ||||||
|     if (globalThis.udpClient2.getStatus()) { |     if (globalThis.udpClient2.getStatus()) { | ||||||
| @ -537,9 +526,10 @@ struct Index { | |||||||
| 
 | 
 | ||||||
|   async onPageShow() { |   async onPageShow() { | ||||||
|     console.log('ttttt', 1111) |     console.log('ttttt', 1111) | ||||||
|  |     this.singlePlay=AppStorage.get('singlePlay') | ||||||
|  |     this.baseInfo=AppStorage.get('baseInfo') | ||||||
|     await this.userAuth(); |     await this.userAuth(); | ||||||
|     console.log('globalThis.singlePlay', globalThis.singlePlay) |     if (this.singlePlay == undefined || this.singlePlay == null) { | ||||||
|     if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) { |  | ||||||
|       // setVideoParam() |       // setVideoParam() | ||||||
|       console.log('diyidiy') |       console.log('diyidiy') | ||||||
|       this.context.resourceManager.getRawFileContent("welcome.wav") |       this.context.resourceManager.getRawFileContent("welcome.wav") | ||||||
| @ -556,13 +546,13 @@ struct Index { | |||||||
|           console.log("getRawFileContent promise error is " + error); |           console.log("getRawFileContent promise error is " + error); | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|       globalThis.singlePlay = false |       this.singlePlay = false | ||||||
|  |       AppStorage.setOrCreate('singlePlay',false) | ||||||
|     } |     } | ||||||
|     this.isSingle = globalThis.singlePlay |  | ||||||
|     // this.loading = false |     // 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) |     // const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort) | ||||||
|     globalThis.lsh = '1111111111111' |     AppStorage.setOrCreate('lsh','1111111111111') | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async createAlbum() { |   async createAlbum() { | ||||||
| @ -609,7 +599,6 @@ struct Index { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async initParams() { |   async initParams() { | ||||||
|     // deleteAllFIleLog(GlobalConfig.comoonfileWriteAddress + '/PLC/') |  | ||||||
|     //设置plc udp 同步requesthost |     //设置plc udp 同步requesthost | ||||||
|     await getUDP(this.context, false) |     await getUDP(this.context, false) | ||||||
|     this.loading = false |     this.loading = false | ||||||
| @ -618,17 +607,20 @@ struct Index { | |||||||
|     await getCarInfo() |     await getCarInfo() | ||||||
|     await getUDP2(this.context, false) |     await getUDP2(this.context, false) | ||||||
|     getTCP() |     getTCP() | ||||||
|     this.deviceId = globalThis.carInfo.carNo |     this.carInfo=AppStorage.get('carInfo') | ||||||
|  |     this.deviceId = this.carInfo.carNo | ||||||
|     await setCurrentTime(); |     await setCurrentTime(); | ||||||
|     if (!globalThis.distanceClass) { |     this.timeInfo=AppStorage.get('timeInfo') | ||||||
|       const distanceClass = new GetDistance(globalThis.context) |     const distanceClass=AppStorage.get('distanceClass') as boolean | ||||||
|  |     if (!distanceClass) { | ||||||
|  |       const distanceClass = new GetDistance(this.context) | ||||||
|       await distanceClass.initFolder() |       await distanceClass.initFolder() | ||||||
|       globalThis.distanceClass = distanceClass |       AppStorage.setOrCreate('distanceClass',distanceClass) | ||||||
|       console.info('surenjun', 'distanceClass=>初始化完成') |       console.info('surenjun', 'distanceClass=>初始化完成') | ||||||
|     } |     } | ||||||
|     this.carNum = globalThis.carInfo.plateNo; |     this.carNum = this.carInfo.plateNo; | ||||||
|     this.version = globalThis.version; |     this.version = this.baseInfo.version; | ||||||
|     this.hasAuth = globalThis.hasAuth; |     this.hasAuth =  this.baseInfo.hasAuth; | ||||||
|     setTimeout(() => { |     setTimeout(() => { | ||||||
|       this.initParamFlag = true |       this.initParamFlag = true | ||||||
|     }, 3000) |     }, 3000) | ||||||
| @ -644,11 +636,6 @@ struct Index { | |||||||
|       } |       } | ||||||
|     }, 1000) |     }, 1000) | ||||||
|     this.createAlbum() |     this.createAlbum() | ||||||
|     //  clearInterval(globalThis.demo) |  | ||||||
|     // globalThis.demo= setInterval(()=>{ |  | ||||||
|     //   const str= {"carId":"1062","examinationRoomId":"2","videoVersion":"1.0","judgeVersion":"2023.09.30.1","shellVersion":"2023.12.13.01","host":"http://172.37.55.191:8082"} |  | ||||||
|     //   initialization(str) |  | ||||||
|     //  },10000) |  | ||||||
|     //下载模型 |     //下载模型 | ||||||
|     // await this.getModel() |     // await this.getModel() | ||||||
|     // const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00] |     // const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00] | ||||||
|  | |||||||
| @ -86,6 +86,7 @@ struct UserInfo { | |||||||
|     Param398: '0' |     Param398: '0' | ||||||
|   } |   } | ||||||
|   @State startExam: boolean = false |   @State startExam: boolean = false | ||||||
|  |   @State singlePlay: boolean = false | ||||||
|   //开始考试准备 |   //开始考试准备 | ||||||
|   prePareExam = async () => { |   prePareExam = async () => { | ||||||
|     if (this.ksksLimit) { |     if (this.ksksLimit) { | ||||||
| @ -95,14 +96,14 @@ struct UserInfo { | |||||||
|     try { |     try { | ||||||
|       await this.checkSignal() |       await this.checkSignal() | ||||||
|       this.faceCompareSucess = 0 |       this.faceCompareSucess = 0 | ||||||
|       globalThis.statue = 2 |       AppStorage.setOrCreate('statue',2) | ||||||
|       if (!this.currentUser.xm) { |       if (!this.currentUser.xm) { | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
|       this.ksksLimit = true |       this.ksksLimit = true | ||||||
| 
 | 
 | ||||||
|       if (globalThis.singlePlay) { |       if (this.singlePlay) { | ||||||
|         const { examSubject } = globalThis.carInfo; |         const { examSubject } = this.carInfo; | ||||||
|         this.currentUser.id = '0' |         this.currentUser.id = '0' | ||||||
|         await upDateTableByArray('USER', [this.currentUser]) |         await upDateTableByArray('USER', [this.currentUser]) | ||||||
|         router.pushUrl({ |         router.pushUrl({ | ||||||
| @ -151,9 +152,8 @@ struct UserInfo { | |||||||
|   private filePhoto: FilePhoto |   private filePhoto: FilePhoto | ||||||
|   // 过程照片拍照 |   // 过程照片拍照 | ||||||
|   getPhoto = async (empty?: boolean) => { |   getPhoto = async (empty?: boolean) => { | ||||||
|     const singlePlay = globalThis.singlePlay |  | ||||||
|     //单机模式返回空照片 |     //单机模式返回空照片 | ||||||
|     if (singlePlay) { |     if (this.singlePlay) { | ||||||
|       return '' |       return '' | ||||||
|     } else { |     } else { | ||||||
|       const photoBase64 = await this.filePhoto.getPhoto(); |       const photoBase64 = await this.filePhoto.getPhoto(); | ||||||
| @ -183,6 +183,9 @@ struct UserInfo { | |||||||
|     this.ksksLimit = false |     this.ksksLimit = false | ||||||
|     this.currentUser = EmptyCandidateObject |     this.currentUser = EmptyCandidateObject | ||||||
|     this.filePhoto = new FilePhoto(this.context); |     this.filePhoto = new FilePhoto(this.context); | ||||||
|  |     this.singlePlay = AppStorage.get('singlePlay') | ||||||
|  |     this.examinerLoginInfo=AppStorage.get('examinerLoginInfo') | ||||||
|  |     this.carInfo=AppStorage.get('carInfo') | ||||||
|     //语音功能on |     //语音功能on | ||||||
|     // new WebRTCVoice(this.context); |     // new WebRTCVoice(this.context); | ||||||
|     //初始化数据 |     //初始化数据 | ||||||
| @ -192,7 +195,7 @@ struct UserInfo { | |||||||
|     const routerParam = router.getParams() || { type: 0 }; |     const routerParam = router.getParams() || { type: 0 }; | ||||||
|     console.log('routerParam', JSON.stringify(routerParam)) |     console.log('routerParam', JSON.stringify(routerParam)) | ||||||
| 
 | 
 | ||||||
|     if (!globalThis.singlePlay) { |     if (!this.singlePlay) { | ||||||
|       // @ts-ignore |       // @ts-ignore | ||||||
|       if (routerParam.type != 1) { |       if (routerParam.type != 1) { | ||||||
|         // @ts-ignore |         // @ts-ignore | ||||||
| @ -225,8 +228,8 @@ struct UserInfo { | |||||||
|           if (this.dataList.length) { |           if (this.dataList.length) { | ||||||
|             setTimeout(() => { |             setTimeout(() => { | ||||||
|               this.currentUser = this.dataList[0] |               this.currentUser = this.dataList[0] | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |               this.currentUser.ksy2 = this.examinerLoginInfo.kgxm | ||||||
|               globalThis.lsh = this.currentUser.lsh |               AppStorage.setOrCreate('lsh',this.currentUser.lsh) | ||||||
|             }, 200) |             }, 200) | ||||||
|           } else { |           } else { | ||||||
|             this.currentUser = EmptyCandidateObject |             this.currentUser = EmptyCandidateObject | ||||||
| @ -270,7 +273,7 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   //身份证读卡器初始化 |   //身份证读卡器初始化 | ||||||
|   openDeviceByIDCard() { |   openDeviceByIDCard() { | ||||||
|     globalThis.indexComponent = this; |     AppStorage.setOrCreate('indexComponent',this) | ||||||
|     // 应用启动时打开读卡设备 |     // 应用启动时打开读卡设备 | ||||||
|     let ret = testNapi.OpenDevice(); |     let ret = testNapi.OpenDevice(); | ||||||
|     if (ret == 0) { |     if (ret == 0) { | ||||||
| @ -298,17 +301,17 @@ struct UserInfo { | |||||||
|         this.currentUser = EmptyCandidateObject |         this.currentUser = EmptyCandidateObject | ||||||
|         setTimeout(() => { |         setTimeout(() => { | ||||||
|           this.currentUser = res |           this.currentUser = res | ||||||
|           this.currentUser.ksy2 = globalThis.kgxm |           this.currentUser.ksy2 = this.examinerLoginInfo.kgxm | ||||||
|         }, 200) |         }, 200) | ||||||
| 
 | 
 | ||||||
|         globalThis.lsh = res.lsh |         this.examinerLoginInfo.ksyh = res.ksy1sfzmhm | ||||||
|         globalThis.ksyh = res.ksy1sfzmhm |         AppStorage.setOrCreate('examinerLoginInfo',this.examinerLoginInfo) | ||||||
|         const { examSubject } = globalThis.carInfo; |         AppStorage.setOrCreate('lsh',res.lsh) | ||||||
|  |         const { examSubject } = this.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 (this.singlePlay) { | ||||||
|           this.stopDeviceById() |           this.stopDeviceById() | ||||||
|           // globalThis.statue=4 |  | ||||||
|           router.pushUrl({ |           router.pushUrl({ | ||||||
|             url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', |             url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge', | ||||||
|             params: { |             params: { | ||||||
| @ -325,13 +328,13 @@ struct UserInfo { | |||||||
|     }) |     }) | ||||||
|     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) |     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|     if (!flag) { |     if (!flag) { | ||||||
|       globalThis.lsh = '0000000000000' | 
 | ||||||
|  |       AppStorage.setOrCreate('lsh','0000000000000') | ||||||
|       await upDateTableByArray('USER', []) |       await upDateTableByArray('USER', []) | ||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         this.currentUser = this.list[0] |         this.currentUser = this.list[0] | ||||||
|         this.currentUser.ksy2 = globalThis.kgxm |         this.currentUser.ksy2 = this.examinerLoginInfo.kgxm | ||||||
| 
 |         AppStorage.setOrCreate('lsh',this.currentUser.lsh) | ||||||
|         globalThis.lsh = this.currentUser.lsh |  | ||||||
|       }, 200) |       }, 200) | ||||||
| 
 | 
 | ||||||
|       // promptAction.showToast({ |       // promptAction.showToast({ | ||||||
| @ -343,7 +346,7 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   onReadCard(ret: IDCardSDK.IDCardInfo) { |   onReadCard(ret: IDCardSDK.IDCardInfo) { | ||||||
|     console.info(`zzctest xx Read Card ret =${ret.status}`) |     console.info(`zzctest xx Read Card ret =${ret.status}`) | ||||||
|     let thisVar = globalThis.indexComponent; |     let thisVar = AppStorage.get('indexComponent'); | ||||||
| 
 | 
 | ||||||
|     if (ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 |     if (ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 | ||||||
|       // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。 |       // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。 | ||||||
| @ -405,11 +408,11 @@ struct UserInfo { | |||||||
|     this.showFaceCompare = false |     this.showFaceCompare = false | ||||||
|     this.lsh = '1111111111111' |     this.lsh = '1111111111111' | ||||||
|     this.callBackFlag = false |     this.callBackFlag = false | ||||||
|     globalThis.lsh = this.lsh |     AppStorage.setOrCreate('lsh',this.lsh) | ||||||
|  |     AppStorage.setOrCreate('statue',2) | ||||||
|     // this.currentUser = EmptyCandidateObject |     // this.currentUser = EmptyCandidateObject | ||||||
|     globalThis.statue = 2 |  | ||||||
|     this.numCount = 0 |     this.numCount = 0 | ||||||
|     if (globalThis.singlePlay) { |     if (thiis.singlePlay) { | ||||||
|       // TODO 模拟假数据 |       // TODO 模拟假数据 | ||||||
|       this.list = CandidateData |       this.list = CandidateData | ||||||
|       this.pageIndex = 0 |       this.pageIndex = 0 | ||||||
| @ -418,8 +421,9 @@ struct UserInfo { | |||||||
|       this.currentUser.ksy2 = '' |       this.currentUser.ksy2 = '' | ||||||
| 
 | 
 | ||||||
|       this.lsh = this.currentUser.lsh |       this.lsh = this.currentUser.lsh | ||||||
|       globalThis.ksyh = this.currentUser.ksy1sfzmhm |       this.examinerLoginInfo.ksyh=this.currentUser.ksy1sfzmhm | ||||||
|       globalThis.lsh = this.lsh |       AppStorage.setOrCreate('examinerLoginInfo',this.examinerLoginInfo) | ||||||
|  |       AppStorage.setOrCreate('lsh',this.lsh) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // const syssetParams = await getSyncData('MA_SYSSET'); |     // const syssetParams = await getSyncData('MA_SYSSET'); | ||||||
| @ -430,7 +434,7 @@ struct UserInfo { | |||||||
|   async heartMsg() { |   async heartMsg() { | ||||||
|     globalThis.udpClient2 & globalThis.udpClient2.setMsgCallBack(async (val) => { |     globalThis.udpClient2 & globalThis.udpClient2.setMsgCallBack(async (val) => { | ||||||
|       if (val.id == '32') { |       if (val.id == '32') { | ||||||
|         globalThis.signNum = val.body[1] |         AppStorage.setOrCreate('signNum', val.body[1]) | ||||||
|         if (val.body[0] == '7') { |         if (val.body[0] == '7') { | ||||||
|           //缺考处理 |           //缺考处理 | ||||||
|           this.getqkFn() |           this.getqkFn() | ||||||
| @ -447,12 +451,12 @@ struct UserInfo { | |||||||
|   //考点端查询缺考指令内容消息请求 |   //考点端查询缺考指令内容消息请求 | ||||||
|   getqkFn() { |   getqkFn() { | ||||||
|     let tmpList: Array<number> = []; |     let tmpList: Array<number> = []; | ||||||
|     tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0]) |     tmpList.push(string2Bytes(AppStorage.get('signNum'), 1 * 8)[0]) | ||||||
|     const param: QKParamType = { |     const param: QKParamType = { | ||||||
|       id: 41, |       id: 41, | ||||||
|       list: tmpList, |       list: tmpList, | ||||||
|       carNo: globalThis.carInfo.carNo as string, |       carNo: this.carInfo.carNo as string, | ||||||
|       placeId: globalThis.carInfo.examinationRoomId as string |       placeId: this.carInfo.examinationRoomId as string | ||||||
|     } |     } | ||||||
|     globalThis.udpClient2.sendMsgExt(param, this.context) |     globalThis.udpClient2.sendMsgExt(param, this.context) | ||||||
|   } |   } | ||||||
| @ -595,7 +599,7 @@ struct UserInfo { | |||||||
|     console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser)) |     console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser)) | ||||||
|     if (this.faceCompareSucess > 0) { |     if (this.faceCompareSucess > 0) { | ||||||
|       //人脸比对通过 |       //人脸比对通过 | ||||||
|       globalThis.statue = 4 |       AppStorage.setOrCreate('statue',4) | ||||||
|       this.showFaceCompare = false |       this.showFaceCompare = false | ||||||
|       this.sfbdinterfaceFn() |       this.sfbdinterfaceFn() | ||||||
|     } |     } | ||||||
| @ -619,7 +623,7 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   //获取下载考生 |   //获取下载考生 | ||||||
|   async getExaminationStudentInfoFn() { |   async getExaminationStudentInfoFn() { | ||||||
|     if (globalThis.singlePlay || this.updateTimeLimit) { |     if (this.singlePlay || this.updateTimeLimit) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     this.isExamStart = false |     this.isExamStart = false | ||||||
| @ -638,9 +642,9 @@ struct UserInfo { | |||||||
|     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(this.carInfo.carId + | ||||||
|     globalThis.carInfo.examinationRoomId + |     this.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>` |     this.examinerLoginInfo.username)}</checkCode></head><body><carId>${this.carInfo.carId}</carId><examinationRoomId>${this.carInfo.examinationRoomId}</examinationRoomId><examinerName>${this.examinerLoginInfo.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)) | ||||||
| @ -686,10 +690,10 @@ struct UserInfo { | |||||||
|           } |           } | ||||||
|           if (this.systemParam.Param828Str == '1' || this.systemParam.Param828Str == '2') { |           if (this.systemParam.Param828Str == '1' || this.systemParam.Param828Str == '2') { | ||||||
|             // listData.ksy2=listData.ksy1; |             // listData.ksy2=listData.ksy1; | ||||||
|             listData.ksy2 = globalThis.kgxm |             listData.ksy2 = this.examinerLoginInfo.kgxm | ||||||
|           } else { |           } else { | ||||||
|             // listData.ksy2=listData.ksy2; |             // listData.ksy2=listData.ksy2; | ||||||
|             listData.ksy2 = globalThis.kgxm |             listData.ksy2 = this.examinerLoginInfo.kgxm | ||||||
|           } |           } | ||||||
|           listData.kszp = this.photo + listData.kszp |           listData.kszp = this.photo + listData.kszp | ||||||
|           listData.ksmjzp = this.photo + listData.ksmjzp |           listData.ksmjzp = this.photo + listData.ksmjzp | ||||||
| @ -708,47 +712,16 @@ struct UserInfo { | |||||||
|           return res.kssycs == '1' |           return res.kssycs == '1' | ||||||
|         }) |         }) | ||||||
|         if (this.dataList.length) { |         if (this.dataList.length) { | ||||||
|           if (user.length) { |           setTimeout(() => { | ||||||
|             setTimeout(() => { |             this.currentUser=user.length?user[0]:this.dataList[0] | ||||||
|               this.currentUser = user[0] |             this.currentUser.ksy2 = this.examinerLoginInfo.kgxm | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |             AppStorage.setOrCreate('lsh',this.currentUser.lsh) | ||||||
|               globalThis.lsh = this.currentUser.lsh |             this.examinerLoginInfo.ksyh=this.currentUser.ksy1sfzmhm | ||||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm |             AppStorage.setOrCreate('examinerLoginInfo',this.examinerLoginInfo) | ||||||
|             }, 200) |           }, 200) | ||||||
|           } else { |  | ||||||
|             setTimeout(() => { |  | ||||||
|               this.currentUser = this.dataList[0] |  | ||||||
|               this.currentUser.ksy2 = globalThis.kgxm |  | ||||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm |  | ||||||
|               globalThis.lsh = this.currentUser.lsh |  | ||||||
|             }, 200) |  | ||||||
|           } |  | ||||||
|         } else { |         } else { | ||||||
|           this.currentUser = EmptyCandidateObject |           this.currentUser = EmptyCandidateObject | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|         // const flag=dataList.filter((res)=>{ |  | ||||||
|         //    return res.sfzmhm==this.currentUser.sfzmhm |  | ||||||
|         // }).length?true:false |  | ||||||
|         // if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){ |  | ||||||
|         //   if (this.dataList.length) { |  | ||||||
|         //     setTimeout(()=>{ |  | ||||||
|         //       this.currentUser = this.dataList[0] |  | ||||||
|         //       this.currentUser.ksy2= globalThis.kgxm |  | ||||||
|         //       globalThis.lsh=this.currentUser.lsh |  | ||||||
|         //     },200) |  | ||||||
|         //     console.log('this.currentUser1',JSON.stringify(this.currentUser)) |  | ||||||
|         //   } else { |  | ||||||
|         //     this.currentUser = EmptyCandidateObject |  | ||||||
|         //   } |  | ||||||
|         // } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|         // this.lsh = this.currentUser.lsh |  | ||||||
|         // globalThis.lsh = this.lsh |  | ||||||
|         // globalThis.ksyh = this.currentUser.ksy1sfzmhm |  | ||||||
| 
 |  | ||||||
|         //364	绕车一周评判时机(1-开始考试后判 2-开始考试前判) |         //364	绕车一周评判时机(1-开始考试后判 2-开始考试前判) | ||||||
|         if (this.systemParam.Param364 == '2') { |         if (this.systemParam.Param364 == '2') { | ||||||
|           this.isBoardPrePareSetPopupOpen = true; |           this.isBoardPrePareSetPopupOpen = true; | ||||||
| @ -784,13 +757,13 @@ struct UserInfo { | |||||||
|     } |     } | ||||||
|     this.faceCompareSucess = 0 |     this.faceCompareSucess = 0 | ||||||
|     this.ksksLimit = false |     this.ksksLimit = false | ||||||
|     if (globalThis.singlePlay) { |     if (this.singlePlay) { | ||||||
|       this.qkFlag = false |       this.qkFlag = false | ||||||
|       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>${this.carInfo.carId}</carId><cardNo>${this.currentUser.sfzmhm}</cardNo><examinationRoomId>${this.carInfo.examinationRoomId}</examinationRoomId><examinerName>${this.examinerLoginInfo.username}</examinerName><lsh>${this.lsh}</lsh></body></examinationStuAbsentReq>` | ||||||
|     console.log('carNo1111', param) |     console.log('carNo1111', param) | ||||||
| 
 | 
 | ||||||
|     examinationStuAbsent(param).then(res => { |     examinationStuAbsent(param).then(res => { | ||||||
| @ -798,12 +771,12 @@ struct UserInfo { | |||||||
|       let tmpList = []; |       let tmpList = []; | ||||||
|       tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) |       tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) | ||||||
|       tmpList.push(string2Bytes(arr[1], 1 * 8)[0]) |       tmpList.push(string2Bytes(arr[1], 1 * 8)[0]) | ||||||
|       console.log('globalThis.signNum', globalThis.signNum) | 
 | ||||||
|       const param = { |       const param = { | ||||||
|         id: 43, |         id: 43, | ||||||
|         list: tmpList, |         list: tmpList, | ||||||
|         carNo: globalThis.carInfo.carNo, |         carNo: this.carInfo.carNo, | ||||||
|         placeId: globalThis.carInfo.examinationRoomId |         placeId: this.carInfo.examinationRoomId | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       globalThis.udpClient2.sendMsgExt(param, this.context) |       globalThis.udpClient2.sendMsgExt(param, this.context) | ||||||
| @ -822,11 +795,10 @@ struct UserInfo { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async getExaminationItemFn() { |   async getExaminationItemFn() { | ||||||
|     if (!this.currentUser.lsh || globalThis.singlePlay) { |     if (!this.currentUser.lsh || this.singlePlay) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     const carInfo = globalThis.carInfo; |     const { carId, examinationRoomId } = this.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |  | ||||||
|     const examItems = await getExaminationItem({ |     const examItems = await getExaminationItem({ | ||||||
|       time: getCurrentTime(), |       time: getCurrentTime(), | ||||||
|       carId, |       carId, | ||||||
| @ -845,12 +817,11 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   //身份比对 |   //身份比对 | ||||||
|   async sfbdinterfaceFn() { |   async sfbdinterfaceFn() { | ||||||
|     globalThis.statue = 4 |     AppStorage.setOrCreate('statue',4) | ||||||
|     this.stepFlag = true |     this.stepFlag = true | ||||||
|     const carInfo = globalThis.carInfo; |     const { carId, examinationRoomId } = this.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |  | ||||||
|     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; |     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; | ||||||
|     if (!globalThis.singlePlay) { |     if (!this.singlePlay) { | ||||||
|       //获取已考项目 |       //获取已考项目 | ||||||
|       // @ts-ignore |       // @ts-ignore | ||||||
|       examItems = await getExaminationItem({ |       examItems = await getExaminationItem({ | ||||||
| @ -1008,11 +979,11 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   // 开始考试 |   // 开始考试 | ||||||
|   async beginExam() { |   async beginExam() { | ||||||
|     const carInfo = globalThis.carInfo; |     const { carId, examinationRoomId } = this.carInfo; | ||||||
|     const { carId, examinationRoomId } = carInfo; |     const { examSubject, plateNo } = this.carInfo; | ||||||
|     const { examSubject, plateNo } = carInfo; |  | ||||||
|     const date = new Date() |     const date = new Date() | ||||||
|     globalThis.startHourTime = await getCurrentHourTime() |     const startHourTime = await getCurrentHourTime() | ||||||
|  |     AppStorage.setOrCreate('startHourTime',startHourTime) | ||||||
|     const photoBase64 = await this.getPhoto(); |     const photoBase64 = await this.getPhoto(); | ||||||
|     if (photoBase64 == '') { |     if (photoBase64 == '') { | ||||||
|       this.ksksLimit = false |       this.ksksLimit = false | ||||||
| @ -1041,8 +1012,9 @@ struct UserInfo { | |||||||
|     } |     } | ||||||
|     console.info('surenjunjianguan', JSON.stringify(param)) |     console.info('surenjunjianguan', JSON.stringify(param)) | ||||||
|     const temp = await writeObjectOut(param); |     const temp = await writeObjectOut(param); | ||||||
|     globalThis.lsh = this.currentUser.lsh |     AppStorage.setOrCreate('lsh',this.currentUser.lsh) | ||||||
|     globalThis.ksyh = this.currentUser.ksy1sfzmhm |     this.examinerLoginInfo.ksyh= this.currentUser.ksy1sfzmhm | ||||||
|  |     AppStorage.setOrCreate('examinerLoginInfo',this.examinerLoginInfo) | ||||||
|     return temp |     return temp | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -1060,7 +1032,7 @@ struct UserInfo { | |||||||
|       // await upDateTableByArray('USER', [this.currentUser]) |       // await upDateTableByArray('USER', [this.currentUser]) | ||||||
|       console.log("User", JSON.stringify(this.currentUser)) |       console.log("User", JSON.stringify(this.currentUser)) | ||||||
|       // await sqlInsertCommonFn("USER", [this.currentUser]) |       // await sqlInsertCommonFn("USER", [this.currentUser]) | ||||||
|       globalThis.statue = 4 |       AppStorage.setOrCreate('statue',4) | ||||||
|       this.isBoardPrePareSetPopupShow = true; |       this.isBoardPrePareSetPopupShow = true; | ||||||
|       this.isFirstBoardPrePareSetPopupBtnShow = true; |       this.isFirstBoardPrePareSetPopupBtnShow = true; | ||||||
|       this.stepFlag = false |       this.stepFlag = false | ||||||
| @ -1119,15 +1091,15 @@ struct UserInfo { | |||||||
|             .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.isExamStart && !this.singlePlay && this.systemParam.Param341) || | ||||||
|                 (this.startExam && this.systemParam.Param364 == '2')) { |                 (this.startExam && this.systemParam.Param364 == '2')) { | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               this.currentUser = EmptyCandidateObject |               this.currentUser = EmptyCandidateObject | ||||||
|               globalThis.lsh = item.lsh; |               AppStorage.setOrCreate('lsh',item.lsh) | ||||||
|               setTimeout(() => { |               setTimeout(() => { | ||||||
|                 this.currentUser = item |                 this.currentUser = item | ||||||
|                 this.currentUser.ksy2 = globalThis.kgxm |                 this.currentUser.ksy2 = this.examinerLoginInfo.kgxm | ||||||
| 
 | 
 | ||||||
|               }, 200) |               }, 200) | ||||||
| 
 | 
 | ||||||
| @ -1201,7 +1173,7 @@ struct UserInfo { | |||||||
|             .margin({ bottom: 12 * this.ratio }) |             .margin({ bottom: 12 * this.ratio }) | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               // this.avPlayer.playAudio(['button_media.wav']) |               // this.avPlayer.playAudio(['button_media.wav']) | ||||||
|               if (this.isExamStart && !globalThis.singlePlay) { |               if (this.isExamStart && !this.singlePlay) { | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               this.faceCompareSucess = 0 |               this.faceCompareSucess = 0 | ||||||
| @ -1259,7 +1231,7 @@ struct UserInfo { | |||||||
|           getqkFlag: $getqkFlag, |           getqkFlag: $getqkFlag, | ||||||
|           faceCatchImg: $faceCatchImg, |           faceCatchImg: $faceCatchImg, | ||||||
|           showFaceCompare: $showFaceCompare, |           showFaceCompare: $showFaceCompare, | ||||||
|           lsh: globalThis.lsh, |           lsh: AppStorage.get('lsh'), | ||||||
|         }) |         }) | ||||||
|       } |       } | ||||||
|       if (this.qkFlag) { |       if (this.qkFlag) { | ||||||
| @ -1389,7 +1361,7 @@ struct LabelBlock { | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type systemParam = { | interface systemParam  { | ||||||
|   'Param341': boolean, //是否按顺序考试 |   'Param341': boolean, //是否按顺序考试 | ||||||
|   'Param803Str': string, //开始考试前必须解开安全带或关车门 |   'Param803Str': string, //开始考试前必须解开安全带或关车门 | ||||||
|   'Param612Str': string, //开始考试触发方式 |   'Param612Str': string, //开始考试触发方式 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user