單機userlist
This commit is contained in:
parent
fdaba29b5c
commit
0aaf5ddd1a
@ -132,43 +132,42 @@ struct UserInfo {
|
|||||||
// this.openDeviceByIDCard()
|
// this.openDeviceByIDCard()
|
||||||
const routerParam=router.getParams()||{type :0};
|
const routerParam=router.getParams()||{type :0};
|
||||||
console.log('routerParam',JSON.stringify(routerParam))
|
console.log('routerParam',JSON.stringify(routerParam))
|
||||||
// @ts-ignore
|
if(!globalThis.singlePlay){
|
||||||
if(routerParam.type!=1){
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
this.list =await getSyncData('USERLIST')
|
if(routerParam.type!=1){
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const data=await getSyncData('USER')
|
this.list =await getSyncData('USERLIST')
|
||||||
console.log('datadata',JSON.stringify(data));
|
// @ts-ignore
|
||||||
console.log('datadata2',JSON.stringify(this.list))
|
const data=await getSyncData('USER')
|
||||||
|
const user=data[0]
|
||||||
|
if(user&&Number(user.kssycs)){
|
||||||
|
this.list.forEach(res=>{
|
||||||
|
if(res.sfzmhm==user.sfzmhm){
|
||||||
|
res.kssycs=user.kssycs
|
||||||
|
this.getCurrentStudent(res.sfzmhm)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const user=data[0]
|
}else if(user&&(user.kssycs=='0'||user.kssycs=='')){
|
||||||
if(user&&Number(user.kssycs)){
|
console.log('datadatadatadata')
|
||||||
this.list.forEach(res=>{
|
this.list=this.list.filter(res=>{
|
||||||
if(res.sfzmhm==user.sfzmhm){
|
return res.sfzmhm!=user.sfzmhm
|
||||||
res.kssycs=user.kssycs
|
})
|
||||||
this.getCurrentStudent(res.sfzmhm)
|
this.pageIndex=0
|
||||||
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
|
if(this.dataList.length){
|
||||||
|
this.currentUser=this.dataList[0]
|
||||||
|
}else{
|
||||||
|
this.currentUser=EmptyCandidateObject
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
}else if(user&&(user.kssycs=='0'||user.kssycs=='')){
|
|
||||||
console.log('datadatadatadata')
|
|
||||||
this.list=this.list.filter(res=>{
|
|
||||||
return res.sfzmhm!=user.sfzmhm
|
|
||||||
})
|
|
||||||
this.pageIndex=0
|
|
||||||
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
|
||||||
if(this.dataList.length){
|
|
||||||
this.currentUser=this.dataList[0]
|
|
||||||
}else{
|
|
||||||
this.currentUser=EmptyCandidateObject
|
|
||||||
}
|
}
|
||||||
|
this.list.forEach((res,index)=>{
|
||||||
|
res.id=index.toString()
|
||||||
|
})
|
||||||
|
await upDateTableByArray('USERLIST', this.list||[])
|
||||||
|
}else{
|
||||||
|
this.getExaminationStudentInfoFn()
|
||||||
}
|
}
|
||||||
this.list.forEach((res,index)=>{
|
|
||||||
res.id=index.toString()
|
|
||||||
})
|
|
||||||
await upDateTableByArray('USERLIST', this.list||[])
|
|
||||||
}else{
|
|
||||||
this.getExaminationStudentInfoFn()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user