牵引车第二导航仪新udp增加

This commit is contained in:
lixiao 2025-05-09 15:10:21 +08:00
parent f299e6fe17
commit b1421ef637
2 changed files with 7 additions and 52 deletions

View File

@ -25,7 +25,6 @@ export async function getDeviceInfo(context) {
const fileData=JSON.parse(data) const fileData=JSON.parse(data)
globalThis.deviceNo = fileData.deviceName globalThis.deviceNo = fileData.deviceName
console.log('globalThis.deviceNo', globalThis.deviceNo) console.log('globalThis.deviceNo', globalThis.deviceNo)
// getCarInfo()
resolve(fileData.deviceName) resolve(fileData.deviceName)
} }
}) })
@ -45,7 +44,6 @@ export async function getCarInfo() {
} else { } else {
globalThis.carInfo = res.obtainCarExamInfoRsp.body globalThis.carInfo = res.obtainCarExamInfoRsp.body
console.log('globalThis.carInfo2222', JSON.stringify(res)); console.log('globalThis.carInfo2222', JSON.stringify(res));
// globalThis.carInfo.carId=res.obtainCarExamInfoRsp.body.carId
globalThis.carInfo.plateNo = decodeURIComponent(globalThis.carInfo.plateNo) globalThis.carInfo.plateNo = decodeURIComponent(globalThis.carInfo.plateNo)
} }
return res return res

View File

@ -413,8 +413,14 @@ struct Index {
this.loading = true this.loading = true
console.log("sql 1111") console.log("sql 1111")
getSingleCenterTable(param).then((ret) => { getSingleCenterTable(param).then(async (ret) => {
if (ret) { if (ret) {
const result = await getSyncData('ES_CARINFO')
const carInfo = result[0] || {};
if (carInfo.kscx == 'A2') {
// A2牵引车2号导航仪
await getUDPGps2(this.context, false)
}
getSyncData('MA_SYSSET').then(data => { getSyncData('MA_SYSSET').then(data => {
console.log('datadata', JSON.stringify(data)) console.log('datadata', JSON.stringify(data))
// @ts-ignore // @ts-ignore
@ -441,47 +447,6 @@ struct Index {
} }
}) })
// workerInstance.postMessage(param);
// workerInstance.onmessage = (e: MessageEvents): void => {
// console.log("baoyihu after postMessage :", JSON.stringify(e.data));
// // @ts-ignore
// let workData: WorkData = e.data;
// this.loading = false
// if (workData.isComplete) {
// if(globalThis.singlePlay){
// router.pushUrl({
// url: 'pages/UserInfo',
// }, router.RouterMode.Single)
// return
// }
// getSyncData('MA_SYSSET').then(data => {
// console.log('datadata', JSON.stringify(data))
// // @ts-ignore
// data.forEach(sys => {
// //判断是否能点开始考试
// if(sys.v_no === '854'){
// globalThis.param854Str=sys.v_value
// }
// if (sys.v_no === '824'&&decodeURIComponent(sys.v_value)=='0') {
// // this.Param612Str= decodeURIComponent(sys.v_value)
// router.pushUrl({
// url:'pages/CarCheck',
// params: {
// 'fromIndex':true
// }
// }, router.RouterMode.Single)
// }else{
// router.pushUrl({
// url: 'pages/ExaminerLogin',
// }, router.RouterMode.Single)
// }
// })
// });
//
// }
// workerInstance.terminate();
//
// }
} }
async heartMsg() { async heartMsg() {
@ -516,12 +481,6 @@ struct Index {
this.context.resourceManager.getRawFileContent("welcome.wav") this.context.resourceManager.getRawFileContent("welcome.wav")
.then(value => { .then(value => {
this.avPlayer.playAudio(['welcome.wav']) this.avPlayer.playAudio(['welcome.wav'])
// this.vocObj.playAudio({
// type: 1,
// name: 'welcome.wav'
// })
// let rawFile = value;
}) })
.catch(error => { .catch(error => {
console.log("getRawFileContent promise error is " + error); console.log("getRawFileContent promise error is " + error);
@ -580,8 +539,6 @@ struct Index {
// deleteAllFIleLog(GlobalConfig.comoonfileWriteAddress + '/PLC/') // deleteAllFIleLog(GlobalConfig.comoonfileWriteAddress + '/PLC/')
//设置plc udp 同步requesthost //设置plc udp 同步requesthost
await getUDP(this.context, false) await getUDP(this.context, false)
// A2牵引车2号导航仪
await getUDPGps2(this.context, false)
this.loading = false this.loading = false
await getDeviceInfo(this.context) await getDeviceInfo(this.context)