fix: 1.npm tab为location折线图数据为空时ecahrts图加载报错2.npm 下钻世界地图接口参数错误和tab切换未正常禁用问题
This commit is contained in:
@@ -90,6 +90,7 @@ export default {
|
||||
// typeVal: this.$store.getters.getBreadcrumbColumnValue
|
||||
typeVal: this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
}
|
||||
if (params.type === 'serverIp' || params.type === 'clientIp') params.type = 'ip'
|
||||
getData(api.npm.overview.map, params).then(res => {
|
||||
const subParams = {
|
||||
...params,
|
||||
@@ -121,6 +122,9 @@ export default {
|
||||
pktRetransPercent: t.packetRetransScore ? t.packetRetransScore.pktRetransPercent : null
|
||||
}
|
||||
t.score = computeScore(data)
|
||||
if (t.score === '-') {
|
||||
t.score = ''
|
||||
}
|
||||
})
|
||||
this.loadMarkerData(imageSeries, mapData)
|
||||
})
|
||||
@@ -133,7 +137,7 @@ export default {
|
||||
},
|
||||
loadMarkerData (imageSeries, data) {
|
||||
imageSeries.data = data.map(r => ({
|
||||
score: r.score,
|
||||
score: r.score || '–',
|
||||
name: r.province || r.country,
|
||||
throughput: valueToRangeValue(r.throughBitsRate, unitTypes.bps).join(' '),
|
||||
id: r.serverId,
|
||||
|
||||
@@ -135,6 +135,7 @@ export default {
|
||||
get(url, params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.isNoData = res.data.result.length === 0
|
||||
if (!this.isNoData) {
|
||||
if (this.chart.params.index === 0) {
|
||||
res.data.result.forEach((t, i) => {
|
||||
if (t.type === 'totalBitsRate') {
|
||||
@@ -151,6 +152,7 @@ export default {
|
||||
this.echartsInit(res.data.result, this.chartData, this.chartData.params.unitType)
|
||||
}
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
})
|
||||
|
||||
@@ -83,11 +83,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
recentEventsListData () {
|
||||
// const condition = this.$store.getters.getQueryCondition.split(/["|'](.*?)["|']/)
|
||||
// const conditionStr = this.$route.query.queryCondition ? this.$route.query.queryCondition : ''
|
||||
const condition = this.queryCondition.split(/["|'](.*?)["|']/)
|
||||
// const type = this.$store.getters.getDimensionType
|
||||
// const type = this.$route.query.dimensionType ? this.$route.query.dimensionType : ''
|
||||
let url = ''
|
||||
const params = {
|
||||
startTime: getSecond(this.timeFilter.startTime),
|
||||
@@ -97,6 +93,7 @@ export default {
|
||||
if (condition.length > 1 && this.dimensionType) {
|
||||
params.param = condition[1]
|
||||
params.type = this.dimensionType
|
||||
if (params.type === 'serverIp' || params.type === 'clientIp') params.type = 'ip'
|
||||
params.limit = 10
|
||||
url = api.npm.events.recentEventsD
|
||||
this.customTableTitles = [
|
||||
|
||||
@@ -93,15 +93,10 @@ export default {
|
||||
self.serverSessions = self.sessionData.serverSessions / (self.sessionData.clientSessions * 1 + self.sessionData.serverSessions * 1)
|
||||
}
|
||||
}).finally(() => {
|
||||
let thirdMenu = this.$route.query['thirdMenu']
|
||||
let currentTab = 0
|
||||
self.tabs[0].disable = false
|
||||
self.tabs[1].disable = false
|
||||
if(thirdMenu === 'network.clientIps'){
|
||||
currentTab = 0
|
||||
}else if(thirdMenu === 'network.serverIps'){
|
||||
currentTab = 1
|
||||
}else if (self.clientSessions === 0) {
|
||||
if (self.clientSessions === 0) {
|
||||
currentTab = 1
|
||||
self.tabs[0].disable = true
|
||||
self.tabs[1].disable = false
|
||||
|
||||
Reference in New Issue
Block a user