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