feat_surenjun #46
@ -23,11 +23,13 @@ import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
||||
import { JudgeConfig } from '../config/judge';
|
||||
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
||||
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct UserInfo {
|
||||
private filePhoto: FilePhoto
|
||||
private avPlayer
|
||||
|
||||
@State pageIndex: number = 0
|
||||
@State ratio: number = 1700 / 960
|
||||
@State index: number = 0
|
||||
@ -47,7 +49,7 @@ struct UserInfo {
|
||||
@State isFirstBoardPrePareSetPopupBtnShow: boolean = false
|
||||
@State isBoardPrePareSetPopupShow: boolean = false
|
||||
@State isLoadingPopupVisible:boolean = false;
|
||||
@State loadingText:string = '正在生成考试记录,请稍后...'
|
||||
@State loadingText:string = '正在认证监管信息,请稍后...'
|
||||
@State sczbkf:{xmdm:number,kfdm:string}[] = []
|
||||
@State currentUser: User = EmptyCandidateObject
|
||||
@State dataList: Array<User> = []
|
||||
@ -85,10 +87,7 @@ struct UserInfo {
|
||||
return photoBase64
|
||||
}
|
||||
}
|
||||
private filePhoto: FilePhoto
|
||||
private avPlayer
|
||||
private AccountTable = new AccountTable(() => {
|
||||
}, USER);
|
||||
private AccountTable = new AccountTable(() => {}, USER);
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private labelBlocks = [
|
||||
{ label: '考生姓名', key: 'xm' },
|
||||
@ -513,16 +512,21 @@ struct UserInfo {
|
||||
});
|
||||
}
|
||||
this.currentUser.id = '1'
|
||||
//是否已经开始考试
|
||||
// if(!this.isExamStart){
|
||||
const avPlayer = this.avPlayer;
|
||||
this.isLoadingPopupVisible = true
|
||||
avPlayer.playAudio([`voice/监管通信中.mp3`],false,async ()=>{
|
||||
const code = await this.beginExam();
|
||||
if (code != 1) {
|
||||
promptAction.showToast({
|
||||
message:'开始考试接口调用失败!',
|
||||
duration:4000
|
||||
})
|
||||
return
|
||||
}
|
||||
// }
|
||||
await upDateTableByArray('USER', [this.currentUser])
|
||||
globalThis.statue = 4
|
||||
this.stepFlag = false
|
||||
this.isLoadingPopupVisible = false
|
||||
router.pushUrl({
|
||||
url: 'pages/Judge',
|
||||
params: {
|
||||
@ -533,6 +537,7 @@ struct UserInfo {
|
||||
}, router.RouterMode.Single);
|
||||
this.stopDeviceById()
|
||||
this.stepFlag = false
|
||||
})
|
||||
}
|
||||
|
||||
// 检测车门、熄火信号
|
||||
@ -541,16 +546,14 @@ struct UserInfo {
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(isCheckFireOpen){
|
||||
resolve(true)
|
||||
// return
|
||||
}
|
||||
globalThis.udpClient.onMessage_1(async (msg) => {
|
||||
const msgArr = msg.split(',')
|
||||
console.info('socketTag[PLC.UdpClient]', '注册udp回调')
|
||||
let plcValue = globalThis.udpClient.getCurrentMessage();
|
||||
console.info('surenjun',plcValue)
|
||||
const msgArr = plcValue.split(',') || ''
|
||||
const mkg = msgArr[14];
|
||||
const fdjzs = msgArr[25];
|
||||
globalThis.udpClient.onMessage_1(() => {
|
||||
});
|
||||
//TODO
|
||||
console.info('surenjun mkg=>', mkg)
|
||||
console.info('surenjun fdjzs=>', fdjzs)
|
||||
if(mkg == 1){
|
||||
this.avPlayer.playAudio(['voice/关门.mp3'])
|
||||
promptAction.showToast({
|
||||
@ -567,8 +570,6 @@ struct UserInfo {
|
||||
})
|
||||
reject(false)
|
||||
}
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@ -838,16 +839,7 @@ struct UserInfo {
|
||||
BoardPrePareSetPopup({
|
||||
closePopup: (bool) => {
|
||||
this.isBoardPrePareSetPopupShow = false;
|
||||
// if(!globalThis.singlePlay){
|
||||
// this.isFirstBoardPrePareSetPopupBtnShow = !bool;
|
||||
// }
|
||||
},
|
||||
// endLoading:()=>{
|
||||
// this.isLoadingPopupVisible = false;
|
||||
// this.faceCompareSucess = 0
|
||||
// this.numCount = 0
|
||||
// this.getExaminationStudentInfoFn()
|
||||
// },
|
||||
confirmMark: (kfdm) => {
|
||||
this.sczbkf = kfdm
|
||||
}
|
||||
@ -855,12 +847,11 @@ struct UserInfo {
|
||||
}
|
||||
|
||||
// loading
|
||||
// if(this.isLoadingPopupVisible){
|
||||
// LoadingPopup({
|
||||
// title: this.loadingText,
|
||||
// })
|
||||
// }
|
||||
|
||||
if(this.isLoadingPopupVisible){
|
||||
LoadingPopup({
|
||||
title: this.loadingText,
|
||||
})
|
||||
}
|
||||
}
|
||||
.height('100%')
|
||||
.width('100%')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user