From f0df233ae8b7bcd8bd329bd85a60b2e32a9f54e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Wed, 6 Aug 2025 17:15:17 +0800 Subject: [PATCH] =?UTF-8?q?task=2045202=20=E5=A4=A7=E5=B1=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/charts/bar/index.js | 23 +++++++++++++++++++- src/components/pannelNew/index.scss | 2 +- src/views/sanqing/main-gis/index.html | 3 +-- src/views/sanqing/main-gis/index.scss | 14 ++++++++++++- src/views/sanqing/main-gis/index.vue | 30 +++++++++++++++++++++++++-- 5 files changed, 65 insertions(+), 7 deletions(-) diff --git a/src/components/charts/bar/index.js b/src/components/charts/bar/index.js index 300e27c..6a83bc1 100644 --- a/src/components/charts/bar/index.js +++ b/src/components/charts/bar/index.js @@ -25,6 +25,14 @@ export default { type: String, default: '单位:万元' }, + interval: { + type: Number, + default: null + }, + rotate: { + type: Number, + default: 0 + }, serverName: { type: String, default: '面积' @@ -76,7 +84,20 @@ export default { const erd = elementResizeDetectorMaker(); erd.listenTo(document.getElementById(this.id), () => { this.$nextTick(() => { + if (document.getElementById(this.id).offsetWidth > 500){ + this.rotate = 60; + }else{ + this.rotate = 0; + } this.chart.resize(); + this.chart.setOption({ + // 新的配置项,例如: + xAxis: { + axisLabel: { + rotate: this.rotate + }, + } + }); }); }); }, @@ -145,6 +166,7 @@ export default { }, axisLabel: { show: true, + rotate: this.rotate, color: 'rgba(185, 211, 235, 1)' }, }, @@ -254,7 +276,6 @@ export default { }; this.chart.setOption(option); this.initResizeCallBack(); - } } }; diff --git a/src/components/pannelNew/index.scss b/src/components/pannelNew/index.scss index 9da57ed..86e1a02 100644 --- a/src/components/pannelNew/index.scss +++ b/src/components/pannelNew/index.scss @@ -84,7 +84,7 @@ width: 100%; position: relative; flex: 1; - background-color: rgba(1,20,44,.6); + background-color: rgba(1,20,44,.9); overflow: hidden; .bottom_line { diff --git a/src/views/sanqing/main-gis/index.html b/src/views/sanqing/main-gis/index.html index 28f6ff2..b901720 100644 --- a/src/views/sanqing/main-gis/index.html +++ b/src/views/sanqing/main-gis/index.html @@ -93,7 +93,7 @@