From 805529ed94376412e250f8ef9096766307767589 Mon Sep 17 00:00:00 2001 From: jhnine Date: Tue, 7 Mar 2023 15:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../monitorSelect/components/ComputeDomain.vue | 1 + .../components/ComputingPowerTrend.vue | 4 +++- .../components/ComputingPowerUse.vue | 16 ++++++++++------ .../components/ComputingResourceLoad.vue | 11 ++++++----- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/views/monitorSelect/components/ComputeDomain.vue b/src/views/monitorSelect/components/ComputeDomain.vue index 234a5d6..8ea4010 100644 --- a/src/views/monitorSelect/components/ComputeDomain.vue +++ b/src/views/monitorSelect/components/ComputeDomain.vue @@ -29,6 +29,7 @@ export default { display: flex; justify-content: space-between; .img{ + padding-left: 2%; width: 25%; } .text{ diff --git a/src/views/monitorSelect/components/ComputingPowerTrend.vue b/src/views/monitorSelect/components/ComputingPowerTrend.vue index 876358a..479b6e8 100644 --- a/src/views/monitorSelect/components/ComputingPowerTrend.vue +++ b/src/views/monitorSelect/components/ComputingPowerTrend.vue @@ -99,7 +99,6 @@ export default { fontFamily: 'Source Han Sans CN' }, formatter: function(params) { - console.log(params) switch (params) { case '2023-04-30': return params.slice(2).replaceAll('-', '/') @@ -192,6 +191,9 @@ export default { animationEasing: 'backln' } option && this.myChart.setOption(option) + window.addEventListener('resize', function() { + this.myChart.resize() + }) } } } diff --git a/src/views/monitorSelect/components/ComputingPowerUse.vue b/src/views/monitorSelect/components/ComputingPowerUse.vue index cfb488d..bd45bb6 100644 --- a/src/views/monitorSelect/components/ComputingPowerUse.vue +++ b/src/views/monitorSelect/components/ComputingPowerUse.vue @@ -37,9 +37,9 @@ export default { clearInterval(this.timer) const TempData = JSON.parse(JSON.stringify(newValue)) if (TempData.xData.length <= 5) { - this.barWidth = 40 + this.barWidth = 30 } else { - this.barWidth = 25 + this.barWidth = 15 } Data.xData = TempData.xData Data.used = TempData.used ? TempData.used : [] @@ -104,7 +104,7 @@ export default { }, padding: [10, 0, 0, 10] // 位置 }, - color: ['#1890ff', '#1ee7e7'], + color: ['rgba(135, 189, 245, 1)', 'rgba(62, 223, 252, 1)', 'rgba(5, 155, 252, 1)'], tooltip: { trigger: 'axis', axisPointer: { @@ -122,7 +122,7 @@ export default { }, grid: { right: '1%', - bottom: '14%', + bottom: '13%', top: '12%', left: '15%' }, @@ -224,11 +224,11 @@ export default { colorStops: [ { offset: 0, - color: 'rgba(24, 144, 255,0.5)' // 0% 处的颜色 + color: 'rgb(24, 144, 255)' // 0% 处的颜色 }, { offset: 1, - color: 'rgb(24, 144, 255)' // 100% 处的颜色 + color: 'rgba(24, 144, 255,0.5)' // 100% 处的颜色 } ], global: false // 缺省为 false @@ -302,6 +302,10 @@ export default { } option && this.myChart.setOption(option) + + window.addEventListener('resize', function() { + this.myChart.resize() + }) }, digit(val) { let num = Math.trunc(val) diff --git a/src/views/monitorSelect/components/ComputingResourceLoad.vue b/src/views/monitorSelect/components/ComputingResourceLoad.vue index 1d9359a..3c59793 100644 --- a/src/views/monitorSelect/components/ComputingResourceLoad.vue +++ b/src/views/monitorSelect/components/ComputingResourceLoad.vue @@ -85,11 +85,12 @@ export default { tooltip: { trigger: 'axis', axisPointer: { - type: 'cross', - label: { - backgroundColor: '#283b56' - } - } + type: 'none', + show: false + }, + backgroundColor: '#000033', + textStyle: { color: '#fff' }, + borderWidth: 0 }, xAxis: { type: 'category',