From 2e7720e19f298e6631d4e3006250786aa73dc0b7 Mon Sep 17 00:00:00 2001 From: hanyuxia Date: Fri, 30 Sep 2022 09:32:36 +0800 Subject: [PATCH] =?UTF-8?q?CN-710=20=E4=B8=8B=E9=92=BBtable=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8C=96:=E5=A4=9A=E6=AC=A1=E4=B8=8B=E9=92=BB?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E6=A0=87=E7=AD=BE=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../networkOverview/NetworkOverviewTabs.vue | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/views/charts2/charts/networkOverview/NetworkOverviewTabs.vue b/src/views/charts2/charts/networkOverview/NetworkOverviewTabs.vue index 2b7b77a0..03c5adf6 100644 --- a/src/views/charts2/charts/networkOverview/NetworkOverviewTabs.vue +++ b/src/views/charts2/charts/networkOverview/NetworkOverviewTabs.vue @@ -857,7 +857,6 @@ export default { this.list = metricTab ? metricTab.tabs : [] this.networkTabList = metricTab ? metricTab.tabs : [] this.combineTabList(this.list) - // this.allList = this.$_.cloneDeep(this.list)//备份所有配置,下钻及返回时使用 const curTabData = this.list.find(item => item.label === label) this.combineColumnList(curTabData.label) } @@ -1439,29 +1438,33 @@ export default { tabList.forEach(tab => { const drilldownTabFull = [] tab.drilldownTabs.forEach(drilldownTab => { - const drilldownTabName = drilldownTab ? (drilldownTab.name ? drilldownTab.name : drilldownTab) : '' - const fullTab = oldList.find(item => item.name === drilldownTabName) - if (fullTab) { - const commonTab = this.commonTabList.find(item => item.name === drilldownTabName) - fullTab.label = commonTab ? commonTab.i18n : '' - fullTab.prop = commonTab ? commonTab.prop : '' - if (!fullTab.hasOwnProperty('panelId') || fullTab.panelId === undefined || tab.panelId === null) { - fullTab.panelId = tab ? tab.panelIdOfFourthMenu : '' + if (!drilldownTab.hasOwnProperty('name') || drilldownTab.name === undefined || drilldownTab.name === null) { + const drilldownTabName = drilldownTab || '' + const fullTab = oldList.find(item => item.name === drilldownTabName) + if (fullTab) { + const commonTab = this.commonTabList.find(item => item.name === drilldownTabName) + fullTab.label = commonTab ? commonTab.i18n : '' + fullTab.prop = commonTab ? commonTab.prop : '' + if (!fullTab.hasOwnProperty('panelId') || fullTab.panelId === undefined || tab.panelId === null) { + fullTab.panelId = tab ? tab.panelIdOfFourthMenu : '' + } + if (!fullTab.hasOwnProperty('checked') || fullTab.checked === undefined || tab.checked === null) { + fullTab.checked = !((tab.hiddenDrilldownTabs.indexOf(drilldownTabName) >= 0)) + } + if (!fullTab.hasOwnProperty('disabled') || fullTab.disabled === undefined || tab.disabled === null) { + fullTab.disabled = (tab.disabledDrilldownTabs.indexOf(drilldownTabName) >= 0) + } + // 代码里写死的 + const tabInCode = listInCode ? listInCode.find(item => item.label === fullTab.label) : {} + fullTab.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null + fullTab.dillDownProp = tabInCode ? tabInCode.dillDownProp : [] + drilldownTabFull.push(fullTab) } - if (!fullTab.hasOwnProperty('checked') || fullTab.checked === undefined || tab.checked === null) { - fullTab.checked = !((tab.hiddenDrilldownTabs.indexOf(drilldownTabName) >= 0)) - } - if (!fullTab.hasOwnProperty('disabled') || fullTab.disabled === undefined || tab.disabled === null) { - fullTab.disabled = (tab.disabledDrilldownTabs.indexOf(drilldownTabName) >= 0) - } - // 代码里写死的 - const tabInCode = listInCode ? listInCode.find(item => item.label === fullTab.label) : {} - fullTab.queryCycleTotalProp = tabInCode ? tabInCode.queryCycleTotalProp : null - fullTab.dillDownProp = tabInCode ? tabInCode.dillDownProp : [] - drilldownTabFull.push(fullTab) } }) - tab.drilldownTabs = drilldownTabFull + if (drilldownTabFull.length > 0) { + tab.drilldownTabs = drilldownTabFull + } }) } },