單機模式修改 #59
| @ -128,6 +128,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) => { | ||||||
|     upDataZhongxinginitialization(param).then((result) => { |     upDataZhongxinginitialization(param).then((result) => { | ||||||
|  |       console.log('teststetfinsh01') | ||||||
|  | 
 | ||||||
|       if (result) { |       if (result) { | ||||||
|         reslove(true) |         reslove(true) | ||||||
|       } else { |       } else { | ||||||
|  | |||||||
| @ -85,10 +85,10 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) { | |||||||
|     }, map[tableName], context); |     }, map[tableName], context); | ||||||
|     accountTable.getRdbStore(() => { |     accountTable.getRdbStore(() => { | ||||||
|       accountTable.query('0', async (result) => { |       accountTable.query('0', async (result) => { | ||||||
|         console.log('sqlsqlinsertresult',JSON.stringify(result)) |         console.log('teststet3',) | ||||||
|  | 
 | ||||||
|         // console.log('表长度',result.length,tableName)
 |         // console.log('表长度',result.length,tableName)
 | ||||||
|         if (result.length == 0) { |         if (result.length == 0) { | ||||||
|           console.log('sqlsqlinsert00000') |  | ||||||
|           let INSERT_SQL = "INSERT INTO " + tableName |           let INSERT_SQL = "INSERT INTO " + tableName | ||||||
|             + " (" + map[tableName].ACCOUNT_TABLE.columns.toString() + ") VALUES " |             + " (" + map[tableName].ACCOUNT_TABLE.columns.toString() + ") VALUES " | ||||||
| 
 | 
 | ||||||
| @ -109,8 +109,10 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) { | |||||||
|             } |             } | ||||||
|             INSERT_SQL += str |             INSERT_SQL += str | ||||||
|           }) |           }) | ||||||
|           console.log('sqlsqlinsertINSERT_SQLINSERT_SQL', INSERT_SQL) |           console.log('sqlsINSERT_SQLINSERT_SQL', INSERT_SQL) | ||||||
|           accountTable.sqlOperate(INSERT_SQL, tableName, (val) => { |           accountTable.sqlOperate(INSERT_SQL, tableName, (val) => { | ||||||
|  |             console.log('teststet3',val,tableName) | ||||||
|  | 
 | ||||||
|             console.log('sqlsqlinsert,', val, 'tableName', tableName) |             console.log('sqlsqlinsert,', val, 'tableName', tableName) | ||||||
|             resolve(val) |             resolve(val) | ||||||
|           }) |           }) | ||||||
| @ -167,8 +169,8 @@ export async function getDataBaseTable(params, reqParam) { | |||||||
| 
 | 
 | ||||||
| //依据数组和表名更新sql表
 | //依据数组和表名更新sql表
 | ||||||
| export async function upDateTableByArray(tableName, arr) { | export async function upDateTableByArray(tableName, arr) { | ||||||
|   return new Promise(async (reslove,reject)=>{ |   return new Promise(async (reslove, reject) => { | ||||||
|     const data =await sqlInsertCommonFn(tableName, arr) |     const data = await sqlInsertCommonFn(tableName, arr) | ||||||
|     reslove(data) |     reslove(data) | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
| @ -327,30 +329,26 @@ export async function getEsCarModel(context) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function upDataZhongxinginitialization(param) { | export async function upDataZhongxinginitialization(param) { | ||||||
|   return new Promise((resolve, reject) => { |   return new Promise(async(resolve, reject) => { | ||||||
|     if (!param.carId) { |     if (!param.carId) { | ||||||
|       resolve(false) |       resolve(false) | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     if(param.singlePlay){ |     if (param.singlePlay) { | ||||||
|  |       console.log('teststet0') | ||||||
|       const fileUtil = new FileUtil(param.context) |       const fileUtil = new FileUtil(param.context) | ||||||
|       const tableList=['MA_ITEMINFO','MA_MARKRULE','MA_SYSTEMPARM','MA_MAP_COLLECT','MA_MAP_COLLECT_SHAPE','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_SYSSET','ES_CARINFO','MA_MARKRULESET','MA_CDSBINFO','MA_T_CARPARMSET']; |       const tableList = ['MA_SYSSET', 'MA_SYSTEMPARM', 'MA_MARKRULE', 'MA_MARKRULESET','ES_CARINFO','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_T_CARPARMSET','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM']; | ||||||
|       tableList.map(async(tableName)=>{ | 
 | ||||||
|         const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableName}.txt`); |      for(let i=0;i<=tableList.length-1;i++){ | ||||||
|         if(data&&JSON.parse(data)){ |        console.log('teststet1',tableList[i]) | ||||||
|           sqlInsertCommonFn(tableName, JSON.parse(data), param.context).then((result) => { |        const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`); | ||||||
|             console.log(key, '单机表建立成功') |        console.log('teststet1',data) | ||||||
|             if (result) { | 
 | ||||||
|  |        await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context) | ||||||
|  |        console.log('teststet2',data) | ||||||
|  |      } | ||||||
|  |       console.log('teststetfinsh') | ||||||
|       resolve(true) |       resolve(true) | ||||||
|             } else { |  | ||||||
|               resolve(false) |  | ||||||
|             } |  | ||||||
|           }).catch((msg) => { |  | ||||||
|             reject(false) |  | ||||||
|             console.log(key, '单机表建立失败') |  | ||||||
|           }) |  | ||||||
|         } |  | ||||||
|       }) |  | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     const str = { |     const str = { | ||||||
| @ -393,7 +391,7 @@ export async function upDataZhongxinginitialization(param) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function setSyncCenterSqlData(key, res, param) { | function setSyncCenterSqlData(key, res, param) { | ||||||
|   return new Promise(async(resolve, reject) => { |   return new Promise(async (resolve, reject) => { | ||||||
|     const mapName = { |     const mapName = { | ||||||
|       'ItemInfo': 'MA_ITEMINFO', |       'ItemInfo': 'MA_ITEMINFO', | ||||||
|       'MarkRule': 'MA_MARKRULE', |       'MarkRule': 'MA_MARKRULE', | ||||||
|  | |||||||
| @ -115,9 +115,19 @@ export default class TcpClient { | |||||||
|           // socketTimeout: 3000,
 |           // socketTimeout: 3000,
 | ||||||
|         }, err => { |         }, err => { | ||||||
|           if (err) { |           if (err) { | ||||||
|  |             console.log('testTagtestTagerrrrr,success') | ||||||
|  |             if(this.num>3){ | ||||||
|  |               return | ||||||
|  |             } | ||||||
|  |             setTimeout(() => { | ||||||
|  |               getTCP() | ||||||
|  |               resolve(false) | ||||||
|  |             }, 2000) | ||||||
|             return; |             return; | ||||||
|           } |           } | ||||||
|         }); |         }); | ||||||
|  |         console.log('testTagtestTagconnect,success') | ||||||
|  | 
 | ||||||
|         globalThis.getCloseTcp = false |         globalThis.getCloseTcp = false | ||||||
|         resolve(true) |         resolve(true) | ||||||
|       }).catch(err => { |       }).catch(err => { | ||||||
| @ -130,7 +140,7 @@ export default class TcpClient { | |||||||
|           getTCP() |           getTCP() | ||||||
|           resolve(false) |           resolve(false) | ||||||
|         }, 2000) |         }, 2000) | ||||||
|         console.log('testTagconnect,error') |         console.log('testTagtestTagconnect,error') | ||||||
| 
 | 
 | ||||||
|       }); |       }); | ||||||
|     }) |     }) | ||||||
| @ -152,7 +162,7 @@ export default class TcpClient { | |||||||
| 
 | 
 | ||||||
|   onMessage(callback?) { |   onMessage(callback?) { | ||||||
|     this.tcp.on('message', value => { |     this.tcp.on('message', value => { | ||||||
|       console.log(TAG, 'Tcponmessage', value.length, value) |       console.log(TAG, 'Tcponmessage', value) | ||||||
|       globalThis.tcpUdpError = false |       globalThis.tcpUdpError = false | ||||||
| 
 | 
 | ||||||
|       // console.log('messageLengt',,value.message.length))
 |       // console.log('messageLengt',,value.message.length))
 | ||||||
|  | |||||||
| @ -132,10 +132,9 @@ struct Index { | |||||||
|               if (this.loading) { |               if (this.loading) { | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               router.pushUrl({ |               this.testXMLToJSONInWorker() | ||||||
|                 url: 'pages/UserInfo', | 
 | ||||||
|                 params: { judge: true } |            ; | ||||||
|               }, router.RouterMode.Single); |  | ||||||
|             }) |             }) | ||||||
|           } |           } | ||||||
|           Image($r('app.media.index_zj')).width('28%').height('71%').margin({right:80* globalThis.ratio}).onClick(() => { |           Image($r('app.media.index_zj')).width('28%').height('71%').margin({right:80* globalThis.ratio}).onClick(() => { | ||||||
| @ -285,7 +284,7 @@ struct Index { | |||||||
|       let workData: WorkData = e.data; |       let workData: WorkData = e.data; | ||||||
|       if (workData.isComplete) { |       if (workData.isComplete) { | ||||||
|         router.pushUrl({ |         router.pushUrl({ | ||||||
|           url: 'pages/ExaminerLogin', |           url: globalThis.singlePlay?'pages/UserInfo':'pages/ExaminerLogin', | ||||||
|         }, router.RouterMode.Single) |         }, router.RouterMode.Single) | ||||||
|       } |       } | ||||||
|       this.loading = false |       this.loading = false | ||||||
|  | |||||||
| @ -22,7 +22,7 @@ struct Index { | |||||||
|   // @State inputTextList2: string[] = ['192.168.7.124','20022'] |   // @State inputTextList2: string[] = ['192.168.7.124','20022'] | ||||||
| 
 | 
 | ||||||
|   // @State inputTextList1: string[] = ['172.37.55.191','18782','192.168.7.1','8082','255.255.255.0','192.168.7.170','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122'] |   // @State inputTextList1: string[] = ['172.37.55.191','18782','192.168.7.1','8082','255.255.255.0','192.168.7.170','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122'] | ||||||
|   @State inputTextList1: string[] = ['192.168.1.146','18782','192.168.1.146','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122'] |   @State inputTextList1: string[] = ['192.168.1.144','18782','192.168.1.146','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122'] | ||||||
|   // @State inputTextList2: string[] = [] |   // @State inputTextList2: string[] = [] | ||||||
|   // 112.80.35.83 11052 |   // 112.80.35.83 11052 | ||||||
|   // @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000'] |   // @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000'] | ||||||
|  | |||||||
| @ -17,17 +17,15 @@ import promptAction from '@ohos.promptAction'; | |||||||
| import FilePhoto from './judgeSDK/utils/filePhoto'; | import FilePhoto from './judgeSDK/utils/filePhoto'; | ||||||
| import { getSyncData, upDateTableByArray } from '../common/service/initable'; | import { getSyncData, upDateTableByArray } from '../common/service/initable'; | ||||||
| import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; | import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData'; | ||||||
| import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup' | import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'; | ||||||
| import LoadingPopup from './compontents/judge/LoadingPopup'; | import LoadingPopup from './compontents/judge/LoadingPopup'; | ||||||
| import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | ||||||
| import { JudgeConfig } from '../config/judge'; |  | ||||||
| import { judgeConfig } from './judgeSDK/utils/judgeConfig'; | import { judgeConfig } from './judgeSDK/utils/judgeConfig'; | ||||||
| import { initJudgeUdp } from '../common/utils/UdpJudge'; | import { initJudgeUdp } from '../common/utils/UdpJudge'; | ||||||
|  | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| struct UserInfo { | struct UserInfo { | ||||||
|   private filePhoto: FilePhoto |  | ||||||
|   private avPlayer |  | ||||||
|   @State pageIndex: number = 0 |   @State pageIndex: number = 0 | ||||||
|   @State ratio: number = 1700 / 960 |   @State ratio: number = 1700 / 960 | ||||||
|   @State index: number = 0 |   @State index: number = 0 | ||||||
| @ -46,9 +44,12 @@ struct UserInfo { | |||||||
|   @State isBoardPrePareSetPopupOpen: boolean = false |   @State isBoardPrePareSetPopupOpen: boolean = false | ||||||
|   @State isFirstBoardPrePareSetPopupBtnShow: boolean = false |   @State isFirstBoardPrePareSetPopupBtnShow: boolean = false | ||||||
|   @State isBoardPrePareSetPopupShow: boolean = false |   @State isBoardPrePareSetPopupShow: boolean = false | ||||||
|   @State isLoadingPopupVisible:boolean = false; |   @State isLoadingPopupVisible: boolean = false; | ||||||
|   @State loadingText:string = '正在认证监管信息,请稍后...' |   @State loadingText: string = '正在认证监管信息,请稍后...' | ||||||
|   @State sczbkf:{xmdm:number,kfdm:string}[] = [] |   @State sczbkf: { | ||||||
|  |     xmdm: number, | ||||||
|  |     kfdm: string | ||||||
|  |   }[] = [] | ||||||
|   @State currentUser: User = EmptyCandidateObject |   @State currentUser: User = EmptyCandidateObject | ||||||
|   @State dataList: Array<User> = [] |   @State dataList: Array<User> = [] | ||||||
|   @State list: Array<User> = [] |   @State list: Array<User> = [] | ||||||
| @ -61,7 +62,7 @@ struct UserInfo { | |||||||
|   @State idCard: string = ''; |   @State idCard: string = ''; | ||||||
|   @State grantDept: string = ''; |   @State grantDept: string = ''; | ||||||
|   //是否已经开始考试 |   //是否已经开始考试 | ||||||
|   @State isExamStart:boolean = false; |   @State isExamStart: boolean = false; | ||||||
|   @State effectDate: string = ''; |   @State effectDate: string = ''; | ||||||
|   @State interval: any = null; |   @State interval: any = null; | ||||||
|   @State studentRefreshStatue: string = '0'; |   @State studentRefreshStatue: string = '0'; | ||||||
| @ -73,7 +74,7 @@ struct UserInfo { | |||||||
|   @State faceFlag: string = '0'; |   @State faceFlag: string = '0'; | ||||||
|   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 |   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 | ||||||
|   @State faceCatchImg: string = '' |   @State faceCatchImg: string = '' | ||||||
|   @State Param803Str:string = '' |   @State Param803Str: string = '' | ||||||
|   // 过程照片拍照 |   // 过程照片拍照 | ||||||
|   getPhoto = async (empty?: boolean) => { |   getPhoto = async (empty?: boolean) => { | ||||||
|     const singlePlay = globalThis.singlePlay |     const singlePlay = globalThis.singlePlay | ||||||
| @ -86,7 +87,10 @@ struct UserInfo { | |||||||
|       return photoBase64 |       return photoBase64 | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   private AccountTable = new AccountTable(() => {}, USER); |   private filePhoto: FilePhoto | ||||||
|  |   private avPlayer | ||||||
|  |   private AccountTable = new AccountTable(() => { | ||||||
|  |   }, USER); | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
|   private labelBlocks = [ |   private labelBlocks = [ | ||||||
|     { label: '考生姓名', key: 'xm' }, |     { label: '考生姓名', key: 'xm' }, | ||||||
| @ -261,8 +265,8 @@ struct UserInfo { | |||||||
|         this.isBoardPrePareSetPopupOpen = true; |         this.isBoardPrePareSetPopupOpen = true; | ||||||
|       } |       } | ||||||
|       // 开始考试前必须解开安全带或关车门 |       // 开始考试前必须解开安全带或关车门 | ||||||
|       if (sys.v_no === '803'){ |       if (sys.v_no === '803') { | ||||||
|         this.Param803Str = sys.v_value+''; |         this.Param803Str = sys.v_value + ''; | ||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
| @ -312,13 +316,13 @@ struct UserInfo { | |||||||
|         const studentRefreshParam = syssetParams.filter(sys => sys.v_no === '452') |         const studentRefreshParam = syssetParams.filter(sys => sys.v_no === '452') | ||||||
|         that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0' |         that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0' | ||||||
|         const openCheckFlagParam = syssetParams.filter(sys => sys.v_no == '17') |         const openCheckFlagParam = syssetParams.filter(sys => sys.v_no == '17') | ||||||
|         const openCheckFlag =openCheckFlagParam?.[0]?.v_value == '1' ? '1' : '0' |         const openCheckFlag = openCheckFlagParam?.[0]?.v_value == '1' ? '1' : '0' | ||||||
| 
 | 
 | ||||||
|         const faceParam = syssetParams.filter(sys => sys.v_no == '2413') |         const faceParam = syssetParams.filter(sys => sys.v_no == '2413') | ||||||
| 
 | 
 | ||||||
|         // faceParam?.[0]?.v_value || |         // faceParam?.[0]?.v_value || | ||||||
|         // 1身份证读卡器 2指纹 3人脸 |         // 1身份证读卡器 2指纹 3人脸 | ||||||
|         if(openCheckFlag=='1'){ |         if (openCheckFlag == '1') { | ||||||
|           that.FaceOpenStatue = faceParam?.[0]?.v_value == '3' ? '1' : '0' |           that.FaceOpenStatue = faceParam?.[0]?.v_value == '3' ? '1' : '0' | ||||||
|           this.faceFlag = faceParam?.[0]?.v_value || '0' |           this.faceFlag = faceParam?.[0]?.v_value || '0' | ||||||
|           if (faceParam?.[0]?.v_value == '1') { |           if (faceParam?.[0]?.v_value == '1') { | ||||||
| @ -382,7 +386,7 @@ struct UserInfo { | |||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     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>` | ||||||
|     getExaminationStudentInfo(param).then(async(res) => { |     getExaminationStudentInfo(param).then(async (res) => { | ||||||
|       setTimeout(() => { |       setTimeout(() => { | ||||||
|         this.updateTimeLimit = true |         this.updateTimeLimit = true | ||||||
|       }, 30000) |       }, 30000) | ||||||
| @ -430,8 +434,8 @@ struct UserInfo { | |||||||
|       globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm |       globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm | ||||||
|       console.log('this.currentUse3' + JSON.stringify(this.currentUser)) |       console.log('this.currentUse3' + JSON.stringify(this.currentUser)) | ||||||
|       this.pageIndex = 0 |       this.pageIndex = 0 | ||||||
|       getSyncData('USER').then(data=>{ |       getSyncData('USER').then(data => { | ||||||
|         if(data?.[0]){ |         if (data?.[0]) { | ||||||
|           this.getCurrentStudent(data[0].sfzmhm) |           this.getCurrentStudent(data[0].sfzmhm) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
| @ -518,13 +522,13 @@ struct UserInfo { | |||||||
|     this.currentUser.id = '1' |     this.currentUser.id = '1' | ||||||
|     const avPlayer = this.avPlayer; |     const avPlayer = this.avPlayer; | ||||||
|     this.isLoadingPopupVisible = true |     this.isLoadingPopupVisible = true | ||||||
|     avPlayer.playAudio([`voice/监管通信中.mp3`],false,async ()=>{ |     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { | ||||||
|       const temp = await this.beginExam(); |       const temp = await this.beginExam(); | ||||||
|       console.info('surenjun',JSON.stringify(temp)) |       console.info('surenjun', JSON.stringify(temp)) | ||||||
|       if (temp.code != 1) { |       if (temp.code != 1) { | ||||||
|         promptAction.showToast({ |         promptAction.showToast({ | ||||||
|           message:temp.message, |           message: temp.message, | ||||||
|           duration:4000 |           duration: 4000 | ||||||
|         }) |         }) | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
| @ -550,11 +554,11 @@ struct UserInfo { | |||||||
|     const {isCheckFireOpen} = judgeConfig |     const {isCheckFireOpen} = judgeConfig | ||||||
|     const {Param803Str,isBoardPrePareSetPopupOpen} = this; |     const {Param803Str,isBoardPrePareSetPopupOpen} = this; | ||||||
| 
 | 
 | ||||||
|     if(Param803Str === ''){ |     if (Param803Str === '') { | ||||||
|       return true |       return true | ||||||
|     } |     } | ||||||
|     return new Promise((resolve,reject)=>{ |     return new Promise((resolve, reject) => { | ||||||
|       if(isCheckFireOpen){ |       if (isCheckFireOpen) { | ||||||
|         resolve(true) |         resolve(true) | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
| @ -568,79 +572,79 @@ struct UserInfo { | |||||||
|       const ssc = msgArr[13]; |       const ssc = msgArr[13]; | ||||||
|       const dw = msgArr[28]; |       const dw = msgArr[28]; | ||||||
|       // 开始考试信号检测 |       // 开始考试信号检测 | ||||||
|       if(Param803Str !== ''){ |       if (Param803Str !== '') { | ||||||
|         //安全带 |         //安全带 | ||||||
|         if(aqd == 1 && Param803Str.includes('1')){ |         if (aqd == 1 && Param803Str.includes('1')) { | ||||||
|           this.avPlayer.playAudio(['voice/请解开安全带.mp3']) |           this.avPlayer.playAudio(['voice/请解开安全带.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请解开安全带', |             message: '请解开安全带', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|         //门开关 |         //门开关 | ||||||
|         if(mkg == 1 && Param803Str.includes('2')){ |         if (mkg == 1 && Param803Str.includes('2')) { | ||||||
|           this.avPlayer.playAudio(['voice/关门.mp3']) |           this.avPlayer.playAudio(['voice/关门.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请关闭车门', |             message: '请关闭车门', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|         //远、近光灯 |         //远、近光灯 | ||||||
|         if((jgd == 1 || ygd == 1) && Param803Str.includes('3')){ |         if ((jgd == 1 || ygd == 1) && Param803Str.includes('3')) { | ||||||
|           this.avPlayer.playAudio(['voice/请关闭远近光灯.mp3']) |           this.avPlayer.playAudio(['voice/请关闭远近光灯.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请关闭远近光灯', |             message: '请关闭远近光灯', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|         //拉手刹 |         //拉手刹 | ||||||
|         if(ssc == 0 && Param803Str.includes('4')){ |         if (ssc == 0 && Param803Str.includes('4')) { | ||||||
|           this.avPlayer.playAudio(['voice/请拉手刹.mp3']) |           this.avPlayer.playAudio(['voice/请拉手刹.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请拉手刹', |             message: '请拉手刹', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
|         //请点火 |         //请点火 | ||||||
|         if(fdjzs*1 <=0 && Param803Str.includes('5')){ |         if (fdjzs * 1 <= 0 && Param803Str.includes('5')) { | ||||||
|           this.avPlayer.playAudio(['voice/点火.mp3']) |           this.avPlayer.playAudio(['voice/点火.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请点火', |             message: '请点火', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|         //置空档 |         //置空档 | ||||||
|         if(dw != 0 && Param803Str.includes('6')){ |         if (dw != 0 && Param803Str.includes('6')) { | ||||||
|           this.avPlayer.playAudio(['voice/请置空档.mp3']) |           this.avPlayer.playAudio(['voice/请置空档.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请置空档', |             message: '请置空档', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|       // 考前绕车一周信号检测 |       // 考前绕车一周信号检测 | ||||||
|       if(isBoardPrePareSetPopupOpen){ |       if (isBoardPrePareSetPopupOpen) { | ||||||
|         //请熄火 |         //请熄火 | ||||||
|         if(fdjzs*1 > 0){ |         if (fdjzs * 1 > 0) { | ||||||
|           this.avPlayer.playAudio(['voice/熄火.mp3']) |           this.avPlayer.playAudio(['voice/熄火.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请熄火', |             message: '请熄火', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
|         if(mkg == 1){ |         if (mkg == 1) { | ||||||
|           this.avPlayer.playAudio(['voice/关门.mp3']) |           this.avPlayer.playAudio(['voice/关门.mp3']) | ||||||
|           promptAction.showToast({ |           promptAction.showToast({ | ||||||
|             message:'请关闭车门', |             message: '请关闭车门', | ||||||
|             duration:4000 |             duration: 4000 | ||||||
|           }) |           }) | ||||||
|           reject(false) |           reject(false) | ||||||
|         } |         } | ||||||
| @ -678,7 +682,7 @@ struct UserInfo { | |||||||
|       //接口标识 |       //接口标识 | ||||||
|       jkid: '17C51', |       jkid: '17C51', | ||||||
|     } |     } | ||||||
|     console.info('surenjun',JSON.stringify(param)) |     console.info('surenjun', JSON.stringify(param)) | ||||||
|     const temp = await writeObjectOut(param); |     const temp = await writeObjectOut(param); | ||||||
|     globalThis.lsh = this.currentUser.lsh |     globalThis.lsh = this.currentUser.lsh | ||||||
|     globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm; |     globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm; | ||||||
| @ -732,7 +736,7 @@ struct UserInfo { | |||||||
|             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg')) |             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg')) | ||||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) |             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               if(this.isExamStart){ |               if (this.isExamStart) { | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               this.currentUser = item |               this.currentUser = item | ||||||
| @ -857,7 +861,7 @@ struct UserInfo { | |||||||
|                     this.sfbdinterfaceFn() |                     this.sfbdinterfaceFn() | ||||||
|                   } |                   } | ||||||
|                 } catch (e) { |                 } catch (e) { | ||||||
|                   console.info('Throw Error',JSON.stringify(e)) |                   console.info('Throw Error', JSON.stringify(e)) | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|               }) |               }) | ||||||
| @ -920,7 +924,7 @@ struct UserInfo { | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       // loading |       // loading | ||||||
|       if(this.isLoadingPopupVisible){ |       if (this.isLoadingPopupVisible) { | ||||||
|         LoadingPopup({ |         LoadingPopup({ | ||||||
|           title: this.loadingText, |           title: this.loadingText, | ||||||
|         }) |         }) | ||||||
| @ -960,7 +964,7 @@ struct CommText { | |||||||
| 
 | 
 | ||||||
|   build() { |   build() { | ||||||
|     Text(this.text) |     Text(this.text) | ||||||
|       .fontSize(16 * this.ratio) |       .fontSize(19.5 * this.ratio) | ||||||
|       .lineHeight(30 * this.ratio) |       .lineHeight(30 * this.ratio) | ||||||
|       .fontWeight(500) |       .fontWeight(500) | ||||||
|       .fontColor(this.color) |       .fontColor(this.color) | ||||||
|  | |||||||
| @ -31,6 +31,7 @@ workerPort.onmessage = (e: MessageEvents): void => { | |||||||
|   if(param.mode=='1'){ |   if(param.mode=='1'){ | ||||||
|     //单中心
 |     //单中心
 | ||||||
|     getSingleCenterTable(param).then((ret) => { |     getSingleCenterTable(param).then((ret) => { | ||||||
|  |       console.log('teststetfinsh1') | ||||||
|       if (ret) { |       if (ret) { | ||||||
|         workerPort.postMessage({ isComplete: true }); |         workerPort.postMessage({ isComplete: true }); | ||||||
|       }else{ |       }else{ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user