diff --git a/src/views/location/Index.vue b/src/views/location/Index.vue
index cce0f17f..e55e78d2 100644
--- a/src/views/location/Index.vue
+++ b/src/views/location/Index.vue
@@ -379,7 +379,7 @@ import SimpleLoading from '@/components/common/SimpleLoading.vue'
import MyFollowBox from '@/components/rightBox/location/MyFollowBox'
import dataListMixin from '@/mixins/data-list'
-import testData from './test'
+// import testData from './test'
const humanSvg = ''
const baseStationSvg = ''
@@ -485,7 +485,7 @@ export default {
layout: {},
paint: {
'fill-color': ['get', 'color'],
- 'fill-opacity': ['case', ['boolean', ['feature-state', 'hover'], false], 0.7, 0.3]
+ 'fill-opacity': ['case', ['boolean', ['feature-state', 'hover'], false], 0.7, 0.4]
}
})
// 六边形的鼠标事件
@@ -527,9 +527,9 @@ export default {
}
this.loading.pieLoading = true
try {
- // const response = await axios.get(api.location.density, { params })
- // const densityData = response.data.data
- const densityData = testData
+ const response = await axios.get(api.location.density, { params })
+ const densityData = response.data.data
+ // const densityData = testData
// 按值的大小分组,并计算各组数量和颜色
this.pieValueRamp = this.calculateValueRamp(densityData)
const option = _.cloneDeep(pieOption)
@@ -619,9 +619,9 @@ export default {
}
this.loading.hexagonLoading = true
try {
- // const response = await axios.get(api.location.map, { params })
- // return response.data.data
- return testData
+ const response = await axios.get(api.location.map, { params })
+ return response.data.data
+ // return testData
} catch (e) {
this.errorMsgHandler(e)
console.error(e)
@@ -744,6 +744,9 @@ export default {
const response = await axios.get(api.location.tracking, { params })
const trackingSubscribers = _.cloneDeep(this.trackingSubscribers)
if (response.data.data.result) {
+ response.data.data.result.forEach(item => {
+ item.trackRecords = item.trackRecords.filter(t => t.hexId)
+ })
trackingSubscribers.forEach(s => {
const find = response.data.data.result.find(item => item.subscriberId === s.subscriberId)
if (find) {
@@ -837,7 +840,7 @@ export default {
layout: {},
paint: {
'fill-color': ['get', 'color'],
- 'fill-opacity': ['case', ['boolean', ['feature-state', 'hover'], false], 0.75, 0.5]
+ 'fill-opacity': ['case', ['boolean', ['feature-state', 'hover'], false], 0.7, 0.4]
}
})
// 轨迹线