优化
This commit is contained in:
		
							parent
							
								
									56f6a671eb
								
							
						
					
					
						commit
						cd245ac226
					
				| @ -99,6 +99,7 @@ function isSevenDaysAgo(date,saveDays?) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function setVideoParam() { | export async function setVideoParam() { | ||||||
|  |   return | ||||||
|   const fileUtil = new FileUtil(context) |   const fileUtil = new FileUtil(context) | ||||||
|   console.log('configconfig',) |   console.log('configconfig',) | ||||||
|   try{ |   try{ | ||||||
|  | |||||||
| @ -9,8 +9,6 @@ import FileUtil from '../../common/utils/File' | |||||||
| 
 | 
 | ||||||
| //获取设备信息
 | //获取设备信息
 | ||||||
| export async function getDeviceInfo(context) { | export async function getDeviceInfo(context) { | ||||||
|   globalThis.deviceNo = 'MAC-53EB31E0' |  | ||||||
|   return 'MAC-53EB31E0' |  | ||||||
|   return new Promise(async (resolve, reject) => { |   return new Promise(async (resolve, reject) => { | ||||||
|     const fileUtil = new FileUtil(context) |     const fileUtil = new FileUtil(context) | ||||||
|     const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/deviceNo.txt'); |     const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/deviceNo.txt'); | ||||||
|  | |||||||
| @ -32,6 +32,10 @@ export const GlobalConfig={ | |||||||
|     ly:{ |     ly:{ | ||||||
|       km2:['2022.06.29.01','2022.12.18.1'], |       km2:['2022.06.29.01','2022.12.18.1'], | ||||||
|       km3:['2022.08.13.01','2022.12.05.1'], |       km3:['2022.08.13.01','2022.12.05.1'], | ||||||
|     } |     }, | ||||||
|  |     sz:{ | ||||||
|  |       km2:['2024.08.21.01','2024.08.24.1'], | ||||||
|  |       km3:[], | ||||||
|  |     }, | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -30,8 +30,8 @@ export default class EntryAbility extends UIAbility { | |||||||
|         globalThis.deviceNo = ''; |         globalThis.deviceNo = ''; | ||||||
|         globalThis.hasAuth = false |         globalThis.hasAuth = false | ||||||
| 
 | 
 | ||||||
|         globalThis.version = GlobalConfig.version.jn.km3[0]; |         globalThis.version = GlobalConfig.version.sz.km2[0]; | ||||||
|         globalThis.judgeVersion =  GlobalConfig.version.jn.km3[1]; |         globalThis.judgeVersion =  GlobalConfig.version.sz.km2[1]; | ||||||
| 
 | 
 | ||||||
|         globalThis.videoVersion= '1.0' |         globalThis.videoVersion= '1.0' | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -114,6 +114,9 @@ export default struct Index { | |||||||
|                       }, router.RouterMode.Single); |                       }, router.RouterMode.Single); | ||||||
| 
 | 
 | ||||||
|                       console.log('res11', JSON.stringify(res)) |                       console.log('res11', JSON.stringify(res)) | ||||||
|  |                       globalThis.ksyxm=res.examinerLoginRsp.body.ksyxm | ||||||
|  |                       globalThis.kgxm=res.examinerLoginRsp.body.name | ||||||
|  | 
 | ||||||
|                       globalThis.username = this.inputTextArr[0] |                       globalThis.username = this.inputTextArr[0] | ||||||
|                     }).catch(err=>{ |                     }).catch(err=>{ | ||||||
|                       console.log('jiangsong12',JSON.stringify(err)) |                       console.log('jiangsong12',JSON.stringify(err)) | ||||||
|  | |||||||
| @ -419,7 +419,7 @@ struct Index { | |||||||
|       this.context.resourceManager.getRawFileContent("welcome.wav").then(value => { |       this.context.resourceManager.getRawFileContent("welcome.wav").then(value => { | ||||||
|         this.vocObj.playAudio({ |         this.vocObj.playAudio({ | ||||||
|           type: 1, |           type: 1, | ||||||
|           name: '111.mp3' |           name: 'welcome.wav' | ||||||
|         }) |         }) | ||||||
|         // let rawFile = value; |         // let rawFile = value; | ||||||
|       }).catch(error => { |       }).catch(error => { | ||||||
|  | |||||||
| @ -180,6 +180,8 @@ struct UserInfo { | |||||||
|           if (this.dataList.length) { |           if (this.dataList.length) { | ||||||
|             setTimeout(()=>{ |             setTimeout(()=>{ | ||||||
|               this.currentUser = this.dataList[0] |               this.currentUser = this.dataList[0] | ||||||
|  |               this.currentUser.ksy2= globalThis.ksyxm | ||||||
|  | 
 | ||||||
|               globalThis.lsh=this.currentUser.lsh |               globalThis.lsh=this.currentUser.lsh | ||||||
|             },200) |             },200) | ||||||
|           } else { |           } else { | ||||||
| @ -251,6 +253,8 @@ struct UserInfo { | |||||||
|       if (res.sfzmhm == id) { |       if (res.sfzmhm == id) { | ||||||
|         flag = true |         flag = true | ||||||
|         this.currentUser = res |         this.currentUser = res | ||||||
|  |         this.currentUser.ksy2= globalThis.ksyxm | ||||||
|  | 
 | ||||||
|         this.lsh = this.currentUser.lsh |         this.lsh = this.currentUser.lsh | ||||||
|         globalThis.lsh = this.currentUser.lsh |         globalThis.lsh = this.currentUser.lsh | ||||||
|         globalThis.ksyh = this.currentUser.ksy1sfzmhm |         globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||||
| @ -280,6 +284,8 @@ struct UserInfo { | |||||||
|       await upDateTableByArray('USER', []) |       await upDateTableByArray('USER', []) | ||||||
|       setTimeout(()=>{ |       setTimeout(()=>{ | ||||||
|         this.currentUser = this.list[0] |         this.currentUser = this.list[0] | ||||||
|  |         this.currentUser.ksy2= globalThis.ksyxm | ||||||
|  | 
 | ||||||
|         globalThis.lsh = this.currentUser.lsh |         globalThis.lsh = this.currentUser.lsh | ||||||
|       },200) |       },200) | ||||||
| 
 | 
 | ||||||
| @ -364,6 +370,8 @@ struct UserInfo { | |||||||
|       this.pageIndex = 0 |       this.pageIndex = 0 | ||||||
|       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.currentUser = this.dataList[0] |       this.currentUser = this.dataList[0] | ||||||
|  |       this.currentUser.ksy2= globalThis.ksyxm | ||||||
|  | 
 | ||||||
|       this.lsh = this.currentUser.lsh |       this.lsh = this.currentUser.lsh | ||||||
|       globalThis.ksyh = this.currentUser.ksy1sfzmhm |       globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||||
|       globalThis.lsh = this.lsh |       globalThis.lsh = this.lsh | ||||||
| @ -608,6 +616,7 @@ struct UserInfo { | |||||||
|         if (this.dataList.length) { |         if (this.dataList.length) { | ||||||
|           setTimeout(()=>{ |           setTimeout(()=>{ | ||||||
|             this.currentUser = this.dataList[0] |             this.currentUser = this.dataList[0] | ||||||
|  |             this.currentUser.ksy2= globalThis.ksyxm | ||||||
|             globalThis.lsh=this.currentUser.lsh |             globalThis.lsh=this.currentUser.lsh | ||||||
|           },200) |           },200) | ||||||
|           // this.currentUser = this.dataList[0] |           // this.currentUser = this.dataList[0] | ||||||
| @ -1013,6 +1022,8 @@ struct UserInfo { | |||||||
|               globalThis.lsh = item.lsh; |               globalThis.lsh = item.lsh; | ||||||
|               setTimeout(()=>{ |               setTimeout(()=>{ | ||||||
|                 this.currentUser = item |                 this.currentUser = item | ||||||
|  |                 this.currentUser.ksy2= globalThis.ksyxm | ||||||
|  | 
 | ||||||
|               },200) |               },200) | ||||||
| 
 | 
 | ||||||
|             }) |             }) | ||||||
|  | |||||||
| @ -411,11 +411,13 @@ export default struct SignDisplayCom { | |||||||
|     for (let i = 34; i <= 46; i++) { |     for (let i = 34; i <= 46; i++) { | ||||||
|       this.sjxhColum[i].value = this.signArr[i+2] |       this.sjxhColum[i].value = this.signArr[i+2] | ||||||
|     } |     } | ||||||
|     let t = 0 |     // let t = 0 | ||||||
|     for (let i = 83; i <= 97; i++) { |     // for (let i = 83; i <= 97; i++) { | ||||||
|       this.GPSColum[t].value = ((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString() |     //   if(t==14){ | ||||||
|       t++ |     //   } | ||||||
|     } |     //   t++ | ||||||
|  |     // } | ||||||
|  |     this.GPSColum[14].value = ((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString() | ||||||
|     this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum))) |     this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum))) | ||||||
|     that.signArr = JSON.parse(JSON.stringify((this.signArr))) |     that.signArr = JSON.parse(JSON.stringify((this.signArr))) | ||||||
|     that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum))) |     that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum))) | ||||||
|  | |||||||
| @ -78,17 +78,7 @@ export default class FileLog { | |||||||
|   // 过程评判日志调数据
 |   // 过程评判日志调数据
 | ||||||
|   public setExamJudgeLogData = async (str:string) => { |   public setExamJudgeLogData = async (str:string) => { | ||||||
|     const {fileUtil,folderPath} = this; |     const {fileUtil,folderPath} = this; | ||||||
|     await fileUtil.editFile(`${folderPath}/judge_log_data.txt`,str); |     await fileUtil.editFile(`${folderPath}/judge_log_data.txt`, str); | ||||||
| 
 |  | ||||||
|   // 设置四合一画面数据
 |  | ||||||
|   public setFourAndOneLogData = async (str:string) => { |  | ||||||
|     const {fileUtil,folderPath} = this; |  | ||||||
|     await fileUtil.editFile(`${folderPath}/four_one_log_data.txt`,str); |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   public setFourAndOneLogDataBytes = async (str:string) => { |  | ||||||
|     const {fileUtil,folderPath} = this; |  | ||||||
|     await fileUtil.editFile(`${folderPath}/four_one_log_byte_data.txt`,str); |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // 设置四合一画面数据
 |   // 设置四合一画面数据
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user