From 3cf98e8db4cba0435fdefdba7645271f717a90d6 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, 25 Sep 2023 14:53:18 +0800 Subject: [PATCH] =?UTF-8?q?CN-1317=20fix:=20=E5=9B=A0=E5=9B=BD=E5=AE=B6?= =?UTF-8?q?=E7=AE=80=E7=A7=B0=E5=B0=8F=E5=86=99=E4=B8=8D=E8=83=BD=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E5=AF=BC=E8=87=B4=E5=9C=B0=E5=9B=BE=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=B8=8B=E9=92=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/constants.js | 4 ++-- src/views/charts2/charts/npm/NpmMap.vue | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/utils/constants.js b/src/utils/constants.js index 2709787b..88d1b94d 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -1972,7 +1972,7 @@ export const iso36112 = { NL: 'netherlandsLow', GM: 'gambiaLow', TR: 'turkeyLow', - be: 'belgiumLow', + BE: 'belgiumLow', PA: 'panamaLow', AZ: 'azerbaijanLow', PT: 'portugalLow', @@ -2011,7 +2011,7 @@ export const iso36112 = { NZ: 'newZealandLow', MK: 'northMacedoniaLow', TN: 'tunisiaLow', - bl: 'stBarthelemyLow', + BL: 'stBarthelemyLow', PY: 'paraguayLow', ID: 'indonesiaLow', HT: 'haitiLow', diff --git a/src/views/charts2/charts/npm/NpmMap.vue b/src/views/charts2/charts/npm/NpmMap.vue index 7d8bbcd6..e014cde5 100644 --- a/src/views/charts2/charts/npm/NpmMap.vue +++ b/src/views/charts2/charts/npm/NpmMap.vue @@ -394,11 +394,17 @@ export default { async location (n) { this.$store.commit('setNpmLocationCountry', n) if (!n) { - this.countryImageSeries.data = [{}] + if (this.countryImageSeries) { + this.countryImageSeries.data = [{}] + } this.polygonSeries.show() this.worldImageSeries.show() - this.countrySeries.hide() - this.countryImageSeries.hide() + if (this.countrySeries) { + this.countrySeries.hide() + } + if (this.countryImageSeries) { + this.countryImageSeries.hide() + } this.myChart.zoomToGeoPoint(this.myChart.homeGeoPoint, this.myChart.homeZoomLevel, true) } else { const countryId = countryNameIdMapping[n]