From 0fa7aeebe6b0a59b0a58ee909baba53e73fde832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Tue, 21 Nov 2023 18:09:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E8=AF=A6=E6=83=85tab=E5=9B=A0=E5=89=8D=E9=9D=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=8A=A5=E9=94=99=E5=AF=BC=E8=87=B4=E5=90=8E=E9=9D=A2?= =?UTF-8?q?tab=E7=9A=84=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA=E4=B8=BA0?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../charts/entityDetail/EntityDetailTabs.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue b/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue index fc3bfaa1..7d5a21d4 100644 --- a/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue +++ b/src/views/charts2/charts/entityDetail/EntityDetailTabs.vue @@ -113,11 +113,13 @@ export default { const informationAggregation = axios.get(`${api.entity.informationAggregation}/${this.entity.entityType}?resource=${this.entity.entityName}&pageSize=100&pageNo=1`, { params: this.getParamsByTabType(entityDetailTabsName.informationAggregation) }) const openPort = axios.get(url, { params: this.getParamsByTabType(entityDetailTabsName.openPort) }) const security = axios.get(`${api.entity.security}/${this.entity.entityType}`, { params: this.getParamsByTabType(entityDetailTabsName.securityEvent) }) - const performance = axios.get(`${api.entity.performance}/${this.entityType}`, { params: this.getParamsByTabType(entityDetailTabsName.performanceEvent) }) + // const performance = axios.get(`${api.entity.performance}/${this.entityType}`, { params: this.getParamsByTabType(entityDetailTabsName.performanceEvent) }) - Promise.allSettled([informationAggregation, openPort, security, performance]).then(response => { + // todo 暂时隐藏performance的请求,后续接口开发完毕后再解开注释 + // Promise.allSettled([informationAggregation, openPort, security, performance]).then(response => { + Promise.allSettled([informationAggregation, openPort, security]).then(response => { const informationAggregationResponse = response[0].value - if (informationAggregationResponse.status === 200) { + if (informationAggregationResponse && informationAggregationResponse.status === 200) { const list = [] informationAggregationResponse.data.data.result.forEach(r => { Object.keys(r).forEach(k => { @@ -145,15 +147,15 @@ export default { this.initSetTag(entityDetailTabsName.informationAggregation, list.length) } const openPortResponse = response[1].value - if (openPortResponse.status === 200) { + if (openPortResponse && openPortResponse.status === 200) { this.initSetTag(entityDetailTabsName.openPort, openPortResponse.data.data.result.length) } const securityResponse = response[2].value - if (securityResponse.status === 200) { + if (securityResponse && securityResponse.status === 200) { this.initSetTag(entityDetailTabsName.securityEvent, securityResponse.data.data.result.length) } // let performanceResponse = response[3].value - // if (performanceResponse.status === 200) { + // if (performanceResponse && performanceResponse.status === 200) { // this.initSetTag(entityDetailTabsName.performanceEvent, performanceResponse.data.data.result.length) // } this.initSetTag(entityDetailTabsName.performanceEvent, 0)