From 29eb1f08b16564b4004fa9efa100bc1abf9fa3c8 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Fri, 10 May 2024 14:54:36 +0800 Subject: [PATCH] =?UTF-8?q?del:=20=E7=A7=BB=E9=99=A4=E6=97=A7=E7=9A=84?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/configManage/configParam.ts | 163 +- src/views/configManage/configParam/index.vue | 1669 ---------------- .../configManage/configParamForm/index.vue | 1718 ---------------- .../configManage/configParamTree/index.vue | 1761 ----------------- 4 files changed, 5 insertions(+), 5306 deletions(-) delete mode 100644 src/views/configManage/configParam/index.vue delete mode 100644 src/views/configManage/configParamForm/index.vue delete mode 100644 src/views/configManage/configParamTree/index.vue diff --git a/src/api/configManage/configParam.ts b/src/api/configManage/configParam.ts index f9adfc79..29dd00cd 100644 --- a/src/api/configManage/configParam.ts +++ b/src/api/configManage/configParam.ts @@ -108,159 +108,6 @@ async function getParamConfigInfo( }); } -/** - * 查询配置参数标签栏对应信息-表格处理 - * @param neType 网元类型 - * @param topTag - * @param neId - * @returns object - */ -export async function getParamConfigInfoTable( - neType: string, - topTag: string, - neId: string -) { - const { wrRule, dataArr } = await getParamConfigInfo(neType, topTag, neId); - - // 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); - // } - // } - // } - // } - - // 拼装数据 - const result = { - code: RESULT_CODE_SUCCESS, - msg: RESULT_MSG_SUCCESS, - data: { - type: 'list' as 'list' | 'array', - data: [] as any[], - dataRule: {}, - columns: [] as any[], - }, - }; - - // kv单列表 - if (Reflect.has(wrRule, 'list')) { - result.data.type = 'list'; - const ruleArr = Object.freeze(wrRule['list']); - - // 列表项数据 - let dataList = []; - for (const item of dataArr) { - for (const key of Object.keys(item)) { - // 规则为准 - for (const rule of ruleArr) { - if (rule['name'] === key) { - const ruleItem = Object.assign({ optional: 'true' }, rule, { - value: item[key], - }); - dataList.push(ruleItem); - break; - } - } - } - } - result.data.data = dataList; - - // 列表字段 - result.data.columns = [ - { - title: 'Key', - dataIndex: 'display', - align: 'left', - width: '30%', - }, - { - title: 'Value', - dataIndex: 'value', - align: 'left', - width: '70%', - }, - ]; - } - - // 多列表 - if (Reflect.has(wrRule, 'array')) { - result.data.type = 'array'; - const ruleArr = Object.freeze(wrRule['array']); - - // 列表项数据 - const dataArray = []; - for (const item of dataArr) { - let record: Record = {}; - for (const key of Object.keys(item)) { - // 规则为准 - for (const rule of ruleArr) { - if (rule['name'] === key) { - const ruleItem = Object.assign({ optional: 'true' }, rule, { - value: item[key], - }); - record[ruleItem.name] = ruleItem; - break; - } - } - } - dataArray.push(record); - } - result.data.data = dataArray; - - // 无数据时,用于新增 - let dataRule: Record = {}; - for (const rule of ruleArr) { - dataRule[rule.name] = rule; - } - result.data.dataRule = dataRule; - - // 列表字段 - const columns: Record[] = []; - for (const rule of ruleArr) { - columns.push({ - title: rule.display, - dataIndex: rule.name, - align: 'left', - width: 5, - }); - } - result.data.columns = columns; - } - return result; -} - /** * 查询配置参数标签栏对应信息-表单结构处理 * @param neType 网元类型 @@ -530,7 +377,7 @@ export async function getPCCRule(neId: any) { ) { let itemData = itemV.data.data; itemData.forEach((item: any) => { - pccJson.set(item.ruleId,{ value: item.ruleId, label: item.ruleId }); + pccJson.set(item.ruleId, { value: item.ruleId, label: item.ruleId }); }); } } @@ -544,7 +391,7 @@ export async function getPCCRule(neId: any) { ) { let itemData = itemV.data.data; itemData.forEach((item: any) => { - sessJson.set(item.ruleId,{ value: item.ruleId, label: item.ruleId }); + sessJson.set(item.ruleId, { value: item.ruleId, label: item.ruleId }); }); } } @@ -558,7 +405,7 @@ export async function getPCCRule(neId: any) { ) { let itemData = itemV.data.data; itemData.forEach((item: any) => { - qosJson.set(item.qosId,{ value: item.qosId, label: item.qosId }); + qosJson.set(item.qosId, { value: item.qosId, label: item.qosId }); }); } } @@ -572,7 +419,7 @@ export async function getPCCRule(neId: any) { ) { let itemData = itemV.data.data; itemData.forEach((item: any) => { - headerJson.set(item.templateName,{ + headerJson.set(item.templateName, { value: item.templateName, label: item.templateName, }); @@ -589,7 +436,7 @@ export async function getPCCRule(neId: any) { ) { let itemData = itemV.data.data; itemData.forEach((item: any) => { - sarJson.set(item.name,{ value: item.name, label: item.name }); + sarJson.set(item.name, { value: item.name, label: item.name }); }); } } diff --git a/src/views/configManage/configParam/index.vue b/src/views/configManage/configParam/index.vue deleted file mode 100644 index e2cd84fe..00000000 --- a/src/views/configManage/configParam/index.vue +++ /dev/null @@ -1,1669 +0,0 @@ - - - - - diff --git a/src/views/configManage/configParamForm/index.vue b/src/views/configManage/configParamForm/index.vue deleted file mode 100644 index 906861fd..00000000 --- a/src/views/configManage/configParamForm/index.vue +++ /dev/null @@ -1,1718 +0,0 @@ - - - - - diff --git a/src/views/configManage/configParamTree/index.vue b/src/views/configManage/configParamTree/index.vue deleted file mode 100644 index 0e53578f..00000000 --- a/src/views/configManage/configParamTree/index.vue +++ /dev/null @@ -1,1761 +0,0 @@ - - - - -