Compare commits
2 Commits
a48ba68e5c
...
664a4a91c6
| Author | SHA1 | Date | |
|---|---|---|---|
| 664a4a91c6 | |||
| 54c7428b36 |
Binary file not shown.
@ -196,6 +196,7 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async heartMsg() {
|
async heartMsg() {
|
||||||
|
//心跳指令编号 //考试状态
|
||||||
const arr = [globalThis.signNum || 0, globalThis.statue || 1]
|
const arr = [globalThis.signNum || 0, globalThis.statue || 1]
|
||||||
let tmpList = [];
|
let tmpList = [];
|
||||||
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
||||||
@ -210,10 +211,10 @@ struct Index {
|
|||||||
|
|
||||||
onPageShow() {
|
onPageShow() {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.createAlbum()
|
|
||||||
this.userAuth();
|
this.userAuth();
|
||||||
//plc
|
//plc
|
||||||
getUDP()
|
getUDP()
|
||||||
|
//中心udp
|
||||||
getUDP2()
|
getUDP2()
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval=setInterval(() => {
|
this.interval=setInterval(() => {
|
||||||
@ -223,10 +224,8 @@ struct Index {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
// 3s拍照
|
// 3s拍照
|
||||||
takePhotoFn(this.context)
|
takePhotoFn(this.context)
|
||||||
|
//tcp差分转发,如果差分通过udp转发可注释
|
||||||
//
|
|
||||||
getTCP()
|
getTCP()
|
||||||
// const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort)
|
|
||||||
|
|
||||||
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) {
|
||||||
globalThis.singlePlay = false
|
globalThis.singlePlay = false
|
||||||
@ -236,10 +235,10 @@ struct Index {
|
|||||||
console.info('Index onPageShow');
|
console.info('Index onPageShow');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//创建截图文件夹
|
||||||
async createAlbum() {
|
async createAlbum() {
|
||||||
this.fileHelper = new FileHelper();
|
this.fileHelper = new FileHelper();
|
||||||
this.fileHelper.createAlbum('jt')
|
// this.fileHelper.createAlbum('jt')
|
||||||
this.fileHelper.createAlbum('pz');
|
this.fileHelper.createAlbum('pz');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -268,7 +267,10 @@ struct Index {
|
|||||||
}
|
}
|
||||||
async initParams() {
|
async initParams() {
|
||||||
this.loading=false
|
this.loading=false
|
||||||
|
//获取设备信息
|
||||||
|
this.createAlbum()
|
||||||
await getDeviceInfo()
|
await getDeviceInfo()
|
||||||
|
//车辆信息
|
||||||
getCarInfo()
|
getCarInfo()
|
||||||
await setCurrentTime();
|
await setCurrentTime();
|
||||||
this.carNum = globalThis.carInfo.plateNo;
|
this.carNum = globalThis.carInfo.plateNo;
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import ethernet from '@ohos.net.ethernet';
|
|||||||
import prompt from '@ohos.prompt'
|
import prompt from '@ohos.prompt'
|
||||||
import { upDateTableByArray} from '../common/service/initable'
|
import { upDateTableByArray} from '../common/service/initable'
|
||||||
import { getSyncData} from '../common/service/initable'
|
import { getSyncData} from '../common/service/initable'
|
||||||
import { getUDP, getUDP2 } from '../common/utils/GlobleUdp';
|
// import { getUDP, getUDP2 } from '../common/utils/GlobleUdp';
|
||||||
import { getTCP } from '../common/utils/GlobleTcp';
|
// import { getTCP } from '../common/utils/GlobleTcp';
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct Index {
|
struct Index {
|
||||||
@ -102,9 +102,7 @@ struct Index {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getUDP(true)
|
|
||||||
getUDP2(true)
|
|
||||||
getTCP(true)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
.backgroundColor('#CCC4B8')
|
.backgroundColor('#CCC4B8')
|
||||||
|
|||||||
@ -62,19 +62,16 @@ struct UserInfo {
|
|||||||
@State faceCatchImg: string = ''
|
@State faceCatchImg: string = ''
|
||||||
|
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
|
|
||||||
//语音功能
|
//语音功能
|
||||||
const systemParms:any = await getSyncData('MA_SYSTEMPARM')
|
|
||||||
console.log('systemParms',systemParms.length)
|
|
||||||
new WebRTCVoice(this.context);
|
new WebRTCVoice(this.context);
|
||||||
//初始化数据
|
//初始化数据
|
||||||
this.initData()
|
this.initData()
|
||||||
//身份证读卡器初始化
|
//身份证读卡器初始化
|
||||||
// this.openDeviceByIDCard()
|
// this.openDeviceByIDCard()
|
||||||
// 如果是单机模式则模拟假数据
|
// 如果是单机模式则模拟假数据
|
||||||
|
//获取sysset表数据
|
||||||
this.initSysset()
|
this.initSysset()
|
||||||
// initJudgeUdp()
|
//心跳处理
|
||||||
this.heartMsg()
|
this.heartMsg()
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -185,6 +182,7 @@ struct UserInfo {
|
|||||||
changeQkfn() {
|
changeQkfn() {
|
||||||
this.qkFn()
|
this.qkFn()
|
||||||
}
|
}
|
||||||
|
//初始化数据
|
||||||
initData(){
|
initData(){
|
||||||
this.stepFlag = false
|
this.stepFlag = false
|
||||||
this.faceCompareSucess = 0
|
this.faceCompareSucess = 0
|
||||||
@ -214,15 +212,18 @@ struct UserInfo {
|
|||||||
if(val.id=='32'){
|
if(val.id=='32'){
|
||||||
globalThis.signNum=val.body[1]
|
globalThis.signNum=val.body[1]
|
||||||
if(val.body[0]=='7'){
|
if(val.body[0]=='7'){
|
||||||
|
//缺考处理
|
||||||
this.getqkFn()
|
this.getqkFn()
|
||||||
this.signNum=val.body[1]
|
this.signNum=val.body[1]
|
||||||
}
|
}
|
||||||
}else if(val.id=='42'){
|
}else if(val.id=='42'){
|
||||||
|
//收到中心缺考确认消息
|
||||||
console.log('qkfnqkfn',val.body[0])
|
console.log('qkfnqkfn',val.body[0])
|
||||||
this.qkFn()
|
this.qkFn()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//考点端查询缺考指令内容消息请求
|
||||||
getqkFn() {
|
getqkFn() {
|
||||||
let tmpList = [];
|
let tmpList = [];
|
||||||
tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0])
|
tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0])
|
||||||
@ -236,11 +237,6 @@ struct UserInfo {
|
|||||||
globalThis.udpClient2.sendMsg(param, this.context)
|
globalThis.udpClient2.sendMsg(param, this.context)
|
||||||
}
|
}
|
||||||
|
|
||||||
facePass() {
|
|
||||||
if (!this.stepFlag) {
|
|
||||||
this.sfbdinterfaceFn()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async initSysset() {
|
async initSysset() {
|
||||||
const that = this;
|
const that = this;
|
||||||
@ -287,10 +283,11 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//人脸比对窗口关闭
|
||||||
changeFaceCompareSuccess() {
|
changeFaceCompareSuccess() {
|
||||||
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) {
|
||||||
|
//人脸比对通过
|
||||||
this.sfbdinterfaceFn()
|
this.sfbdinterfaceFn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,7 +307,7 @@ struct UserInfo {
|
|||||||
this.pageIndex--;
|
this.pageIndex--;
|
||||||
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
}
|
}
|
||||||
|
//获取下载考生
|
||||||
getExaminationStudentInfoFn() {
|
getExaminationStudentInfoFn() {
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay) {
|
||||||
return
|
return
|
||||||
@ -363,6 +360,7 @@ struct UserInfo {
|
|||||||
console.log('error12error' + error)
|
console.log('error12error' + error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//缺考
|
||||||
qkFn() {
|
qkFn() {
|
||||||
this.faceCompareSucess = 0
|
this.faceCompareSucess = 0
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay) {
|
||||||
@ -399,6 +397,7 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 获取考试项目
|
||||||
async getExaminationItemFn(){
|
async getExaminationItemFn(){
|
||||||
console.info('surenjun', this.currentUser.lsh)
|
console.info('surenjun', this.currentUser.lsh)
|
||||||
if(!this.currentUser.lsh||globalThis.singlePlay){
|
if(!this.currentUser.lsh||globalThis.singlePlay){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user