fix: IP详情网络质量概况数据展示

This commit is contained in:
@changcode
2022-01-24 14:31:27 +08:00
parent ef6dba8589
commit 1d26a8b21e

View File

@@ -182,6 +182,17 @@ export default {
...this.entity, ...this.entity,
...extraParams ...extraParams
} }
if (this.isSingleValue) {
if (chartParams && chartParams.dataKey) {
console.log(chartParams.dataKey)
get('/interface/entity/detail/ip/serviceOverview', this.queryParams).then(response =>{
if (response.data.result && (response.data.result[chartParams.dataKey] || response.data.result[chartParams.dataKey] === 0)) {
this.chartData = response.data.result[chartParams.dataKey]
this.loading = false
}
})
}
}
const requestUrl = url || (chartParams && chartParams.url) const requestUrl = url || (chartParams && chartParams.url)
if (requestUrl) { if (requestUrl) {
get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => { get(replaceUrlPlaceholder(requestUrl, this.queryParams)).then(response => {