CN-1129 fix: 修改字典、排除unknown点

This commit is contained in:
chenjinsong
2023-08-07 18:57:58 +08:00
parent 0b984516a3
commit 5f9649f651

View File

@@ -59,6 +59,7 @@ import axios from 'axios'
import { get } from '@/utils/http'
import chartMixin from '@/views/charts2/chart-mixin'
import ChartError from '@/components/common/Error'
import _ from 'lodash'
export default {
name: 'NpmMap',
components: { ChartError },
@@ -123,7 +124,7 @@ export default {
}
axios.get(api.npm.location.map, { params: params }).then(response => {
if (response.data.code === 200) {
const res = response.data.data.result
const res = _.get(response, 'data.data.result', []).filter(r => r.country !== 'Unknown')
if (res.length > 0) {
// 计算分数
this.showError = false