Merge branch 'main' of http://88.22.20.16:3000/shutdown/subject-two
This commit is contained in:
commit
38d48e778b
@ -38,6 +38,7 @@ struct UserInfo {
|
|||||||
@State dataList: Array<User> = []
|
@State dataList: Array<User> = []
|
||||||
@State list: Array<User> = []
|
@State list: Array<User> = []
|
||||||
@State param: VideoConfig = {
|
@State param: VideoConfig = {
|
||||||
|
videoNum:'1',
|
||||||
spls: '',
|
spls: '',
|
||||||
faceFlag: false,
|
faceFlag: false,
|
||||||
pztd: '2',
|
pztd: '2',
|
||||||
@ -58,7 +59,9 @@ struct UserInfo {
|
|||||||
}
|
}
|
||||||
private AccountTable = new AccountTable(() => {
|
private AccountTable = new AccountTable(() => {
|
||||||
}, USER);
|
}, USER);
|
||||||
|
|
||||||
private context = getContext(this) as common.UIAbilityContext;
|
private context = getContext(this) as common.UIAbilityContext;
|
||||||
|
|
||||||
@State name: string = 'initName';
|
@State name: string = 'initName';
|
||||||
@State sex: string = '';
|
@State sex: string = '';
|
||||||
@State callBackFlag:boolean=false;
|
@State callBackFlag:boolean=false;
|
||||||
@ -70,7 +73,6 @@ struct UserInfo {
|
|||||||
@State effectDate: string = '';
|
@State effectDate: string = '';
|
||||||
@State interval: any = null;
|
@State interval: any = null;
|
||||||
@State interval2: any = null;
|
@State interval2: any = null;
|
||||||
@State interval3: any = null;
|
|
||||||
@State studentRefreshStatue: string = '0';
|
@State studentRefreshStatue: string = '0';
|
||||||
@State photo: string = 'data:image/bmp;base64,';
|
@State photo: string = 'data:image/bmp;base64,';
|
||||||
@State numCount: number = 0;
|
@State numCount: number = 0;
|
||||||
@ -80,8 +82,13 @@ struct UserInfo {
|
|||||||
@State faceCatchImg:string=''
|
@State faceCatchImg:string=''
|
||||||
|
|
||||||
onPageShow() {
|
onPageShow() {
|
||||||
|
//打开读卡器
|
||||||
|
this.openChuankouDeviceFn()
|
||||||
//语音功能
|
//语音功能
|
||||||
this.stepFlag=false
|
this.stepFlag=false
|
||||||
|
this.initData()
|
||||||
|
this.initSysset()
|
||||||
|
initJudgeUdp()
|
||||||
new WebRTCVoice(this.context);
|
new WebRTCVoice(this.context);
|
||||||
this.faceCompareSucess = 0
|
this.faceCompareSucess = 0
|
||||||
this.showFaceCompare = false
|
this.showFaceCompare = false
|
||||||
@ -128,25 +135,39 @@ struct UserInfo {
|
|||||||
}else{
|
}else{
|
||||||
// this.getExaminationStudentInfoFn()
|
// this.getExaminationStudentInfoFn()
|
||||||
}
|
}
|
||||||
this.initSysset()
|
|
||||||
initJudgeUdp()
|
|
||||||
}
|
|
||||||
|
|
||||||
changeQkfn() {
|
|
||||||
this.qkFn()
|
|
||||||
}
|
}
|
||||||
|
//初始化reset data
|
||||||
getqkFn() {
|
initData(){
|
||||||
let tmpList = [];
|
this.lsh='0000000000000'
|
||||||
tmpList.push(this.string2Bytes(globalThis.signNum, 1 * 8)[0])
|
this.faceCompareSucess=0
|
||||||
const param = {
|
this.showFaceCompare=false
|
||||||
id: 41,
|
globalThis.lsh = this.lsh
|
||||||
list: tmpList,
|
this.currentUser= {
|
||||||
carNo: globalThis.carInfo.carNo,
|
sfzmhm: '',
|
||||||
placeId: globalThis.carInfo.examinationRoomId
|
xm: '',
|
||||||
|
lsh: '',
|
||||||
|
ksy1: '',
|
||||||
|
id: '',
|
||||||
|
kszp: '',
|
||||||
|
ksmjzp: '',
|
||||||
|
bz1: '',
|
||||||
|
jxmc: '',
|
||||||
|
kchp: '',
|
||||||
|
kscx: '',
|
||||||
|
ksdd: '',
|
||||||
|
kssycs: '',
|
||||||
|
ksxl: '',
|
||||||
|
ksy1sfzmhm: '',
|
||||||
|
kszt: '',
|
||||||
|
xb: '',
|
||||||
|
xh: '',
|
||||||
|
xldm: '',
|
||||||
|
yycs: ''
|
||||||
}
|
}
|
||||||
|
globalThis.statue=2
|
||||||
globalThis.udpClient2.sendMsg(param, this.context)
|
this.numCount=0
|
||||||
|
this.callBackFlag=false
|
||||||
}
|
}
|
||||||
|
|
||||||
async heartMsg(context) {
|
async heartMsg(context) {
|
||||||
@ -211,7 +232,7 @@ struct UserInfo {
|
|||||||
this.sfbdinterfaceFn()
|
this.sfbdinterfaceFn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//读卡器阅读
|
||||||
onReadCard(ret) {
|
onReadCard(ret) {
|
||||||
console.info(`zzctest xx Read Card ret =${ret.status}`)
|
console.info(`zzctest xx Read Card ret =${ret.status}`)
|
||||||
let thisVar = globalThis.indexComponent;
|
let thisVar = globalThis.indexComponent;
|
||||||
@ -419,6 +440,11 @@ struct UserInfo {
|
|||||||
const zeroStr = '0'.repeat(num);
|
const zeroStr = '0'.repeat(num);
|
||||||
return zeroStr + str;
|
return zeroStr + str;
|
||||||
}
|
}
|
||||||
|
//考点端查询缺考指令内容消息请求
|
||||||
|
getqkFn(){
|
||||||
|
let tmpList = [];
|
||||||
|
tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0])
|
||||||
|
const param= {id: 41,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRoomId}
|
||||||
|
|
||||||
string2Bytes(number, len) {
|
string2Bytes(number, len) {
|
||||||
const str = (+number).toString(2);
|
const str = (+number).toString(2);
|
||||||
@ -434,24 +460,7 @@ struct UserInfo {
|
|||||||
});
|
});
|
||||||
return arrBytes;
|
return arrBytes;
|
||||||
}
|
}
|
||||||
|
//车载端学员缺考
|
||||||
getPhotosForOtherFn(data, type) {
|
|
||||||
const date = new Date()
|
|
||||||
const param = {
|
|
||||||
time: dateFormat(date),
|
|
||||||
ksrq: dateFormat(date).split(' ')[0],
|
|
||||||
sfzmhm: data.sfzmhm,
|
|
||||||
zptype: type
|
|
||||||
}
|
|
||||||
getPhotosForOther(param).then(res => {
|
|
||||||
if (type == '1') {
|
|
||||||
this.currentUser.kszp = 'data:image/jpg;base64,' + res.getBmzpRsp.body.kszp
|
|
||||||
} else {
|
|
||||||
this.currentUser.ksmjzp = 'data:image/jpg;base64,' + res.getBmzpRsp.body.ksmjzp
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
qkFn() {
|
qkFn() {
|
||||||
this.faceCompareSucess = 0
|
this.faceCompareSucess = 0
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay) {
|
||||||
@ -488,11 +497,148 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
async heartMsg(context) {
|
||||||
|
let tmpList=[]
|
||||||
|
const str =globalThis.lsh
|
||||||
|
for (let i = 0;i < str.length; i++) {
|
||||||
|
tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0])
|
||||||
|
}
|
||||||
|
|
||||||
outClick() {
|
outClick() {
|
||||||
testNapi.StopReadCard();
|
testNapi.StopReadCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
facePass(){
|
||||||
|
if(!this.stepFlag){
|
||||||
|
this.sfbdinterfaceFn()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
changefaceCompareSucess() {
|
||||||
|
if(this.faceCompareSucess>0){
|
||||||
|
this.sfbdinterfaceFn()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nextClick() {
|
||||||
|
if (this.list.length <= 4||this.pageIndex==Math.floor(this.list.length/4)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.pageIndex++;
|
||||||
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
|
}
|
||||||
|
|
||||||
|
prevClick() {
|
||||||
|
if (this.list.length <= 4||this.pageIndex==0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.pageIndex--;
|
||||||
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
|
}
|
||||||
|
//获取下载学员接口
|
||||||
|
getExaminationStudentInfoFn() {
|
||||||
|
if(globalThis.singlePlay){
|
||||||
|
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>`
|
||||||
|
getExaminationStudentInfo(param).then(res => {
|
||||||
|
if (!res) {
|
||||||
|
this.dataList=[]
|
||||||
|
this.currentUser={
|
||||||
|
sfzmhm: '',
|
||||||
|
xm: '',
|
||||||
|
lsh: '',
|
||||||
|
ksy1: '',
|
||||||
|
id: '',
|
||||||
|
kszp: '',
|
||||||
|
ksmjzp: '',
|
||||||
|
bz1: '',
|
||||||
|
jxmc: '',
|
||||||
|
kchp: '',
|
||||||
|
kscx: '',
|
||||||
|
ksdd: '',
|
||||||
|
kssycs: '',
|
||||||
|
ksxl: '',
|
||||||
|
ksy1sfzmhm: '',
|
||||||
|
kszt: '',
|
||||||
|
xb: '',
|
||||||
|
xh: '',
|
||||||
|
xldm: '',
|
||||||
|
yycs: ''
|
||||||
|
}
|
||||||
|
console.log('currentUser',JSON.stringify(this.currentUser))
|
||||||
|
this.errorMsg = decodeURI(res.getExaminationStudentInfoRsp.head.resultMessage)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let dataList = []
|
||||||
|
this.list=[]
|
||||||
|
for (let key in res.getExaminationStudentInfoRsp.body) {
|
||||||
|
const a = res.getExaminationStudentInfoRsp.body[key]
|
||||||
|
if(a instanceof Array){
|
||||||
|
dataList=a
|
||||||
|
}else{
|
||||||
|
dataList=[a]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(dataList.length){
|
||||||
|
this.numCount=0
|
||||||
|
}
|
||||||
|
|
||||||
|
this.list=JSON.parse(JSON.stringify(dataList))
|
||||||
|
if (dataList.length > 4) {
|
||||||
|
dataList = dataList.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
|
} else {
|
||||||
|
dataList = dataList
|
||||||
|
}
|
||||||
|
dataList.forEach(listData=>{
|
||||||
|
for(let i in listData){
|
||||||
|
listData[i]= decodeURI(listData[i])
|
||||||
|
}
|
||||||
|
listData.kszp=this.photo+listData.kszp
|
||||||
|
listData.ksmjzp=this.photo+listData.ksmjzp
|
||||||
|
})
|
||||||
|
this.dataList = dataList
|
||||||
|
if(this.dataList.length){
|
||||||
|
this.currentUser = this.dataList[0]
|
||||||
|
}else{
|
||||||
|
this.currentUser={
|
||||||
|
sfzmhm: '',
|
||||||
|
xm: '',
|
||||||
|
lsh: '',
|
||||||
|
ksy1: '',
|
||||||
|
id: '',
|
||||||
|
kszp: '',
|
||||||
|
ksmjzp: '',
|
||||||
|
bz1: '',
|
||||||
|
jxmc: '',
|
||||||
|
kchp: '',
|
||||||
|
kscx: '',
|
||||||
|
ksdd: '',
|
||||||
|
kssycs: '',
|
||||||
|
ksxl: '',
|
||||||
|
ksy1sfzmhm: '',
|
||||||
|
kszt: '',
|
||||||
|
xb: '',
|
||||||
|
xh: '',
|
||||||
|
xldm: '',
|
||||||
|
yycs: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.lsh=this.currentUser.lsh
|
||||||
|
globalThis.lsh=this.lsh
|
||||||
|
globalThis.ksyh=this.currentUser.ksy1sfzmhm||this.currentUser.ksy2sfzmhm
|
||||||
|
|
||||||
|
|
||||||
|
console.log('this.currentUse3' + JSON.stringify(this.currentUser))
|
||||||
|
this.pageIndex = 0
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log('error12error' + error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//身份比对
|
||||||
async sfbdinterfaceFn(){
|
async sfbdinterfaceFn(){
|
||||||
this.stepFlag=true
|
this.stepFlag=true
|
||||||
console.info('surenjun',this.currentUser.lsh)
|
console.info('surenjun',this.currentUser.lsh)
|
||||||
@ -737,23 +883,12 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.showFaceCompare) {
|
if(this.showFaceCompare) {
|
||||||
FaceCompare({
|
FaceCompare({ sfzh: this.currentUser.sfzmhm, firstImage:this.currentUser.kszp,faceCompareSucess: $faceCompareSucess,getqkFlag:$getqkFlag,faceCatchImg:$faceCatchImg,lsh:globalThis.lsh })
|
||||||
showFaceCompare: $showFaceCompare,
|
|
||||||
sfzh: this.currentUser.sfzmhm,
|
|
||||||
firstImage: this.currentUser.kszp,
|
|
||||||
faceCompareSucess: $faceCompareSucess,
|
|
||||||
getqkFlag: $getqkFlag,
|
|
||||||
faceCatchImg: $faceCatchImg,
|
|
||||||
lsh: globalThis.lsh
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
if(this.qkFlag){
|
if(this.qkFlag){
|
||||||
Column(){
|
Column(){
|
||||||
Text('确认考生:' + this.currentUser.xm + '是否缺考')
|
Text('确认考生:'+this.currentUser.xm+'是否缺考').fontSize(28*this.ratio).position({x:160*this.ratio,y:122*this.ratio})
|
||||||
.fontSize(28 * this.ratio)
|
|
||||||
.position({ x: 160 * this.ratio, y: 122 * this.ratio })
|
|
||||||
Row(){
|
Row(){
|
||||||
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
||||||
Text(' 取 消 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
Text(' 取 消 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
||||||
@ -762,7 +897,6 @@ struct UserInfo {
|
|||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
this.qkFlag = false
|
this.qkFlag = false
|
||||||
})
|
})
|
||||||
|
|
||||||
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
|
||||||
Text(' 确 定 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
Text(' 确 定 ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio)
|
||||||
}
|
}
|
||||||
@ -772,13 +906,14 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
}.position({y:265*this.ratio,x:115*this.ratio})
|
}.position({y:265*this.ratio,x:115*this.ratio})
|
||||||
|
|
||||||
}
|
}.width(660 * this.ratio)
|
||||||
.width(660 * this.ratio)
|
|
||||||
.height(360 * this.ratio)
|
.height(360 * this.ratio)
|
||||||
.position({ x: 150 * this.ratio, y: 98 * this.ratio })
|
.position({ x: 150 * this.ratio, y: 98 * this.ratio })
|
||||||
.backgroundColor('#E6E3DF')
|
.backgroundColor('#E6E3DF')
|
||||||
.borderRadius(19 * this.ratio)
|
.borderRadius(19 * this.ratio)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.height('100%')
|
.height('100%')
|
||||||
.width('100%')
|
.width('100%')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user