CN-399 Detection--服务质量事件 指标变化曲线开发:metric 曲线图无数据时,使用'-'代替
This commit is contained in:
@@ -79,7 +79,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
eventSeverityColor,
|
eventSeverityColor,
|
||||||
basicInfo: {},
|
basicInfo: {},
|
||||||
metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
|
metricList:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -112,14 +112,18 @@ export default {
|
|||||||
})
|
})
|
||||||
this.queryMetric().then(responses => {
|
this.queryMetric().then(responses => {
|
||||||
responses && (this.metricList = responses.values)
|
responses && (this.metricList = responses.values)
|
||||||
this.initChart()
|
if(this.metricList.length>0){
|
||||||
|
this.initChart()
|
||||||
|
}else {
|
||||||
|
let chartDom = document.getElementById('detectionMetricChartDomain')
|
||||||
|
chartDom.innerHTML = '<span style="padding-left:5px;">-</span>'
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
console.log(this.metricChart)
|
|
||||||
this.metricChart && this.metricChart.resize()
|
this.metricChart && this.metricChart.resize()
|
||||||
})
|
})
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -147,7 +151,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
||||||
console.log(this.chartOptionMetric)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
queryMetric() {
|
queryMetric() {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
return {
|
return {
|
||||||
eventSeverityColor,
|
eventSeverityColor,
|
||||||
basicInfo: {},
|
basicInfo: {},
|
||||||
metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
|
metricList:[],
|
||||||
metricChart: null,
|
metricChart: null,
|
||||||
searchStartTime:null,
|
searchStartTime:null,
|
||||||
searchEndTime:null
|
searchEndTime:null
|
||||||
@@ -171,14 +171,18 @@
|
|||||||
|
|
||||||
this.queryMetric().then(responses => {
|
this.queryMetric().then(responses => {
|
||||||
responses && (this.metricList = responses.values)
|
responses && (this.metricList = responses.values)
|
||||||
this.initChart()
|
if(this.metricList.length>0){
|
||||||
|
this.initChart()
|
||||||
|
}else {
|
||||||
|
let chartDom = document.getElementById('detectionMetricChartDomain')
|
||||||
|
chartDom.innerHTML = '<span style="padding-left:5px;">-</span>'
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
console.log(this.metricChart)
|
|
||||||
this.metricChart && this.metricChart.resize()
|
this.metricChart && this.metricChart.resize()
|
||||||
})
|
})
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -206,7 +210,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
||||||
console.log(this.chartOptionMetric)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
queryMetric() {
|
queryMetric() {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
basicInfo: {},
|
basicInfo: {},
|
||||||
metricList:[[1435781430781, "1"], [1435781431781, "5"],[1435781432781, "5"], [1435781433781, "3"],[1435781434781, "4"], [1435781435781, "5"]],
|
metricList:[],
|
||||||
metricChart: null,
|
metricChart: null,
|
||||||
searchStartTime:null,
|
searchStartTime:null,
|
||||||
searchEndTime:null
|
searchEndTime:null
|
||||||
@@ -134,14 +134,18 @@ export default {
|
|||||||
})
|
})
|
||||||
this.queryMetric().then(responses => {
|
this.queryMetric().then(responses => {
|
||||||
responses && (this.metricList = responses.values)
|
responses && (this.metricList = responses.values)
|
||||||
this.initChart()
|
if(this.metricList.length>0){
|
||||||
|
this.initChart()
|
||||||
|
}else {
|
||||||
|
let chartDom = document.getElementById('detectionMetricChartDomain')
|
||||||
|
chartDom.innerHTML = '<span style="padding-left:5px;">-</span>'
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
console.log(this.metricChart)
|
|
||||||
this.metricChart && this.metricChart.resize()
|
this.metricChart && this.metricChart.resize()
|
||||||
})
|
})
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
@@ -170,7 +174,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
this.chartOptionMetric && this.metricChart.setOption(this.chartOptionMetric)
|
||||||
console.log(this.chartOptionMetric)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
queryMetric() {
|
queryMetric() {
|
||||||
|
|||||||
Reference in New Issue
Block a user