Compare commits
No commits in common. "0837bd20d8053f058cd1eca728aa6eeb0e13041c" and "f7717785a510129bc81bc317b8b9f1b1534eb127" have entirely different histories.
0837bd20d8
...
f7717785a5
@ -338,10 +338,16 @@ export async function upDataZhongxinginitialization(param) {
|
|||||||
console.log('teststet0')
|
console.log('teststet0')
|
||||||
const fileUtil = new FileUtil(param.context)
|
const fileUtil = new FileUtil(param.context)
|
||||||
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'];
|
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'];
|
||||||
|
|
||||||
for(let i=0;i<=tableList.length-1;i++){
|
for(let i=0;i<=tableList.length-1;i++){
|
||||||
|
console.log('teststet1',tableList[i])
|
||||||
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`);
|
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`);
|
||||||
|
console.log('teststet1',data)
|
||||||
|
|
||||||
await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context)
|
await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context)
|
||||||
|
console.log('teststet2',data)
|
||||||
}
|
}
|
||||||
|
console.log('teststetfinsh')
|
||||||
resolve(true)
|
resolve(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -416,7 +422,6 @@ function setSyncCenterSqlData(key, res, param) {
|
|||||||
const fileUtil = new FileUtil(param.context)
|
const fileUtil = new FileUtil(param.context)
|
||||||
const folderPath = await fileUtil.initFolder(`/config/tableList`);
|
const folderPath = await fileUtil.initFolder(`/config/tableList`);
|
||||||
fileUtil.addFile(`${folderPath}/${mapName[key]}.txt`, JSON.stringify(arrList))
|
fileUtil.addFile(`${folderPath}/${mapName[key]}.txt`, JSON.stringify(arrList))
|
||||||
|
|
||||||
console.log('mapName[key]', mapName[key], key)
|
console.log('mapName[key]', mapName[key], key)
|
||||||
sqlInsertCommonFn(mapName[key], arrList, param.context).then((result) => {
|
sqlInsertCommonFn(mapName[key], arrList, param.context).then((result) => {
|
||||||
console.log(key, '表建立成功')
|
console.log(key, '表建立成功')
|
||||||
|
|||||||
@ -106,6 +106,13 @@ export default class TcpClient {
|
|||||||
|
|
||||||
this.tcp.setExtraOptions({
|
this.tcp.setExtraOptions({
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
|
// OOBInline: true,
|
||||||
|
// TCPNoDelay: true,
|
||||||
|
// socketLinger: { on:true, linger:10 },
|
||||||
|
// receiveBufferSize: 1000,
|
||||||
|
// sendBufferSize: 1000,
|
||||||
|
// reuseAddress: true,
|
||||||
|
// socketTimeout: 3000,
|
||||||
}, err => {
|
}, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('testTagtestTagerrrrr,success')
|
console.log('testTagtestTagerrrrr,success')
|
||||||
@ -185,6 +192,7 @@ export default class TcpClient {
|
|||||||
globalThis.tcpUdpError = true;
|
globalThis.tcpUdpError = true;
|
||||||
}, 2000)
|
}, 2000)
|
||||||
},3000)
|
},3000)
|
||||||
|
|
||||||
// callback(value.message)
|
// callback(value.message)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -192,7 +200,6 @@ export default class TcpClient {
|
|||||||
offTcp(callback) {
|
offTcp(callback) {
|
||||||
console.log(TAG, 'tcpofff')
|
console.log(TAG, 'tcpofff')
|
||||||
|
|
||||||
|
|
||||||
this.tcp.off('testTagofmessg', callback);
|
this.tcp.off('testTagofmessg', callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ export default async function request(req: any) {
|
|||||||
let baseUrl=host?host:globalThis.host
|
let baseUrl=host?host:globalThis.host
|
||||||
// let baseUrl=host?config.csptHost:config.host'
|
// let baseUrl=host?config.csptHost:config.host'
|
||||||
|
|
||||||
console.log('响应头地址' + baseUrl,url)
|
console.log('响应头地址' + baseUrl)
|
||||||
// writeLog({
|
// writeLog({
|
||||||
// time:dateFormat(new Date()),
|
// time:dateFormat(new Date()),
|
||||||
// url,
|
// url,
|
||||||
|
|||||||
@ -28,10 +28,10 @@ export default class EntryAbility extends UIAbility {
|
|||||||
globalThis.examinerInfo = {}
|
globalThis.examinerInfo = {}
|
||||||
globalThis.deviceNo = '';
|
globalThis.deviceNo = '';
|
||||||
globalThis.hasAuth = false
|
globalThis.hasAuth = false
|
||||||
// globalThis.version = '2022.08.13.01'
|
globalThis.version = '2022.08.13.01'
|
||||||
// globalThis.judgeVersion = '2022.12.05.1'
|
globalThis.judgeVersion = '2022.12.05.1'
|
||||||
globalThis.version = '2024.11.22.14'
|
// globalThis.version = '2024.11.22.14'
|
||||||
globalThis.judgeVersion = '2024.11.22.14'
|
// globalThis.judgeVersion = '2024.11.22.14'
|
||||||
globalThis.videoVersion= '1.0'
|
globalThis.videoVersion= '1.0'
|
||||||
// globalThis.version = '2023.12.13.01'
|
// globalThis.version = '2023.12.13.01'
|
||||||
// globalThis.judgeVersion = '2023.09.30.1'
|
// globalThis.judgeVersion = '2023.09.30.1'
|
||||||
|
|||||||
@ -16,8 +16,6 @@ import worker, { MessageEvents } from '@ohos.worker';
|
|||||||
import promptAction from '@ohos.promptAction'
|
import promptAction from '@ohos.promptAction'
|
||||||
import { voiceService } from '../common/service/voiceService';
|
import { voiceService } from '../common/service/voiceService';
|
||||||
// import errorMsgDialog from './compontents/errorMsgDialog'
|
// import errorMsgDialog from './compontents/errorMsgDialog'
|
||||||
import { getSyncData } from '../common/service/initable';
|
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct Index {
|
struct Index {
|
||||||
@ -75,28 +73,28 @@ struct Index {
|
|||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
this.dialogVisiable=true
|
this.dialogVisiable=true
|
||||||
return
|
return
|
||||||
// promptAction.showDialog({
|
promptAction.showDialog({
|
||||||
// title: '提示',
|
title: '提示',
|
||||||
// message: '确认是否退出应用',
|
message: '确认是否退出应用',
|
||||||
// buttons: [
|
buttons: [
|
||||||
// {
|
{
|
||||||
// text: '确认',
|
text: '确认',
|
||||||
// color: '#000000',
|
color: '#000000',
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// text: '取消',
|
text: '取消',
|
||||||
// color: '#000000',
|
color: '#000000',
|
||||||
// }
|
}
|
||||||
// ],
|
],
|
||||||
// })
|
})
|
||||||
// .then(data => {
|
.then(data => {
|
||||||
// if (data.index == 0) {
|
if (data.index == 0) {
|
||||||
// router.back()
|
router.back()
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// .catch(err => {
|
.catch(err => {
|
||||||
// // reslove(false)
|
// reslove(false)
|
||||||
// })
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,19 +132,7 @@ struct Index {
|
|||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//判断数据库是否有表数据,有则直接跳转,没有则读取本地数据
|
this.testXMLToJSONInWorker()
|
||||||
getSyncData('MA_SYSSET').then(data => {
|
|
||||||
console.log('datadata',JSON.stringify(data))
|
|
||||||
if (data?.[0]) {
|
|
||||||
router.pushUrl({
|
|
||||||
url:'pages/UserInfo',
|
|
||||||
}, router.RouterMode.Single)
|
|
||||||
}else{
|
|
||||||
this.loading=true
|
|
||||||
this.testXMLToJSONInWorker()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
})
|
})
|
||||||
|
|||||||
@ -102,8 +102,6 @@ struct UserInfo {
|
|||||||
]
|
]
|
||||||
|
|
||||||
async onPageShow() {
|
async onPageShow() {
|
||||||
this.updateTimeLimit=false
|
|
||||||
console.log('响应头地址响应头地址')
|
|
||||||
const mediaTest = new FilePhoto(this.context);
|
const mediaTest = new FilePhoto(this.context);
|
||||||
this.filePhoto = new FilePhoto(this.context);
|
this.filePhoto = new FilePhoto(this.context);
|
||||||
//语音功能
|
//语音功能
|
||||||
@ -117,11 +115,6 @@ struct UserInfo {
|
|||||||
this.initSysset()
|
this.initSysset()
|
||||||
//心跳处理
|
//心跳处理
|
||||||
this.heartMsg()
|
this.heartMsg()
|
||||||
getSyncData('USER').then(data => {
|
|
||||||
if (data?.[0]) {
|
|
||||||
this.getExaminationStudentInfoFn()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.isExamStart = false
|
this.isExamStart = false
|
||||||
this.sczbkf = [];
|
this.sczbkf = [];
|
||||||
this.avPlayer = new VoiceAnnounce();
|
this.avPlayer = new VoiceAnnounce();
|
||||||
@ -146,9 +139,9 @@ struct UserInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 通过身份证获取当前学员
|
// 通过身份证获取当前学员
|
||||||
async getCurrentStudent(id) {
|
getCurrentStudent(id) {
|
||||||
let flag = false
|
let flag = false
|
||||||
// this.pageIndex
|
this.pageIndex
|
||||||
this.list.map((res, index) => {
|
this.list.map((res, index) => {
|
||||||
if (res.sfzmhm == id) {
|
if (res.sfzmhm == id) {
|
||||||
flag = true
|
flag = true
|
||||||
@ -177,12 +170,10 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
await upDateTableByArray('USER', [])
|
promptAction.showToast({
|
||||||
this.currentUser=this.list[0]
|
message: '未匹配到对应下载学员',
|
||||||
// promptAction.showToast({
|
duration: 3000
|
||||||
// message: '未匹配到对应下载学员',
|
});
|
||||||
// duration: 3000
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +255,7 @@ struct UserInfo {
|
|||||||
globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm
|
globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm
|
||||||
globalThis.lsh = this.lsh
|
globalThis.lsh = this.lsh
|
||||||
} else {
|
} else {
|
||||||
// this.getExaminationStudentInfoFn()
|
this.getExaminationStudentInfoFn()
|
||||||
}
|
}
|
||||||
const syssetParams = await getSyncData('MA_SYSSET');
|
const syssetParams = await getSyncData('MA_SYSSET');
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -385,6 +376,13 @@ 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)
|
||||||
|
this.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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取下载考生
|
//获取下载考生
|
||||||
@ -666,14 +664,16 @@ struct UserInfo {
|
|||||||
const {carId,examinationRoomId} = carInfo;
|
const {carId,examinationRoomId} = carInfo;
|
||||||
const { examSubject,plateNo } = carInfo;
|
const { examSubject,plateNo } = carInfo;
|
||||||
const date = new Date()
|
const date = new Date()
|
||||||
|
console.info('surenjun', 'photoBase64')
|
||||||
const photoBase64 = await this.getPhoto();
|
const photoBase64 = await this.getPhoto();
|
||||||
|
console.info('surenjun', 'photoBase64End')
|
||||||
const drvexam = {
|
const drvexam = {
|
||||||
lsh: this.currentUser.lsh || '',
|
lsh: this.currentUser.lsh || '',
|
||||||
kskm: examSubject,
|
kskm: examSubject,
|
||||||
ksxtbh: this.ksxtbh || '222',
|
ksxtbh: this.ksxtbh || '222',
|
||||||
sfzmhm: this.currentUser.sfzmhm || '',
|
sfzmhm: this.currentUser.sfzmhm || '',
|
||||||
ksysfzmhm: this.currentUser.ksy1sfzmhm || '',
|
ksysfzmhm: this.currentUser.ksy1sfzmhm || '',
|
||||||
ksxl: this.currentUser.xldm,
|
ksxl: this.currentUser.ksxl,
|
||||||
zp: photoBase64,
|
zp: photoBase64,
|
||||||
kssj: dateFormat(date) || '',
|
kssj: dateFormat(date) || '',
|
||||||
kchp: decodeURI(plateNo),
|
kchp: decodeURI(plateNo),
|
||||||
@ -741,7 +741,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&&!globalThis.singlePlay) {
|
if (this.isExamStart) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.currentUser = item
|
this.currentUser = item
|
||||||
@ -995,9 +995,9 @@ struct LabelBlock {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
Row() {
|
Row() {
|
||||||
Text(this.label).fontSize(20 * this.ratio).fontColor('#99948A')
|
Text(this.label).fontSize(16 * this.ratio).fontColor('#99948A')
|
||||||
Row() {
|
Row() {
|
||||||
Text(decodeURIComponent(this.value)).fontColor('#fff').textAlign(TextAlign.Center).width('100%').fontSize(18 * this.ratio)
|
Text(decodeURIComponent(this.value)).fontColor('#fff').textAlign(TextAlign.Center).width('100%')
|
||||||
}
|
}
|
||||||
.commLabelStyle()
|
.commLabelStyle()
|
||||||
}.margin({ bottom: 10 * this.ratio })
|
}.margin({ bottom: 10 * this.ratio })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user