CN-903 人工测试--NetworkOverviewLine:(1) 登录系统后,点击其中一个Tab标签,再点击二级菜单(网络概况)或者右侧刷新按钮或者F5刷新,折线图不显示;(2)切换参考线:报错,界面数据不更新;(3)点击高亮 tab 后未取消高亮,未恢复到全不高亮的状态;
This commit is contained in:
@@ -249,7 +249,7 @@ export default {
|
|||||||
if (!this.isUnitTesting) {
|
if (!this.isUnitTesting) {
|
||||||
if (this.lineTab) {
|
if (this.lineTab) {
|
||||||
this.handleActiveBar()
|
this.handleActiveBar()
|
||||||
echartsData = echartsData.filter(t => t.show === true && t.invertTab === false)
|
echartsData = echartsData.filter(t => t.show === true && t.class === this.lineTab)//t.invertTab === false
|
||||||
} else {
|
} else {
|
||||||
echartsData = echartsData.filter(t => t.show === true)
|
echartsData = echartsData.filter(t => t.show === true)
|
||||||
}
|
}
|
||||||
@@ -262,6 +262,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
...chartOption,
|
...chartOption,
|
||||||
name: t.name,
|
name: t.name,
|
||||||
|
type: "line",
|
||||||
|
showSymbol: false,
|
||||||
|
smooth: true,
|
||||||
|
symbol: "circle",
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: chartColor3[t.positioning],
|
color: chartColor3[t.positioning],
|
||||||
width: 1
|
width: 1
|
||||||
@@ -405,9 +409,15 @@ export default {
|
|||||||
},
|
},
|
||||||
activeChange (item, index) {
|
activeChange (item, index) {
|
||||||
if (this.isNoData) return
|
if (this.isNoData) return
|
||||||
this.lineTab = item.class
|
if(this.lineTab === item.class){//点击高亮 tab 后取消高亮,恢复到全不高亮的状态
|
||||||
|
this.legendSelectChange(item, index, 'active',true)
|
||||||
|
this.lineTab = ''
|
||||||
|
this.showMarkLine = false
|
||||||
|
}else {
|
||||||
this.legendSelectChange(item, index, 'active')
|
this.legendSelectChange(item, index, 'active')
|
||||||
|
this.lineTab = item.class
|
||||||
this.showMarkLine = !item.invertTab
|
this.showMarkLine = !item.invertTab
|
||||||
|
}
|
||||||
this.init(this.metric, this.showMarkLine, 'active')
|
this.init(this.metric, this.showMarkLine, 'active')
|
||||||
},
|
},
|
||||||
mouseenter (item) {
|
mouseenter (item) {
|
||||||
@@ -430,10 +440,15 @@ export default {
|
|||||||
name: name
|
name: name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
legendSelectChange (item, index, val) {
|
legendSelectChange (item, index, val,isActiveAll) {
|
||||||
if (index === 'index') {
|
if (index === 'index') {
|
||||||
this.dispatchLegendSelectAction(item.name)
|
this.dispatchLegendSelectAction(item.name)
|
||||||
} else if (this.tabs[index] && this.tabs[index].name === item.name) {
|
} else if (this.tabs[index] && this.tabs[index].name === item.name) {
|
||||||
|
if(isActiveAll){
|
||||||
|
this.tabs.forEach((t) => {
|
||||||
|
this.dispatchLegendSelectAction(t.name)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
this.dispatchLegendSelectAction(item.name)
|
this.dispatchLegendSelectAction(item.name)
|
||||||
this.tabs.forEach((t) => {
|
this.tabs.forEach((t) => {
|
||||||
if (t.name !== item.name) {
|
if (t.name !== item.name) {
|
||||||
@@ -441,6 +456,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (val === 'active') {
|
if (val === 'active') {
|
||||||
this.tabs.forEach(t => {
|
this.tabs.forEach(t => {
|
||||||
if (item.name === t.name) {
|
if (item.name === t.name) {
|
||||||
@@ -475,7 +491,7 @@ export default {
|
|||||||
this.lineRefer = val
|
this.lineRefer = val
|
||||||
let echartsData
|
let echartsData
|
||||||
if (this.lineTab) {
|
if (this.lineTab) {
|
||||||
echartsData = this.tabs.filter(t => t.show === true && t.invertTab === false)
|
echartsData = this.tabs.filter(t => t.show === true && t.class === this.lineTab)//t.invertTab === false
|
||||||
} else {
|
} else {
|
||||||
echartsData = this.tabs.filter(t => t.show === true)
|
echartsData = this.tabs.filter(t => t.show === true)
|
||||||
}
|
}
|
||||||
@@ -597,6 +613,7 @@ export default {
|
|||||||
tabs[i].analysis = d.analysis
|
tabs[i].analysis = d.analysis
|
||||||
})
|
})
|
||||||
let num = 0
|
let num = 0
|
||||||
|
let self = this
|
||||||
tabs.forEach(e => {
|
tabs.forEach(e => {
|
||||||
e.unitType = type
|
e.unitType = type
|
||||||
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) == 0) {
|
if (e.name !== 'network.total' && parseFloat(e.analysis.avg) == 0) {
|
||||||
@@ -604,15 +621,15 @@ export default {
|
|||||||
num += 1
|
num += 1
|
||||||
} else {
|
} else {
|
||||||
e.show = true
|
e.show = true
|
||||||
if (!active && show !== this.lineRefer) {
|
if (!active && show !== self.lineRefer) {
|
||||||
this.legendSelectChange(e, 'index')
|
self.legendSelectChange(e, 'index')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.lineTab === e.class) {
|
if (self.lineTab === e.class) {
|
||||||
if (parseFloat(e.analysis.avg) <= 0) {
|
if (parseFloat(e.analysis.avg) <= 0) {
|
||||||
this.lineTab = ''
|
self.lineTab = ''
|
||||||
this.lineRefer = ''
|
self.lineRefer = ''
|
||||||
this.init()
|
self.init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -652,12 +669,13 @@ export default {
|
|||||||
// this.domInit()
|
// this.domInit()
|
||||||
this.myChart = null
|
this.myChart = null
|
||||||
this.chartOption = null
|
this.chartOption = null
|
||||||
this.timer = setTimeout(() => {
|
let self = this
|
||||||
if (this.lineTab && this.metric !== 'Sessions/s') {
|
self.timer = setTimeout(() => {
|
||||||
const data = this.tabsTemplate.find(t => t.class === this.lineTab)
|
if (self.lineTab && self.metric !== 'Sessions/s') {
|
||||||
this.activeChange(data, data.positioning)
|
const data = self.tabsTemplate.find(t => t.class === self.lineTab)
|
||||||
|
self.activeChange(data, data.positioning)
|
||||||
} else {
|
} else {
|
||||||
this.init()
|
self.init()
|
||||||
}
|
}
|
||||||
}, 200)
|
}, 200)
|
||||||
window.addEventListener('resize', this.resize)
|
window.addEventListener('resize', this.resize)
|
||||||
|
|||||||
Reference in New Issue
Block a user