diff --git a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue index 574817f..5b75ac1 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue @@ -231,7 +231,6 @@ export default { }, methods: { getTheData() { - console.log(this.serverOptions) let hostId = this.serverOptions.find((item) => { return item.value == this.currId }).hostId @@ -278,7 +277,6 @@ export default { totalCpu.push(item) } }) - console.log(totalCpu) this.cpuDiff_xData = totalCpu[0].list.map((item) => { return dateFormat(new Date(item.date * 1000), 'hh:mm') }) @@ -357,14 +355,17 @@ export default { onServerChange(val) { this.currId = val.key this.currLabel = val.label + this.getTheData() }, onTimeChange(val) { this.getBeforeHours(val) + this.getTheData() }, onRangeDateChange(date, dateString) { this.queryParams.timer = 0 this.queryParams.startDate = dateString[0] this.queryParams.endDate = dateString[1] + this.getTheData() }, drawChart1() { let myLine = echarts.init(document.getElementById('chart1')) @@ -754,6 +755,11 @@ export default { data: item.data, } }) + option.legend.type = 'scroll' + option.legend.pageIconColor = '#9ab1bc' + option.legend.pageTextStyle = { + color: '#9ab1bc', + } this.drawLine(option) } else { this.drawLine(option) diff --git a/src/views/abnormalAlarm/serverMonitor/instances/details.vue b/src/views/abnormalAlarm/serverMonitor/instances/details.vue index 2313a9f..45063fd 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/details.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/details.vue @@ -15,7 +15,7 @@ :class="{ 'ant-list-item-active': index === currIndex }" slot="renderItem" slot-scope="item, index" - @click="handleBasicItem(index)" + @click="handleBasicItem(index, item)" >