From a6dac6042802162f0b4a1198763d78e130ad46af Mon Sep 17 00:00:00 2001 From: selia-zx <1771203023@qq.com> Date: Thu, 16 Oct 2025 09:32:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E8=A1=A8=E3=80=81in?= =?UTF-8?q?put=E8=BE=93=E5=85=A5=E6=A1=86=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sysMonitor/components/hostChart.vue | 22 ++++++++++++++----- .../sysMonitor/components/loadData.vue | 8 +++---- .../centerairC/sysMonitor/hostDetails.vue | 4 ++++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/views/centerairC/sysMonitor/components/hostChart.vue b/src/views/centerairC/sysMonitor/components/hostChart.vue index c9eb6e9..da9e4c5 100644 --- a/src/views/centerairC/sysMonitor/components/hostChart.vue +++ b/src/views/centerairC/sysMonitor/components/hostChart.vue @@ -273,6 +273,7 @@ export default { if (chartRef) { // 初始化图表的代码 this.chartInstance = echarts.init(this.$refs.chart_ref); + const titleFontSize = this.$refs.chart_ref.offsetWidth / 130; this.option = { tooltip: { trigger: "axis", @@ -312,12 +313,16 @@ export default { } return res; }, + textStyle: { + fontSize: titleFontSize * 1.5, + }, }, legend: { show: true, top: 0, textStyle: { color: "white", + fontSize: titleFontSize * 1.5, }, }, grid: { @@ -336,6 +341,9 @@ export default { // interval: 0, //强制显示所有x轴数据 // rotate: 30, //x轴坐标字体倾斜30度 color: "rgba(255, 255, 255, 1)", + textStyle: { + fontSize: titleFontSize * 1.5, + }, }, axisTick: { show: false, // 不显示坐标轴刻度线 @@ -363,13 +371,16 @@ export default { // 设置 name 的样式 nameTextStyle: { color: "rgba(255, 255, 255, 1)", - fontSize: 12, + fontSize: titleFontSize * 2, }, miniInterval: 5, type: "value", // 修饰刻度标签的颜色即y坐标数据 axisLabel: { color: "rgba(255, 255, 255, 1)", + textStyle: { + fontSize: titleFontSize * 1.5, + }, }, // 显示y坐标轴 axisLine: { @@ -396,18 +407,17 @@ export default { // 设置 name 的样式 nameTextStyle: { color: "rgba(255, 255, 255, 1)", - fontSize: 12, + fontSize: titleFontSize * 1.5, }, miniInterval: 5, type: "value", name: "负载", // y 轴的单位描述 // 修饰刻度标签的颜色即y坐标数据 - axisLabel: { - color: "#ffffff", - }, - // 修饰刻度标签的颜色即y坐标数据 axisLabel: { color: "rgba(255, 255, 255, 1)", + textStyle: { + fontSize: titleFontSize * 1.5, + }, }, // 显示y坐标轴 axisLine: { diff --git a/src/views/centerairC/sysMonitor/components/loadData.vue b/src/views/centerairC/sysMonitor/components/loadData.vue index dc031d7..d03854c 100644 --- a/src/views/centerairC/sysMonitor/components/loadData.vue +++ b/src/views/centerairC/sysMonitor/components/loadData.vue @@ -6,9 +6,6 @@