init: 初始化
This commit is contained in:
		
							parent
							
								
									9e54965bef
								
							
						
					
					
						commit
						9dd83d3a6e
					
				| @ -4,13 +4,13 @@ | ||||
|       { | ||||
|         "name": "default", | ||||
|         "material": { | ||||
|           "certpath": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_Ja3OiX9fkBwGKa0NNRbcXszAt35lPCdUakY4mTtjFwU=.cer", | ||||
|           "storePassword": "0000001B8F068D534BF0B0245E4BDB69E8CFA101B3E7CD4BE89CFE5B2FD5D27D4CA2734F0FBC84F49A9C68", | ||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.cer", | ||||
|           "storePassword": "0000001B8E9DDF652EF92FEE3FEA48705C778A1477A239E20DF0355D7EB87B3674868AFF199387F065F4FF", | ||||
|           "keyAlias": "debugKey", | ||||
|           "keyPassword": "0000001B7EE522481B6BADA6544DD7E5E5D2A7A964971BFFF30CF41899AE5382A42143444D275F293D0744", | ||||
|           "profile": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_Ja3OiX9fkBwGKa0NNRbcXszAt35lPCdUakY4mTtjFwU=.p7b", | ||||
|           "keyPassword": "0000001B5154009358EC6DAB38F99A25239BD735D77777640200E7EF810C1330F87F76DAA287AAC62AED71", | ||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p7b", | ||||
|           "signAlg": "SHA256withECDSA", | ||||
|           "storeFile": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_Ja3OiX9fkBwGKa0NNRbcXszAt35lPCdUakY4mTtjFwU=.p12" | ||||
|           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p12" | ||||
|         } | ||||
|       } | ||||
|     ], | ||||
|  | ||||
| @ -22,7 +22,7 @@ | ||||
| // | ||||
| // import { JudgeConfig } from './judgeSDK/utils/judgeConfig'; | ||||
| // | ||||
| // import SignDisplayCom from './compontents/signDisplayCom'; | ||||
| // import SignDisplayCom from './compontents/SignDisplayCom'; | ||||
| // import { | ||||
| //     AmplifyItem, | ||||
| //     CarInfoType, | ||||
|  | ||||
| @ -18,7 +18,7 @@ export default struct DeductedPopup { | ||||
|   @State universalMarkRules: MarkRule[] = [] | ||||
|   @State manualMarkRules: MarkRule[] = [] | ||||
|   @State lineBg: Array<string> = ['#4D4136', '#26231E'] | ||||
|   @State selectedLine: number = undefined | ||||
|   @State selectedLine: number = -1 | ||||
|   @State endPopupVisible: boolean = false | ||||
|   @State selectedLineStyle: SEL = { | ||||
|     fontColor: '#FFF', | ||||
| @ -34,7 +34,7 @@ export default struct DeductedPopup { | ||||
|   } | ||||
| 
 | ||||
|   aboutToAppear() { | ||||
|     this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno.toString()) || | ||||
|     this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes((item.itemno||0).toString()) || | ||||
|     this.currentItems.includes(item.itemno + ''))); | ||||
|     this.currentIndex = this.defaultTabIndex | ||||
|     if (this.currentIndex == 1) { | ||||
| @ -45,7 +45,7 @@ export default struct DeductedPopup { | ||||
| 
 | ||||
|   changeCurrentItems() { | ||||
|     if (this.currentItems?.length && (this.currentItems?.length >= this.preCurrentItemsLength)) { | ||||
|       this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno.toString()) || | ||||
|       this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes((item.itemno||0).toString()) || | ||||
|       this.currentItems.includes(item.itemno + ''))); | ||||
|       this.currentIndex = this.defaultTabIndex | ||||
|       if (this.currentIndex == 1) { | ||||
| @ -120,7 +120,7 @@ export default struct DeductedPopup { | ||||
|                     this.universalMarkRules = this.markRules.filter(item => item.itemno == 20) | ||||
|                   } else { | ||||
|                     this.universalMarkRules = | ||||
|                       this.markRules.filter(item => (this.currentItems.includes(item.itemno.toString()) || | ||||
|                       this.markRules.filter(item => (this.currentItems.includes((item.itemno||0).toString()) || | ||||
|                       this.currentItems.includes(item.itemno + ''))) | ||||
|                   } | ||||
|                 }) | ||||
|  | ||||
| @ -6,8 +6,8 @@ export default struct  EndPopup { | ||||
|   } | ||||
| 
 | ||||
|   private title:string = '' | ||||
|   private cancelFn:(event?: ClickEvent) => void | ||||
|   private confirmFn:(event?: ClickEvent) => void | ||||
|   private cancelFn?:(event?: ClickEvent) => void | ||||
|   private confirmFn?:(event?: ClickEvent) => void | ||||
| 
 | ||||
|   build(){ | ||||
|     Column(){ | ||||
|  | ||||
| @ -83,7 +83,7 @@ type GetDqxmStr = (xmdm: number) => string | ||||
| type TJudgeBeginObj = JudgeBeginObj | ||||
| 
 | ||||
| export default class Judge { | ||||
|   public plcStr: string | ||||
|   public plcStr!: string | ||||
|   public judgeUI: JudgeUI | ||||
|   //获取科目三的评判初始化配置 | ||||
|   getKm3JudgeInitConfig: GetKm3JudgeInitConfig = async () => { | ||||
|  | ||||
| @ -10,18 +10,17 @@ interface StuInfo { | ||||
| 
 | ||||
| 
 | ||||
| export default class FileLog { | ||||
|   public folderPath: string | ||||
|   public progressDataFd: number = undefined | ||||
|   public examJudgeWuxiDataFd: number = undefined | ||||
|   public examJudgeWuxiProgressDataFd: number = undefined | ||||
|   public plcDataFd: number = undefined | ||||
|   public examJudgeDataFd: number = undefined | ||||
|   public examJudgeCallbackDataFd: number = undefined | ||||
|   public examJudgeLogDataFd: number = undefined | ||||
|   public fourAndOneLogDataFd: number = undefined | ||||
|   public fourAndOneLogDataBytesFd: number = undefined | ||||
|   public examLineDataFd: number = undefined | ||||
|   //后续文件路径待替换 | ||||
|   public folderPath?: string | ||||
|   public progressDataFd: number|undefined =undefined | ||||
|   public examJudgeWuxiDataFd: number|undefined = undefined | ||||
|   public examJudgeWuxiProgressDataFd: number|undefined = undefined | ||||
|   public plcDataFd: number|undefined = undefined | ||||
|   public examJudgeDataFd: number|undefined = undefined | ||||
|   public examJudgeCallbackDataFd: number|undefined = undefined | ||||
|   public examJudgeLogDataFd: number|undefined = undefined | ||||
|   public fourAndOneLogDataFd: number|undefined = undefined | ||||
|   public fourAndOneLogDataBytesFd: number|undefined = undefined | ||||
|   public examLineDataFd: number|undefined = undefined | ||||
|   private fileUtil: FileUtils | ||||
|   // 过程文件数据 | ||||
|   public setExamProgressData = async (str: Object) => { | ||||
|  | ||||
| @ -10,15 +10,15 @@ interface Options{ | ||||
| } | ||||
| 
 | ||||
| export default class FileModel { | ||||
|   public folderPath: string | ||||
|   public folderPath?: string | ||||
|   // 设置文件夹 | ||||
|   public initFolder = async () => { | ||||
|     await this.fileUtil.initFolder(`/models/model_enc`); | ||||
|     const folderPath = await this.fileUtil.initFolder(`/models`); | ||||
|     await this.fileUtil?.initFolder(`/models/model_enc`); | ||||
|     const folderPath = await this.fileUtil?.initFolder(`/models`); | ||||
|     this.folderPath = folderPath; | ||||
|   } | ||||
|   //后续文件路径待替换 | ||||
|   private fileUtil: FileUtils | ||||
|   private fileUtil?: FileUtils | ||||
| 
 | ||||
|   constructor(context:common.UIAbilityContext) { | ||||
|     (async () => { | ||||
| @ -30,7 +30,7 @@ export default class FileModel { | ||||
| 
 | ||||
|   // 存储zip文件并解压 | ||||
|   public storingFiles = async (str:string) => { | ||||
|     await this.fileUtil.editFile(`${this.folderPath}/model.zip`, str) | ||||
|     await this.fileUtil?.editFile(`${this.folderPath}/model.zip`, str) | ||||
| 
 | ||||
|     const folderPath = this.folderPath | ||||
|     let options:Options = { | ||||
| @ -53,13 +53,14 @@ export default class FileModel { | ||||
|   //获取文件内容 | ||||
|   public getModelContent = (folderPath:string, fileName:string) => { | ||||
|     try { | ||||
|       return this.fileUtil.getFileContent(`${folderPath}/${fileName}`); | ||||
|       return this.fileUtil?.getFileContent(`${folderPath}/${fileName}`); | ||||
|     } catch (e) { | ||||
|       console.info('surenjun', JSON.stringify(e)) | ||||
|       console.info('surenjun', JSON.stringify(e)); | ||||
|       promptAction.showToast({ | ||||
|         message: `请检查模型路径${folderPath}/${fileName}是否正确!`, | ||||
|         duration: 4000 | ||||
|       }) | ||||
|       }); | ||||
|       return null; // 添加返回值 | ||||
|     } | ||||
|   } | ||||
| } | ||||
| @ -101,8 +101,8 @@ export function getKmProjectVoice( | ||||
|   lane: JudgeLane, | ||||
|   xmxh: string | ||||
| ) { | ||||
|   const carInfo = AppStorage.get<CarInfoType>('carInfo'); | ||||
|   const examSubject = carInfo.examSubject; | ||||
|   const carInfo = AppStorage.get<CarInfoType>('carInfo')!; | ||||
|   const examSubject = carInfo.examSubject||"2"; | ||||
|   const param506Str: number[] = (Reflect.get(judgeConfig, '506')?.split(',')) || [] | ||||
|   const param512Str: number[] = (Reflect.get(judgeConfig, '512')?.split(',')) || [] | ||||
|   const param544Str: number[] = (Reflect.get(judgeConfig, '544')?.split(',')) || [] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user