外殼問題修改
This commit is contained in:
		
							parent
							
								
									68821fa208
								
							
						
					
					
						commit
						2efd38f73a
					
				| @ -159,7 +159,7 @@ export async function getSingleCenterTable(param) { | ||||
|   return new Promise((reslove, reject) => { | ||||
|     try{ | ||||
|       upDataZhongxinginitialization(param).then((result) => { | ||||
|         console.log('teststetfinsh01',result) | ||||
|         console.log('kkkkkkkkkkk',result) | ||||
| 
 | ||||
|         if (result) { | ||||
|           reslove(true) | ||||
|  | ||||
| @ -29,6 +29,7 @@ import util from '@ohos.util'; | ||||
| import FileModel from '../../pages/judgeSDK/utils/fileModel'; | ||||
| import FileUtil from '../../common/utils/File'; | ||||
| import { GlobalConfig } from '../../config/index'; | ||||
| import prompt from '@ohos.promptAction' | ||||
| 
 | ||||
| // @ts-nocheck
 | ||||
| //读表
 | ||||
| @ -343,20 +344,21 @@ export async function upDataZhongxinginitialization(param) { | ||||
|     } | ||||
|     let flag=true | ||||
|     if (param.singlePlay) { | ||||
|       console.log('teststet0') | ||||
|       console.log('teststet0',JSON.stringify(param)) | ||||
|       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']; | ||||
|      for(let i=0;i<=tableList.length-1;i++){ | ||||
|        const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`); | ||||
|        const result=await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context) | ||||
|        flag=flag?result:false | ||||
|        result?(flag=true):(flag=false) | ||||
|      } | ||||
|       if(flag){ | ||||
|       if(!flag){ | ||||
|         prompt.showToast({ | ||||
|           message: '本地文件初始化数据库失败', | ||||
|           duration: 3000 | ||||
|         }); | ||||
|       } | ||||
| 
 | ||||
|       resolve(flag) | ||||
|       return | ||||
|     } | ||||
|  | ||||
| @ -30,7 +30,9 @@ export default class EntryAbility extends UIAbility { | ||||
|         globalThis.hasAuth = false | ||||
|         // globalThis.version = '2022.08.13.01'
 | ||||
|         // globalThis.judgeVersion = '2022.12.05.1'
 | ||||
|         globalThis.version = '2024.11.22.14' | ||||
|         // globalThis.version = '2022.12.05.1'
 | ||||
|         // globalThis.judgeVersion = '2022.08.13.01'
 | ||||
|         globalThis.version = '2024.11.22.14'//济南
 | ||||
|         globalThis.judgeVersion = '2024.11.22.14' | ||||
|         globalThis.videoVersion= '1.0' | ||||
|         // globalThis.version = '2023.12.13.01'
 | ||||
|  | ||||
| @ -103,9 +103,7 @@ struct Index { | ||||
|                 if (this.loading) { | ||||
|                   return | ||||
|                 } | ||||
|                 setTimeout(() => { | ||||
|                   this.angle = 360 | ||||
|                 }, 1000) | ||||
| 
 | ||||
|                 this.angle = 0 | ||||
|                 if (!globalThis.timeInfo) { | ||||
|                   globalThis.type='1' | ||||
| @ -118,6 +116,7 @@ struct Index { | ||||
|                   this.loading = false | ||||
|                   return | ||||
|                 } | ||||
| 
 | ||||
|                 if (!globalThis.carInfo) { | ||||
|                   promptAction.showToast({ | ||||
|                     message: `车辆信息接口获取失败`, | ||||
| @ -125,10 +124,14 @@ struct Index { | ||||
|                   }); | ||||
|                   globalThis.type='1' | ||||
|                   AppStorage.SetOrCreate('errorMsg', 1); | ||||
|                   console.log('testXMLToJSONInWorker5',JSON.stringify(globalThis.carInfo)) | ||||
| 
 | ||||
|                   globalThis.title='车辆信息接口获取失败' | ||||
|                   this.loading = false | ||||
|                   return | ||||
|                 } | ||||
|                 console.log('testXMLToJSONInWorker6',JSON.stringify(globalThis.carInfo)) | ||||
| 
 | ||||
|                 this.testXMLToJSONInWorker() | ||||
| 
 | ||||
| 
 | ||||
| @ -143,6 +146,31 @@ struct Index { | ||||
|                 if (this.loading) { | ||||
|                   return | ||||
|                 } | ||||
|                 if (!globalThis.timeInfo) { | ||||
|                   globalThis.type='1' | ||||
|                   AppStorage.SetOrCreate('errorMsg', 1); | ||||
|                   globalThis.title='时间同步接口连接失败' | ||||
|                   promptAction.showToast({ | ||||
|                     message: `时间同步接口连接失败`, | ||||
|                     duration: 3000 | ||||
|                   }); | ||||
|                   this.loading = false | ||||
|                   return | ||||
|                 } | ||||
| 
 | ||||
|                 if (!globalThis.carInfo) { | ||||
|                   promptAction.showToast({ | ||||
|                     message: `车辆信息接口获取失败`, | ||||
|                     duration: 3000 | ||||
|                   }); | ||||
|                   globalThis.type='1' | ||||
|                   AppStorage.SetOrCreate('errorMsg', 1); | ||||
|                   console.log('testXMLToJSONInWorker5',JSON.stringify(globalThis.carInfo)) | ||||
| 
 | ||||
|                   globalThis.title='车辆信息接口获取失败' | ||||
|                   this.loading = false | ||||
|                   return | ||||
|                 } | ||||
|                 //判断数据库是否有表数据,有则直接跳转,没有则读取本地数据 | ||||
|                 getSyncData('MA_SYSSET').then(data => { | ||||
|                   console.log('datadata', JSON.stringify(data)) | ||||
| @ -151,7 +179,7 @@ struct Index { | ||||
|                       url: 'pages/UserInfo', | ||||
|                     }, router.RouterMode.Single) | ||||
|                   } else { | ||||
|                     this.loading = true | ||||
| 
 | ||||
|                     this.testXMLToJSONInWorker() | ||||
|                   } | ||||
|                 }) | ||||
| @ -301,21 +329,26 @@ struct Index { | ||||
|     if (this.loading) { | ||||
|       return | ||||
|     } | ||||
|     console.log('globalThis.timeInfo11111',JSON.stringify(globalThis.timeInfo),'globalThis.carInfo',JSON.stringify(globalThis.carInfo)) | ||||
| 
 | ||||
|     let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts'); | ||||
|     const param = { | ||||
|       singlePlay: this.isSingle, | ||||
|       carId: globalThis.carInfo?.carId, | ||||
|       examinationRoomId: globalThis.carInfo?.examinationRoomId, | ||||
|       judgeVersion: globalThis.judgeVersion, | ||||
|       shellVersion: globalThis.version, | ||||
|       paraKdid: globalThis.timeInfo?.paraKdid, | ||||
|       mode: globalThis.timeInfo?.mode, | ||||
|       context: this.context, | ||||
|       host: globalThis.host, | ||||
|       centerHost: globalThis.timeInfo.url, | ||||
|       singlePlay: globalThis.singlePlay | ||||
|       centerHost: globalThis.timeInfo?.url, | ||||
|       context: this.context, | ||||
|     } | ||||
|     console.log('globalThis.timeInfo',JSON.stringify(globalThis.timeInfo),'globalThis.carInfo',JSON.stringify(globalThis.carInfo)) | ||||
|     this.loading = true | ||||
|     setTimeout(() => { | ||||
|       this.angle = 360 | ||||
|     }, 1000) | ||||
|     workerInstance.postMessage(param); | ||||
|     workerInstance.onmessage = (e: MessageEvents): void => { | ||||
|       console.log("baoyihu after postMessage :", JSON.stringify(e.data)); | ||||
| @ -365,11 +398,11 @@ struct Index { | ||||
| 
 | ||||
|     console.log('globalThis.singlePlay', globalThis.singlePlay) | ||||
|     if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) { | ||||
|       globalThis.singlePlay = false | ||||
|       this.vocObj.playAudio({ | ||||
|         type: 1, | ||||
|         name: 'welcome.wav' | ||||
|       }) | ||||
|       globalThis.singlePlay = false | ||||
|     } | ||||
|     this.isSingle = globalThis.singlePlay | ||||
|     this.loading = false | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user