Compare commits
	
		
			No commits in common. "4380fce2cacaeb5535d7236c1e4e4ac3c37bc216" and "bbd5edd1eaab7abd2d57e6f328af0f3266182c31" have entirely different histories.
		
	
	
		
			4380fce2ca
			...
			bbd5edd1ea
		
	
		
@ -41,16 +41,16 @@ export async function getliushuiNum(context) {
 | 
				
			|||||||
    // return str
 | 
					    // return str
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
export async function deleteAllFIleLog(path){
 | 
					export async function deleteAllFIleLog(){
 | 
				
			||||||
  let options = {
 | 
					  let options = {
 | 
				
			||||||
    "recursion": false,
 | 
					    "recursion": false,
 | 
				
			||||||
    "listNum": 0,
 | 
					    "listNum": 0,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  let filenames = fs.listFileSync(path, options);
 | 
					  let filenames = fs.listFileSync(GlobalConfig.comoonfileWriteAddress+'/PLC/', options);
 | 
				
			||||||
  console.info("listFile succeed",JSON.stringify(filenames));
 | 
					  console.info("listFile succeed",JSON.stringify(filenames));
 | 
				
			||||||
  for (let i = 0; i < filenames.length; i++) {
 | 
					  for (let i = 0; i < filenames.length; i++) {
 | 
				
			||||||
    if(isSevenDaysAgo(filenames[i])){
 | 
					    if(isSevenDaysAgo(filenames[i])){
 | 
				
			||||||
      fs.rmdir(path+filenames[i], (err) => {
 | 
					      fs.rmdir(GlobalConfig.comoonfileWriteAddress+'/PLC/'+filenames[i], (err) => {
 | 
				
			||||||
        if (err) {
 | 
					        if (err) {
 | 
				
			||||||
          console.error("rmdir failed with error message: " + err.message + ", error code: " + err.code);
 | 
					          console.error("rmdir failed with error message: " + err.message + ", error code: " + err.code);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -157,9 +157,8 @@ export async function getDoubleCeneterTable(param) {
 | 
				
			|||||||
//单中心存表
 | 
					//单中心存表
 | 
				
			||||||
export async function getSingleCenterTable(param) {
 | 
					export async function getSingleCenterTable(param) {
 | 
				
			||||||
  return new Promise((reslove, reject) => {
 | 
					  return new Promise((reslove, reject) => {
 | 
				
			||||||
    try{
 | 
					 | 
				
			||||||
    upDataZhongxinginitialization(param).then((result) => {
 | 
					    upDataZhongxinginitialization(param).then((result) => {
 | 
				
			||||||
        console.log('teststetfinsh01',result)
 | 
					      console.log('teststetfinsh01')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (result) {
 | 
					      if (result) {
 | 
				
			||||||
        reslove(true)
 | 
					        reslove(true)
 | 
				
			||||||
@ -195,9 +194,7 @@ export async function getSingleCenterTable(param) {
 | 
				
			|||||||
      reslove(false)
 | 
					      reslove(false)
 | 
				
			||||||
      console.log(error)
 | 
					      console.log(error)
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    }catch (e){
 | 
					
 | 
				
			||||||
      reslove(false)
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -360,7 +360,6 @@ export async function upDataZhongxinginitialization(param) {
 | 
				
			|||||||
      resolve(flag)
 | 
					      resolve(flag)
 | 
				
			||||||
      return
 | 
					      return
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    try{
 | 
					 | 
				
			||||||
    const str = {
 | 
					    const str = {
 | 
				
			||||||
      "carId": param.carId, // 表名
 | 
					      "carId": param.carId, // 表名
 | 
				
			||||||
      "examinationRoomId": param.examinationRoomId, //考试平台kdid
 | 
					      "examinationRoomId": param.examinationRoomId, //考试平台kdid
 | 
				
			||||||
@ -373,8 +372,7 @@ export async function upDataZhongxinginitialization(param) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    initialization(str).then(async (res) => {
 | 
					    initialization(str).then(async (res) => {
 | 
				
			||||||
      console.log('daihai3', JSON.stringify(res))
 | 
					      console.log('daihai3', JSON.stringify(res))
 | 
				
			||||||
        if (!res||res.initializationRsp.head.resultCode==1) {
 | 
					      if (!res) {
 | 
				
			||||||
          console.log('daihai34', JSON.stringify(res))
 | 
					 | 
				
			||||||
        resolve(false)
 | 
					        resolve(false)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@ -398,9 +396,6 @@ export async function upDataZhongxinginitialization(param) {
 | 
				
			|||||||
    }).catch((Error) => {
 | 
					    }).catch((Error) => {
 | 
				
			||||||
      resolve(false)
 | 
					      resolve(false)
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    }catch (error){
 | 
					 | 
				
			||||||
      resolve(false)
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -103,12 +103,12 @@ export default class TcpClient {
 | 
				
			|||||||
        }, timeout: 6000
 | 
					        }, timeout: 6000
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      promise.then(() => {
 | 
					      promise.then(() => {
 | 
				
			||||||
        console.log('testTagtestTag000',)
 | 
					
 | 
				
			||||||
        this.tcp.setExtraOptions({
 | 
					        this.tcp.setExtraOptions({
 | 
				
			||||||
          keepAlive: true,
 | 
					          keepAlive: true,
 | 
				
			||||||
        }, err => {
 | 
					        }, err => {
 | 
				
			||||||
          if (err) {
 | 
					          if (err) {
 | 
				
			||||||
            console.log('testTagtestTag000,error')
 | 
					            console.log('testTagtestTagerrrrr,success')
 | 
				
			||||||
            if(this.num>3){
 | 
					            if(this.num>3){
 | 
				
			||||||
              return
 | 
					              return
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -119,7 +119,7 @@ export default class TcpClient {
 | 
				
			|||||||
            return;
 | 
					            return;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        console.log('testTagtestTag000,success')
 | 
					        console.log('testTagtestTagconnect,success')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        globalThis.getCloseTcp = false
 | 
					        globalThis.getCloseTcp = false
 | 
				
			||||||
        resolve(true)
 | 
					        resolve(true)
 | 
				
			||||||
@ -133,7 +133,7 @@ export default class TcpClient {
 | 
				
			|||||||
          getTCP()
 | 
					          getTCP()
 | 
				
			||||||
          resolve(false)
 | 
					          resolve(false)
 | 
				
			||||||
        }, 2000)
 | 
					        }, 2000)
 | 
				
			||||||
        console.log('testTagtestTag000,error')
 | 
					        console.log('testTagtestTagconnect,error')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 | 
				
			|||||||
@ -78,22 +78,19 @@ export default async function request(req: any) {
 | 
				
			|||||||
                    message: decodeURIComponent(resultMessage),
 | 
					                    message: decodeURIComponent(resultMessage),
 | 
				
			||||||
                    duration: 3000
 | 
					                    duration: 3000
 | 
				
			||||||
                });
 | 
					                });
 | 
				
			||||||
                return false
 | 
					                return
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        for( let i in res ) {
 | 
					        for( let i in res ) {
 | 
				
			||||||
            resObj = res[i].head
 | 
					            resObj = res[i].head
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        console.info('jiangsong:res in request' + url + JSON.stringify(resObj))
 | 
					        console.info('jiangsong:res in request' + url + JSON.stringify(res))
 | 
				
			||||||
        if(resObj.resultCode === '0') {
 | 
					        if(resObj.resultCode === '0') {
 | 
				
			||||||
            return res
 | 
					            return res
 | 
				
			||||||
        }else {
 | 
					        }else {
 | 
				
			||||||
            globalThis.type='1'
 | 
					            globalThis.type='1'
 | 
				
			||||||
            if(!host){
 | 
					 | 
				
			||||||
            AppStorage.SetOrCreate('errorMsg', 1);
 | 
					            AppStorage.SetOrCreate('errorMsg', 1);
 | 
				
			||||||
            globalThis.title=decodeURIComponent(resObj.resultMessage)
 | 
					            globalThis.title=decodeURIComponent(resObj.resultMessage)
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            prompt.showToast({
 | 
					            prompt.showToast({
 | 
				
			||||||
                message: decodeURIComponent(resObj.resultMessage),
 | 
					                message: decodeURIComponent(resObj.resultMessage),
 | 
				
			||||||
                duration: 3000
 | 
					                duration: 3000
 | 
				
			||||||
 | 
				
			|||||||
@ -30,8 +30,8 @@ export default class EntryAbility extends UIAbility {
 | 
				
			|||||||
        globalThis.hasAuth = false
 | 
					        globalThis.hasAuth = false
 | 
				
			||||||
        // globalThis.version = '2022.08.13.01'
 | 
					        // globalThis.version = '2022.08.13.01'
 | 
				
			||||||
        // globalThis.judgeVersion = '2022.12.05.1'
 | 
					        // globalThis.judgeVersion = '2022.12.05.1'
 | 
				
			||||||
        globalThis.version = '2001.11.22.14'
 | 
					        globalThis.version = '2024.11.22.14'
 | 
				
			||||||
        globalThis.judgeVersion = '2001.11.22.14'
 | 
					        globalThis.judgeVersion = '2024.11.22.14'
 | 
				
			||||||
        globalThis.videoVersion= '1.0'
 | 
					        globalThis.videoVersion= '1.0'
 | 
				
			||||||
        // globalThis.version = '2023.12.13.01'
 | 
					        // globalThis.version = '2023.12.13.01'
 | 
				
			||||||
        // globalThis.judgeVersion = '2023.09.30.1'
 | 
					        // globalThis.judgeVersion = '2023.09.30.1'
 | 
				
			||||||
 | 
				
			|||||||
@ -93,7 +93,6 @@ export default struct Index {
 | 
				
			|||||||
                  this.errorDialog.open()
 | 
					                  this.errorDialog.open()
 | 
				
			||||||
                  this.limit=true
 | 
					                  this.limit=true
 | 
				
			||||||
                  console.log('carInfo', JSON.stringify(globalThis.carInfo))
 | 
					                  console.log('carInfo', JSON.stringify(globalThis.carInfo))
 | 
				
			||||||
                  try{
 | 
					 | 
				
			||||||
                  examinerLoginService(param).then(res => {
 | 
					                  examinerLoginService(param).then(res => {
 | 
				
			||||||
                    console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
 | 
					                    console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
 | 
				
			||||||
                    this.errorDialog.close()
 | 
					                    this.errorDialog.close()
 | 
				
			||||||
@ -117,15 +116,7 @@ export default struct Index {
 | 
				
			|||||||
                    globalThis.username = this.inputTextArr[0]
 | 
					                    globalThis.username = this.inputTextArr[0]
 | 
				
			||||||
                  }).catch(err=>{
 | 
					                  }).catch(err=>{
 | 
				
			||||||
                    console.log('jiangsong12',JSON.stringify(err))
 | 
					                    console.log('jiangsong12',JSON.stringify(err))
 | 
				
			||||||
                      this.errorDialog.close()
 | 
					 | 
				
			||||||
                      this.limit=false
 | 
					 | 
				
			||||||
                  })
 | 
					                  })
 | 
				
			||||||
                  }catch(eroor){
 | 
					 | 
				
			||||||
                    console.log('erroreee')
 | 
					 | 
				
			||||||
                    this.errorDialog.close()
 | 
					 | 
				
			||||||
                    this.limit=false
 | 
					 | 
				
			||||||
                  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
              } else {
 | 
					              } else {
 | 
				
			||||||
                Image(item).width('18%').height('24%').onClick(() => {
 | 
					                Image(item).width('18%').height('24%').onClick(() => {
 | 
				
			||||||
 | 
				
			|||||||
@ -17,7 +17,6 @@ import promptAction from '@ohos.promptAction'
 | 
				
			|||||||
import { voiceService } from '../common/service/voiceService';
 | 
					import { voiceService } from '../common/service/voiceService';
 | 
				
			||||||
import errorMsgDialog from './compontents/errorMsgDialog'
 | 
					import errorMsgDialog from './compontents/errorMsgDialog'
 | 
				
			||||||
import { getSyncData } from '../common/service/initable';
 | 
					import { getSyncData } from '../common/service/initable';
 | 
				
			||||||
import { GlobalConfig } from '../config/index'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Entry
 | 
					@Entry
 | 
				
			||||||
@Component
 | 
					@Component
 | 
				
			||||||
@ -412,7 +411,7 @@ struct Index {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  async initParams() {
 | 
					  async initParams() {
 | 
				
			||||||
    deleteAllFIleLog(GlobalConfig.comoonfileWriteAddress+'/PLC/')
 | 
					    deleteAllFIleLog()
 | 
				
			||||||
    //设置plc udp 同步requesthost
 | 
					    //设置plc udp 同步requesthost
 | 
				
			||||||
    await getUDP(this.context, false)
 | 
					    await getUDP(this.context, false)
 | 
				
			||||||
    this.loading = false
 | 
					    this.loading = false
 | 
				
			||||||
 | 
				
			|||||||
@ -79,6 +79,7 @@ struct UserInfo {
 | 
				
			|||||||
  @State Param803Str: string = ''
 | 
					  @State Param803Str: string = ''
 | 
				
			||||||
  private title = ''
 | 
					  private title = ''
 | 
				
			||||||
  private type = '2'
 | 
					  private type = '2'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // 过程照片拍照
 | 
					  // 过程照片拍照
 | 
				
			||||||
  getPhoto = async (empty?: boolean) => {
 | 
					  getPhoto = async (empty?: boolean) => {
 | 
				
			||||||
    const singlePlay = globalThis.singlePlay
 | 
					    const singlePlay = globalThis.singlePlay
 | 
				
			||||||
@ -117,7 +118,6 @@ struct UserInfo {
 | 
				
			|||||||
    alignment: DialogAlignment.Center,
 | 
					    alignment: DialogAlignment.Center,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
 | 
					 | 
				
			||||||
  async onPageShow() {
 | 
					  async onPageShow() {
 | 
				
			||||||
    this.updateTimeLimit=false
 | 
					    this.updateTimeLimit=false
 | 
				
			||||||
    this.ksksLimit=false
 | 
					    this.ksksLimit=false
 | 
				
			||||||
@ -226,7 +226,7 @@ struct UserInfo {
 | 
				
			|||||||
          this.stopDeviceById()
 | 
					          this.stopDeviceById()
 | 
				
			||||||
          // globalThis.statue=4
 | 
					          // globalThis.statue=4
 | 
				
			||||||
          router.pushUrl({
 | 
					          router.pushUrl({
 | 
				
			||||||
            url: examSubject == 3 ? 'pages/c' : 'pages/Judge',
 | 
					            url: examSubject == 3 ? 'pages/Roads' : 'pages/Judge',
 | 
				
			||||||
            params: {
 | 
					            params: {
 | 
				
			||||||
              sczb: Number(this.isBoardPrePareSetPopupOpen),
 | 
					              sczb: Number(this.isBoardPrePareSetPopupOpen),
 | 
				
			||||||
              kfdm: this.sczbkf,
 | 
					              kfdm: this.sczbkf,
 | 
				
			||||||
@ -464,7 +464,6 @@ struct UserInfo {
 | 
				
			|||||||
    this.errorDialog.open()
 | 
					    this.errorDialog.open()
 | 
				
			||||||
    this.updateTimeLimit = true
 | 
					    this.updateTimeLimit = true
 | 
				
			||||||
    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></body></getExaminationStudentInfoReq>`
 | 
					    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></body></getExaminationStudentInfoReq>`
 | 
				
			||||||
    try {
 | 
					 | 
				
			||||||
    getExaminationStudentInfo(param).then(async (res) => {
 | 
					    getExaminationStudentInfo(param).then(async (res) => {
 | 
				
			||||||
      this.errorDialog.close()
 | 
					      this.errorDialog.close()
 | 
				
			||||||
      setTimeout(() => {
 | 
					      setTimeout(() => {
 | 
				
			||||||
@ -519,14 +518,8 @@ struct UserInfo {
 | 
				
			|||||||
      })
 | 
					      })
 | 
				
			||||||
    }).catch((error) => {
 | 
					    }).catch((error) => {
 | 
				
			||||||
      this.updateTimeLimit = false
 | 
					      this.updateTimeLimit = false
 | 
				
			||||||
        this.errorDialog.close()
 | 
					 | 
				
			||||||
      console.log('error12error' + error)
 | 
					      console.log('error12error' + error)
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    } catch (error) {
 | 
					 | 
				
			||||||
      this.updateTimeLimit = false
 | 
					 | 
				
			||||||
      this.errorDialog.close()
 | 
					 | 
				
			||||||
      console.log('error14error' + error)
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  qkFn() {
 | 
					  qkFn() {
 | 
				
			||||||
@ -1095,11 +1088,7 @@ struct LabelBlock {
 | 
				
			|||||||
    Row() {
 | 
					    Row() {
 | 
				
			||||||
      Text(this.label).fontSize(20 * this.ratio).fontColor('#99948A')
 | 
					      Text(this.label).fontSize(20 * this.ratio).fontColor('#99948A')
 | 
				
			||||||
      Row() {
 | 
					      Row() {
 | 
				
			||||||
        Text(decodeURIComponent(this.value))
 | 
					        Text(decodeURIComponent(this.value)).fontColor('#fff').textAlign(TextAlign.Center).width('100%').fontSize(18 * this.ratio)
 | 
				
			||||||
          .fontColor('#fff')
 | 
					 | 
				
			||||||
          .textAlign(TextAlign.Center)
 | 
					 | 
				
			||||||
          .width('100%')
 | 
					 | 
				
			||||||
          .fontSize(18 * this.ratio)
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      .commLabelStyle()
 | 
					      .commLabelStyle()
 | 
				
			||||||
    }.margin({ bottom: 10 * this.ratio })
 | 
					    }.margin({ bottom: 10 * this.ratio })
 | 
				
			||||||
 | 
				
			|||||||
@ -30,9 +30,8 @@ workerPort.onmessage = (e: MessageEvents): void => {
 | 
				
			|||||||
  console.log('baoyihu,onmessage',JSON.stringify(param))
 | 
					  console.log('baoyihu,onmessage',JSON.stringify(param))
 | 
				
			||||||
  if(param.mode=='1'){
 | 
					  if(param.mode=='1'){
 | 
				
			||||||
    //单中心
 | 
					    //单中心
 | 
				
			||||||
    try{
 | 
					 | 
				
			||||||
    getSingleCenterTable(param).then((ret) => {
 | 
					    getSingleCenterTable(param).then((ret) => {
 | 
				
			||||||
        console.log('teststetfinsh1',ret)
 | 
					      console.log('teststetfinsh1')
 | 
				
			||||||
      if (ret) {
 | 
					      if (ret) {
 | 
				
			||||||
        workerPort.postMessage({ isComplete: true });
 | 
					        workerPort.postMessage({ isComplete: true });
 | 
				
			||||||
      }else{
 | 
					      }else{
 | 
				
			||||||
@ -40,10 +39,6 @@ workerPort.onmessage = (e: MessageEvents): void => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    }catch(error){
 | 
					 | 
				
			||||||
      workerPort.postMessage({ isComplete: false });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  }else if(param.mode=='3'){
 | 
					  }else if(param.mode=='3'){
 | 
				
			||||||
    //双中心
 | 
					    //双中心
 | 
				
			||||||
    getDoubleCeneterTable(param).then((ret)=>{
 | 
					    getDoubleCeneterTable(param).then((ret)=>{
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user