style: 已处理-UPF参数不统一
This commit is contained in:
@@ -136,44 +136,44 @@ export async function getParamConfigInfo(
|
||||
});
|
||||
|
||||
// UPF参数不统一
|
||||
if (neType === 'UPF') {
|
||||
if (Reflect.has(wrRule, 'list')) {
|
||||
for (const arr of wrRule['list']) {
|
||||
arr['name'] = parseFirstLower(arr['name']);
|
||||
}
|
||||
for (const item of dataArr) {
|
||||
for (const k in item) {
|
||||
item[parseFirstLower(k)] = item[k];
|
||||
Reflect.deleteProperty(item, k);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Reflect.has(wrRule, 'array')) {
|
||||
for (const arr of wrRule['array']) {
|
||||
if (Array.isArray(arr['array'])) {
|
||||
for (const child of arr['array']) {
|
||||
child['name'] = parseFirstLower(child['name']);
|
||||
}
|
||||
}
|
||||
arr['name'] = parseFirstLower(arr['name']);
|
||||
}
|
||||
for (const item of dataArr) {
|
||||
for (const k in item) {
|
||||
// 处理子列表
|
||||
if (Array.isArray(item[k])) {
|
||||
for (const child of item[k]) {
|
||||
for (const childKey in child) {
|
||||
child[parseFirstLower(childKey)] = child[childKey];
|
||||
Reflect.deleteProperty(child, childKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
item[parseFirstLower(k)] = item[k];
|
||||
Reflect.deleteProperty(item, k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (neType === 'UPF') {
|
||||
// if (Reflect.has(wrRule, 'list')) {
|
||||
// for (const arr of wrRule['list']) {
|
||||
// arr['name'] = parseFirstLower(arr['name']);
|
||||
// }
|
||||
// for (const item of dataArr) {
|
||||
// for (const k in item) {
|
||||
// item[parseFirstLower(k)] = item[k];
|
||||
// Reflect.deleteProperty(item, k);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (Reflect.has(wrRule, 'array')) {
|
||||
// for (const arr of wrRule['array']) {
|
||||
// if (Array.isArray(arr['array'])) {
|
||||
// for (const child of arr['array']) {
|
||||
// child['name'] = parseFirstLower(child['name']);
|
||||
// }
|
||||
// }
|
||||
// arr['name'] = parseFirstLower(arr['name']);
|
||||
// }
|
||||
// for (const item of dataArr) {
|
||||
// for (const k in item) {
|
||||
// // 处理子列表
|
||||
// if (Array.isArray(item[k])) {
|
||||
// for (const child of item[k]) {
|
||||
// for (const childKey in child) {
|
||||
// child[parseFirstLower(childKey)] = child[childKey];
|
||||
// Reflect.deleteProperty(child, childKey);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// item[parseFirstLower(k)] = item[k];
|
||||
// Reflect.deleteProperty(item, k);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 拼装数据
|
||||
const result = {
|
||||
|
||||
Reference in New Issue
Block a user