dev #65
@ -54,6 +54,7 @@ export const initJudgeUdp = async () => {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const getMessageHeartbeat = async (msg) => {
 | 
					export const getMessageHeartbeat = async (msg) => {
 | 
				
			||||||
 | 
					  console.info('surenjun','getMessageHeartbeat start')
 | 
				
			||||||
  const carInfo = globalThis.carInfo;
 | 
					  const carInfo = globalThis.carInfo;
 | 
				
			||||||
  const { examSubject,plateNo } = carInfo;
 | 
					  const { examSubject,plateNo } = carInfo;
 | 
				
			||||||
  const ksyh='0000000000000'
 | 
					  const ksyh='0000000000000'
 | 
				
			||||||
@ -62,7 +63,7 @@ export const getMessageHeartbeat = async (msg) => {
 | 
				
			|||||||
  const asclshArr = stringToASC(fillZero(
 | 
					  const asclshArr = stringToASC(fillZero(
 | 
				
			||||||
    globalThis.singlePlay
 | 
					    globalThis.singlePlay
 | 
				
			||||||
      ? (examSubject == 2 ? '0000000000000' : '0000000000000')
 | 
					      ? (examSubject == 2 ? '0000000000000' : '0000000000000')
 | 
				
			||||||
      : globalThis.lsh,
 | 
					      : (globalThis.lsh ||  '0000000000000'),
 | 
				
			||||||
    13));
 | 
					    13));
 | 
				
			||||||
  const ascksyhArr = stringToASC(fillZero(ksyh, 13))
 | 
					  const ascksyhArr = stringToASC(fillZero(ksyh, 13))
 | 
				
			||||||
  const ascsbxhArr = stringToASC('00000000')
 | 
					  const ascsbxhArr = stringToASC('00000000')
 | 
				
			||||||
@ -141,7 +142,7 @@ export const getMessageHeartbeat = async (msg) => {
 | 
				
			|||||||
  arr.forEach(itemArr => {
 | 
					  arr.forEach(itemArr => {
 | 
				
			||||||
    tempArr = tempArr.concat(itemArr)
 | 
					    tempArr = tempArr.concat(itemArr)
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					  console.info('surenjun','getMessageHeartbeat end')
 | 
				
			||||||
  globalThis.serialIndex = 0;
 | 
					  globalThis.serialIndex = 0;
 | 
				
			||||||
  return Array2Byte(tempArr)
 | 
					  return Array2Byte(tempArr)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -204,13 +204,11 @@ 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
 | 
				
			||||||
        const data = await getSyncData('USER')
 | 
					        const data = await getSyncData('USER')
 | 
				
			||||||
        console.log('useruser,', JSON.stringify(this.list))
 | 
					 | 
				
			||||||
        console.log('useruser1,', JSON.stringify(data))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const user = data[0]
 | 
					        const user = data[0]
 | 
				
			||||||
        if (user && Number(user.kssycs)) {
 | 
					        if (user && Number(user.kssycs)) {
 | 
				
			||||||
          let flag = false
 | 
					          let flag = false
 | 
				
			||||||
@ -223,7 +221,11 @@ struct UserInfo {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          if (!flag) {
 | 
					          if (!flag) {
 | 
				
			||||||
            this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject)
 | 
					            this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject)
 | 
				
			||||||
            globalThis.lsh = this.list.length?this.currentUser.lsh:'1111111111111'
 | 
					            globalThis.lsh =
 | 
				
			||||||
 | 
					              this.list.length
 | 
				
			||||||
 | 
					                ? this.currentUser.lsh
 | 
				
			||||||
 | 
					                :'1111111111111'
 | 
				
			||||||
 | 
					            console.info('surenjun 当前的流水号1为:' + globalThis.lsh)
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        } else if (user && (user.kssycs == '0' || user.kssycs == '')) {
 | 
					        } else if (user && (user.kssycs == '0' || user.kssycs == '')) {
 | 
				
			||||||
          console.log('datadatadatadata')
 | 
					          console.log('datadatadatadata')
 | 
				
			||||||
@ -237,10 +239,12 @@ struct UserInfo {
 | 
				
			|||||||
              this.currentUser = this.dataList[0]
 | 
					              this.currentUser = this.dataList[0]
 | 
				
			||||||
              this.currentUser.ksy2 = globalThis.kgxm
 | 
					              this.currentUser.ksy2 = globalThis.kgxm
 | 
				
			||||||
              globalThis.lsh = this.currentUser.lsh
 | 
					              globalThis.lsh = this.currentUser.lsh
 | 
				
			||||||
 | 
					              console.info('surenjun 当前的流水号2为:' + globalThis.lsh)
 | 
				
			||||||
            }, 200)
 | 
					            }, 200)
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            this.currentUser = EmptyCandidateObject
 | 
					            this.currentUser = EmptyCandidateObject
 | 
				
			||||||
            globalThis.lsh = '1111111111111'
 | 
					            globalThis.lsh = '1111111111111'
 | 
				
			||||||
 | 
					            console.info('surenjun 当前的流水号3为:' + globalThis.lsh)
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this.list.forEach((res, index) => {
 | 
					        this.list.forEach((res, index) => {
 | 
				
			||||||
@ -269,7 +273,6 @@ struct UserInfo {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    //监听远程开始考试
 | 
					    //监听远程开始考试
 | 
				
			||||||
    globalThis.udpEvent.onBeginExam(async () => {
 | 
					    globalThis.udpEvent.onBeginExam(async () => {
 | 
				
			||||||
      console.info('surenjun', 'userInfo收到UdpEvent事件')
 | 
					 | 
				
			||||||
      if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) {
 | 
					      if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) {
 | 
				
			||||||
        await this.prePareSCZB()
 | 
					        await this.prePareSCZB()
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
@ -341,7 +344,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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -643,7 +645,8 @@ struct UserInfo {
 | 
				
			|||||||
    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
 | 
				
			||||||
@ -651,8 +654,6 @@ struct UserInfo {
 | 
				
			|||||||
    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))
 | 
				
			||||||
        await DB.clearTable('USER')
 | 
					 | 
				
			||||||
        await DB.clearTable('USERLIST')
 | 
					 | 
				
			||||||
        this.errorDialog.close()
 | 
					        this.errorDialog.close()
 | 
				
			||||||
        setTimeout(() => {
 | 
					        setTimeout(() => {
 | 
				
			||||||
          this.updateTimeLimit = false
 | 
					          this.updateTimeLimit = false
 | 
				
			||||||
@ -734,6 +735,7 @@ struct UserInfo {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.currentUser = EmptyCandidateObject
 | 
					          this.currentUser = EmptyCandidateObject
 | 
				
			||||||
 | 
					          globalThis.lsh = '1111111111111'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1256,14 +1256,11 @@ export default class Judge {
 | 
				
			|||||||
          const bytes = await this.getMessageHeartbeat(true);
 | 
					          const bytes = await this.getMessageHeartbeat(true);
 | 
				
			||||||
          globalThis.judgeUdp.send(bytes)
 | 
					          globalThis.judgeUdp.send(bytes)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        await endExam()
 | 
					 | 
				
			||||||
      } catch (e) {
 | 
					      } catch (e) {
 | 
				
			||||||
        console.info(judgeTag, JSON.stringify(e))
 | 
					        console.info(judgeTag, JSON.stringify(e))
 | 
				
			||||||
        // setTimeout(() => {
 | 
					 | 
				
			||||||
        //   // avPlayer.avPlayerStop();
 | 
					 | 
				
			||||||
        //   router.back();
 | 
					 | 
				
			||||||
        // }, 3000)
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      await endExam()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -311,10 +311,11 @@ export const plcStrToJson = async (plc:string) =>{
 | 
				
			|||||||
      bklx:p[56], dwzt:p[83],
 | 
					      bklx:p[56], dwzt:p[83],
 | 
				
			||||||
      //@ts-ignore 角度差分状态
 | 
					      //@ts-ignore 角度差分状态
 | 
				
			||||||
      jdzt:p[92].split('-')[0]*1,
 | 
					      jdzt:p[92].split('-')[0]*1,
 | 
				
			||||||
      //gps数据
 | 
					      //一代机、三代机经纬度数据兼容
 | 
				
			||||||
      //TODO 一 精度纬度要取反
 | 
					      //gps时间 经度                                       纬度
 | 
				
			||||||
      //gps时间 经度      纬度       航向角      俯仰角      海拔高       高度差     速度
 | 
					      sj:time, jd:Math.max(Number(p[95]),Number(p[96])), wd:Math.min(Number(p[95]),Number(p[96])),
 | 
				
			||||||
      sj:time, jd:p[95], wd:p[96], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97],
 | 
					      //航向角      俯仰角      海拔高       高度差     速度
 | 
				
			||||||
 | 
					      hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97],
 | 
				
			||||||
      //龄期      经度因子     纬度因子      定位搜星数
 | 
					      //龄期      经度因子     纬度因子      定位搜星数
 | 
				
			||||||
      age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84] || 0,
 | 
					      age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84] || 0,
 | 
				
			||||||
      //@ts-ignore 角度搜星数
 | 
					      //@ts-ignore 角度搜星数
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user