CN-1129 fix: 修改字典、排除unknown点
This commit is contained in:
@@ -59,6 +59,7 @@ import axios from 'axios'
|
|||||||
import { get } from '@/utils/http'
|
import { get } from '@/utils/http'
|
||||||
import chartMixin from '@/views/charts2/chart-mixin'
|
import chartMixin from '@/views/charts2/chart-mixin'
|
||||||
import ChartError from '@/components/common/Error'
|
import ChartError from '@/components/common/Error'
|
||||||
|
import _ from 'lodash'
|
||||||
export default {
|
export default {
|
||||||
name: 'NpmMap',
|
name: 'NpmMap',
|
||||||
components: { ChartError },
|
components: { ChartError },
|
||||||
@@ -123,7 +124,7 @@ export default {
|
|||||||
}
|
}
|
||||||
axios.get(api.npm.location.map, { params: params }).then(response => {
|
axios.get(api.npm.location.map, { params: params }).then(response => {
|
||||||
if (response.data.code === 200) {
|
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) {
|
if (res.length > 0) {
|
||||||
// 计算分数
|
// 计算分数
|
||||||
this.showError = false
|
this.showError = false
|
||||||
|
|||||||
Reference in New Issue
Block a user