From bb8bde9977d95d5054135c82b451977e9f9d34c2 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 19 Oct 2023 17:41:28 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=B7=B2=E5=A4=84=E7=90=86-UPF?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=B8=8D=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configManage/configParam.ts | 76 ++++++++++---------- src/views/configManage/configParam/index.vue | 68 +++++++++--------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/api/configManage/configParam.ts b/src/api/configManage/configParam.ts index c03f9df3..a3c529c3 100644 --- a/src/api/configManage/configParam.ts +++ b/src/api/configManage/configParam.ts @@ -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 = { diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue index 89baebe7..c3173f53 100644 --- a/src/views/configManage/configParam/index.vue +++ b/src/views/configManage/configParam/index.vue @@ -207,11 +207,11 @@ function listEditOk() { [from['name']]: from['value'], }; // UPF参数不统一 - if (neTypeSelect.value[0] === 'UPF') { - data = { - [parseFirstUpper(from['name'])]: from['value'], - }; - } + // if (neTypeSelect.value[0] === 'UPF') { + // data = { + // [parseFirstUpper(from['name'])]: from['value'], + // }; + // } updateParamConfigInfo( 'list', @@ -291,11 +291,11 @@ function arrayEditOk() { return; } // UPF参数不统一 - if (neType === 'UPF') { - data[parseFirstUpper(key)] = from[key]['value']; - } else { - data[key] = from[key]['value']; - } + // if (neType === 'UPF') { + // data[parseFirstUpper(key)] = from[key]['value']; + // } else { + // data[key] = from[key]['value']; + // } data[key] = from[key]['value']; } @@ -487,12 +487,12 @@ function arrayAddOk() { return; } // UPF参数不统一 - if (neType === 'UPF') { - data[parseFirstUpper(key)] = from[key]['value']; - } else { - data[key] = from[key]['value']; - } - // data[key] = from[key]['value']; + // if (neType === 'UPF') { + // data[parseFirstUpper(key)] = from[key]['value']; + // } else { + // data[key] = from[key]['value']; + // } + data[key] = from[key]['value']; } // 发送 @@ -593,12 +593,12 @@ function arrayChildExpand(key: Record, row: Record) { // 设置展开key tableState.arrayChildExpandKeys = [key]; // UPF参数不统一 - if (neTypeSelect.value[0] === 'UPF') { - tableState.arrayChildLoc = `${loc}/${parseFirstUpper(from['name'])}`; - } else { - tableState.arrayChildLoc = `${loc}/${from['name']}`; - } - // tableState.arrayChildLoc = `${loc}/${from['name']}`; + // if (neTypeSelect.value[0] === 'UPF') { + // tableState.arrayChildLoc = `${loc}/${parseFirstUpper(from['name'])}`; + // } else { + // tableState.arrayChildLoc = `${loc}/${from['name']}`; + // } + tableState.arrayChildLoc = `${loc}/${from['name']}`; tableState.arrayChildNewIndex = -1; // 设置展开列表标题 tableState.arrayChildTitle = `${from['display']}`; @@ -643,12 +643,12 @@ function arrayChildEditOk() { return; } // UPF参数不统一 - if (neType === 'UPF') { - data[parseFirstUpper(key)] = from[key]['value']; - } else { - data[key] = from[key]['value']; - } - // data[key] = from[key]['value']; + // if (neType === 'UPF') { + // data[parseFirstUpper(key)] = from[key]['value']; + // } else { + // data[key] = from[key]['value']; + // } + data[key] = from[key]['value']; } // 发送 @@ -832,12 +832,12 @@ function arrayChildAddOk() { return; } // UPF参数不统一 - if (neType === 'UPF') { - data[parseFirstUpper(key)] = from[key]['value']; - } else { - data[key] = from[key]['value']; - } - // data[key] = from[key]['value']; + // if (neType === 'UPF') { + // data[parseFirstUpper(key)] = from[key]['value']; + // } else { + // data[key] = from[key]['value']; + // } + data[key] = from[key]['value']; } // 发送