错误修改
This commit is contained in:
		
							parent
							
								
									b98b0ff8c8
								
							
						
					
					
						commit
						50c9093256
					
				| @ -60,10 +60,13 @@ export async function writeObjectOut(params: RegulatoryInterfaceParams, filePath | ||||
|   params.drvexam = params.drvexam ?? {}; | ||||
|   params.drvexam.zp = params.drvexam.zp === undefined ? undefined : encodeURIComponent(params.drvexam.zp); | ||||
| 
 | ||||
|   const drvexamArrs = Reflect.ownKeys(params.drvexam) | ||||
|     .filter(dKey => Reflect.get(params.drvexam, dKey) != undefined) | ||||
|     .map((key: string) => ( | ||||
|       `<${key}>${Reflect.get(params.drvexam, key)}</${key}>`)); | ||||
|   const drvexamArrs = Object.entries(params.drvexam) | ||||
|     .filter((item: [string, string]) => item[1] != undefined) | ||||
|     .map((item: [string, object]) => `<${item[0]}>${item[1]}</${item[0]}>`) | ||||
|   // const drvexamArrs = Reflect.ownKeys(params.drvexam) | ||||
|   //   .filter(dKey => Reflect.get(params.drvexam, dKey) != undefined) | ||||
|   //   .map((key: string) => ( | ||||
|   //     `<${key}>${Reflect.get(params.drvexam, key)}</${key}>`)); | ||||
| 
 | ||||
|   if (filePath) { | ||||
|     const fileUtil = new FileUtils(context); | ||||
| @ -237,27 +240,27 @@ export async function uploadExamMileage(params: UploadExamMileage) { | ||||
| } | ||||
| 
 | ||||
| // 上传考试成绩 | ||||
| export async function uploadExamGrade(params: ESObject) { | ||||
|   // const singlePlay = globalThis.singlePlay | ||||
|   const singlePlay: boolean = AppStorage.get<boolean>('singlePlay') || false | ||||
|   if (singlePlay) { | ||||
|     return | ||||
|   } | ||||
|   const paramsArrs = Reflect.ownKeys(params).map((key: string) => (`<${key}>${params[key]}</${key}>`)) | ||||
|   const time = GetCurrentTime() | ||||
|   return request<object>({ | ||||
|     url: '/der2/services/exam/uploadExamGrade.ws', | ||||
|     data: `<?xml version="1.0" encoding="UTF-8"?> | ||||
|                 <uploadExamGradeReq> | ||||
|                     <head><time>${time}</time></head> | ||||
|                     <body> | ||||
|                       ${paramsArrs} | ||||
|                     </body> | ||||
|                 </uploadExamGradeReq>`, | ||||
|     method: http.RequestMethod.POST, | ||||
|     xml: true | ||||
|   }) | ||||
| } | ||||
| // export async function uploadExamGrade(params: ESObject) { | ||||
| //   // const singlePlay = globalThis.singlePlay | ||||
| //   const singlePlay: boolean = AppStorage.get<boolean>('singlePlay') || false | ||||
| //   if (singlePlay) { | ||||
| //     return | ||||
| //   } | ||||
| //   const paramsArrs = Reflect.ownKeys(params).map((key) => (`<${key}>${params[key]}</${key}>`)) | ||||
| //   const time = GetCurrentTime() | ||||
| //   return request<object>({ | ||||
| //     url: '/der2/services/exam/uploadExamGrade.ws', | ||||
| //     data: `<?xml version="1.0" encoding="UTF-8"?> | ||||
| //                 <uploadExamGradeReq> | ||||
| //                     <head><time>${time}</time></head> | ||||
| //                     <body> | ||||
| //                       ${paramsArrs} | ||||
| //                     </body> | ||||
| //                 </uploadExamGradeReq>`, | ||||
| //     method: http.RequestMethod.POST, | ||||
| //     xml: true | ||||
| //   }) | ||||
| // } | ||||
| 
 | ||||
| function validateIP(path: string) { | ||||
|   const reg = new RegExp(`(\w+):\/\/([^/:]+)(:\d*)?`) | ||||
|  | ||||
| @ -101,6 +101,7 @@ struct Index { | ||||
|               gateway: this.inputTextList1[5], //value.gateway网关 | ||||
|               netMask: this.inputTextList1[4], //value.netMask网络掩码 | ||||
|               dnsServers: this.inputTextList1[6], | ||||
|               domain: "" | ||||
|             }, (error: BusinessError) => { | ||||
|               if (error) { | ||||
|                 Prompt.showToast({ | ||||
|  | ||||
| @ -187,7 +187,7 @@ class DbUtils { | ||||
|   } | ||||
| 
 | ||||
|   // | ||||
|   parseResultSet<T>(result: relationalStore.ResultSet, columns: ColumnInfo[]): T[] { | ||||
|   parseResultSet<T extends Object>(result: relationalStore.ResultSet, columns: ColumnInfo[]): T[] { | ||||
|     // 1.声明最终返回的结果 | ||||
|     let arr: T[] = []; | ||||
|     // 2.判断是否有结果 | ||||
| @ -199,7 +199,7 @@ class DbUtils { | ||||
|       // 3.1.去下一行 | ||||
|       result.goToNextRow(); | ||||
|       // 3.2.解析这行数据,转为对象 | ||||
|       let obj: Record<string, string | number> = {}; | ||||
|       let obj: object = new Object(); | ||||
|       columns.forEach(info => { | ||||
|         let val: string | number; | ||||
|         switch (info.type) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user