fix: 地图字段更改
This commit is contained in:
@@ -223,10 +223,10 @@ export default {
|
||||
this.countrySeries = shallowRef(this.polygonSeriesFactory())
|
||||
this.countrySeries.geodata = geoData
|
||||
this.polygonSeries.hide()
|
||||
const country = ev.target.dataItem.dataContext.serverCountry
|
||||
const queryParams = { ...this.queryParams, country }
|
||||
const countryRegion = ev.target.dataItem.dataContext.serverCountryRegion
|
||||
const queryParams = { ...this.queryParams, countryRegion }
|
||||
const chartData = await getData(replaceUrlPlaceholder(this.chartInfo.params.url, queryParams))
|
||||
this.loadAm4ChartMap(this.countrySeries, null, country, chartData)
|
||||
this.loadAm4ChartMap(this.countrySeries, null, countryRegion, chartData)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -291,7 +291,7 @@ export default {
|
||||
|
||||
return imageSeries
|
||||
},
|
||||
loadAm4ChartMap (polygonSeries, imageSeries, country, chartData) {
|
||||
loadAm4ChartMap (polygonSeries, imageSeries, countryRegion, chartData) {
|
||||
// chartData不为空是下钻
|
||||
if (chartData) {
|
||||
this.$emit('showLoading', true)
|
||||
@@ -307,7 +307,7 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
this.showMapBackButton = !!country
|
||||
this.showMapBackButton = !!countryRegion
|
||||
const chartParams = this.chartInfo.params
|
||||
const data = chartData || this.chartData
|
||||
if (data && this.isMapBlock) {
|
||||
@@ -315,7 +315,7 @@ export default {
|
||||
return {
|
||||
...this.convertMapData(r),
|
||||
id: r.serverId,
|
||||
serverCountry: r.serverCountry,
|
||||
serverCountryRegion: r.serverCountryRegion,
|
||||
value: r[chartParams.valueColumn]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -132,8 +132,7 @@ export default {
|
||||
pktRetransPercent: t.packetRetransScore ? t.packetRetransScore.pktRetransPercent : null
|
||||
}
|
||||
t.tooltip = {}
|
||||
t.tooltip.width = t.superAdminArea ? 0 : 18
|
||||
t.tooltip.marginRight = t.superAdminArea ? 0 : 6
|
||||
t.tooltip.display = t.superAdminArea ? 'none' : ''
|
||||
t.tooltip.data = {
|
||||
establishLatencyMs: valueToRangeValue(data.establishLatencyMs, unitTypes.time).join(' '),
|
||||
httpResponseLatency: valueToRangeValue(data.httpResponseLatency, unitTypes.time).join(' '),
|
||||
@@ -203,7 +202,7 @@ export default {
|
||||
generatePolygonTooltipHTML () {
|
||||
const html = `
|
||||
<div class="map-tooltip" style="padding-bottom: 10px;">
|
||||
<div class="map-tooltip__title"><img src="/images/flag/{id}.png" style="width: {tooltip.width}px;height: 12px;margin-right: {tooltip.marginRight}px;border: 1px solid #E8E8E8;"/>{name}</div>
|
||||
<div class="map-tooltip__title"><img src="/images/flag/{id}.png" style="width: 18px;display: {tooltip.display};height: 12px;margin-right: 6px;border: 1px solid #E8E8E8;"/>{name}</div>
|
||||
<div class="map-tooltip__content">
|
||||
<div class="content-title">{tooltip.text.traffic}</div>
|
||||
<div class="content-row">
|
||||
|
||||
@@ -164,8 +164,7 @@ export default {
|
||||
pktRetransPercent: t.packetRetransScore ? t.packetRetransScore.pktRetransPercent : null
|
||||
}
|
||||
t.tooltip = {}
|
||||
t.tooltip.width = t.superAdminArea ? 0 : 18
|
||||
t.tooltip.marginRight = t.superAdminArea ? 0 : 6
|
||||
t.tooltip.display = t.superAdminArea ? 'none' : ''
|
||||
t.tooltip.data = {
|
||||
establishLatencyMs: valueToRangeValue(data.establishLatencyMs, unitTypes.time).join(' '),
|
||||
httpResponseLatency: valueToRangeValue(data.httpResponseLatency, unitTypes.time).join(' '),
|
||||
@@ -242,7 +241,7 @@ export default {
|
||||
generatePolygonTooltipHTML () {
|
||||
const html = `
|
||||
<div class="map-tooltip" style="padding-bottom: 10px;">
|
||||
<div class="map-tooltip__title"><img src="/images/flag/{id}.png" style="width: {tooltip.width}px;height: 12px;margin-right: {tooltip.marginRight}px;border: 1px solid #E8E8E8;"/>{name}</div>
|
||||
<div class="map-tooltip__title"><img src="/images/flag/{id}.png" style="width: 18px;display: {tooltip.display};height: 12px;margin-right: 6px;border: 1px solid #E8E8E8;"/>{name}</div>
|
||||
<div class="map-tooltip__content">
|
||||
<div class="content-title">{tooltip.text.traffic}</div>
|
||||
<div class="content-row">
|
||||
|
||||
Reference in New Issue
Block a user