From 1d26a8b21eb19e35790e0a0ea92f9b7f486083fe Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Mon, 24 Jan 2022 14:31:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20IP=E8=AF=A6=E6=83=85=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=E6=A6=82=E5=86=B5=E6=95=B0=E6=8D=AE=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts/PanelChart.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/views/charts/PanelChart.vue b/src/views/charts/PanelChart.vue index bbe9dc38..36fd2961 100644 --- a/src/views/charts/PanelChart.vue +++ b/src/views/charts/PanelChart.vue @@ -182,6 +182,17 @@ export default { ...this.entity, ...extraParams } + if (this.isSingleValue) { + if (chartParams && chartParams.dataKey) { + console.log(chartParams.dataKey) + get('/interface/entity/detail/ip/serviceOverview', this.queryParams).then(response =>{ + if (response.data.result && (response.data.result[chartParams.dataKey] || response.data.result[chartParams.dataKey] === 0)) { + this.chartData = response.data.result[chartParams.dataKey] + this.loading = false + } + }) + } + } const requestUrl = url || (chartParams && chartParams.url) if (requestUrl) { get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {