fix: tab选项卡折线图,数据为空时去除移入点击效果
This commit is contained in:
@@ -197,6 +197,7 @@ export default {
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
if (this.isNoData) {
|
if (this.isNoData) {
|
||||||
|
this.lineTab = ''
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
||||||
{ analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
{ analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
||||||
@@ -383,12 +384,14 @@ export default {
|
|||||||
this.myChart.setOption(this.chartOption)
|
this.myChart.setOption(this.chartOption)
|
||||||
},
|
},
|
||||||
activeChange (item, index) {
|
activeChange (item, index) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.lineTab = item.class
|
this.lineTab = item.class
|
||||||
this.legendSelectChange(item, index, 'active')
|
this.legendSelectChange(item, index, 'active')
|
||||||
this.showMarkLine = !item.invertTab
|
this.showMarkLine = !item.invertTab
|
||||||
this.init(this.lineMetric, this.showMarkLine, 'active')
|
this.init(this.lineMetric, this.showMarkLine, 'active')
|
||||||
},
|
},
|
||||||
mouseenter (item) {
|
mouseenter (item) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.mousemoveCursor = item.class
|
this.mousemoveCursor = item.class
|
||||||
this.handleActiveBar(item.class)
|
this.handleActiveBar(item.class)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ export default {
|
|||||||
this.showError = false
|
this.showError = false
|
||||||
this.isNoData = res.data.result.length === 0
|
this.isNoData = res.data.result.length === 0
|
||||||
if (this.isNoData) {
|
if (this.isNoData) {
|
||||||
|
this.lineTab = ''
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
||||||
{ analysis: {}, name: 'linkMonitor.ingress', class: 'ingress', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
{ analysis: {}, name: 'linkMonitor.ingress', class: 'ingress', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
||||||
@@ -353,12 +354,14 @@ export default {
|
|||||||
this.myChart.setOption(this.chartOption)
|
this.myChart.setOption(this.chartOption)
|
||||||
},
|
},
|
||||||
activeChange (item, index) {
|
activeChange (item, index) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.lineTab = item.class
|
this.lineTab = item.class
|
||||||
this.legendSelectChange(item, index, 'active')
|
this.legendSelectChange(item, index, 'active')
|
||||||
this.showMarkLine = !item.invertTab
|
this.showMarkLine = !item.invertTab
|
||||||
this.init(this.lineMetric, this.showMarkLine, 'active')
|
this.init(this.lineMetric, this.showMarkLine, 'active')
|
||||||
},
|
},
|
||||||
mouseenter (item) {
|
mouseenter (item) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.mousemoveCursor = item.class
|
this.mousemoveCursor = item.class
|
||||||
this.handleActiveBar(item.class)
|
this.handleActiveBar(item.class)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ export default {
|
|||||||
this.showError = false
|
this.showError = false
|
||||||
|
|
||||||
if (this.isNoData) {
|
if (this.isNoData) {
|
||||||
|
this.lineTab = ''
|
||||||
this.mpackets = [
|
this.mpackets = [
|
||||||
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
{ analysis: {}, name: 'network.total', class: 'total', show: true, invertTab: true, positioning: 0, data: [], unitType: '' },
|
||||||
{ analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
{ analysis: {}, name: 'network.inbound', class: 'inbound', show: true, invertTab: true, positioning: 1, data: [], unitType: '' },
|
||||||
@@ -519,12 +520,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
activeChange (item, index) {
|
activeChange (item, index) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.lineTab = item.class
|
this.lineTab = item.class
|
||||||
this.legendSelectChange(item, index, 'active')
|
this.legendSelectChange(item, index, 'active')
|
||||||
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) {
|
||||||
|
if (this.isNoData) return
|
||||||
this.mousemoveCursor = item.class
|
this.mousemoveCursor = item.class
|
||||||
this.handleActiveBar(item.class)
|
this.handleActiveBar(item.class)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user