From 6ea84d3d98a757d56fef2f5d1d5350598d6a90c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Mon, 26 Dec 2022 16:32:25 +0800 Subject: [PATCH] =?UTF-8?q?CN-830:=20=E4=BF=AE=E5=A4=8Dnpm-ip=E4=B8=8B?= =?UTF-8?q?=E9=92=BB=EF=BC=8Cas=20a=20server=E4=B8=8B=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=82=B9=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/charts/npm/NpmIpMap.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/charts2/charts/npm/NpmIpMap.vue b/src/views/charts2/charts/npm/NpmIpMap.vue index a7ccbec3..13b803e6 100644 --- a/src/views/charts2/charts/npm/NpmIpMap.vue +++ b/src/views/charts2/charts/npm/NpmIpMap.vue @@ -50,7 +50,7 @@ export default { mixins: [chartMixin], watch: { timeFilter: { - handler (n) { + handler () { this.loadAm4ChartMap(this.polygonSeries, this.worldImageSeries) } } @@ -100,6 +100,7 @@ export default { if (params.type === 'serverIp' || params.type === 'clientIp') params.type = 'ip' getData(api.npm.overview.map, params).then(res => { this.showError = false + console.log('打印数据', res) if (res && res.length > 0) { const subParams = { ...params, @@ -140,6 +141,9 @@ export default { }) this.loadMarkerData(imageSeries, mapData) }) + } else { + // 没数据,清空图表 + imageSeries.data = [{}] } }).catch(e => { this.showError = true