From 8a4cc3e1c791ab5098ea791775973a4c1df117bc Mon Sep 17 00:00:00 2001 From: hyx Date: Tue, 12 May 2020 09:27:38 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98=201=20legend=E5=8C=BA=E5=9F=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E9=AB=98=E5=BA=A6=EF=BC=8C=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E6=97=B6=E9=A6=96=E5=85=88=E8=AE=A1=E7=AE=97legend=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E9=AB=98=E5=BA=A6=EF=BC=8C=E5=9C=A8=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E9=AB=98=E5=BA=A6=E8=AE=A1=E7=AE=97chart?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=202=20chart=E6=95=B4=E4=BD=93=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=AB=98=E5=BA=A6=20=E4=B8=AA=E4=BD=8D=E9=87=87?= =?UTF-8?q?=E7=94=A8=20=E5=9B=9B=E8=88=8D=E4=BA=94=E5=85=A5=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E8=AE=BE=E7=BD=AE=E9=AB=98=E5=BA=A6=E4=B8=BA454?= =?UTF-8?q?=EF=BC=8C=E5=AE=9E=E9=99=85=E6=B8=B2=E6=9F=93=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E4=B8=BA=20450?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/charts/chart-single-stat.vue | 5 +- .../src/components/charts/chart-table.vue | 5 +- .../src/components/charts/chart-url.vue | 4 +- .../src/components/charts/chartPreview.vue | 26 +- .../components/charts/line-chart-block.scss | 20 +- .../components/charts/line-chart-block.vue | 553 +++--------------- 6 files changed, 133 insertions(+), 480 deletions(-) diff --git a/nezha-fronted/src/components/charts/chart-single-stat.vue b/nezha-fronted/src/components/charts/chart-single-stat.vue index 0c499d46c..ef3f1a6db 100644 --- a/nezha-fronted/src/components/charts/chart-single-stat.vue +++ b/nezha-fronted/src/components/charts/chart-single-stat.vue @@ -260,6 +260,7 @@ export default { prev:parseInt(_this.data.prev), next:parseInt(_this.data.next), } + targetDiv.style.height = (Math.round((containerHeight+_this.chartSpaceHeight)/10)*10-_this.chartSpaceHeight)+'px';//图表实际渲染高度,采用个位数字四舍五入 _this.$put('panel/'+ _this.panelIdInner+'/charts/modify',modifyParams).then(response => { if (response.code === 200) { //更新当前图表数据 @@ -302,7 +303,7 @@ export default { showLoad(chartItem) { this.$nextTick(() => { const chartBox = document.getElementById('chartSingleStatDiv'+this.chartIndex); - let height = chartItem.height; + let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入 if(height { const chartBox = document.getElementById('chartSingleStatDiv'+this.chartIndex); - let height = chartItem.height; + let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入 if(height { if (response.code === 200) { //更新当前图表数据 @@ -506,7 +507,7 @@ export default { //设置高度 chart-table this.$nextTick(() => { const chartBox = document.getElementById('chartTableDiv'+this.chartIndex); - let height = chartItem.height; + let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入 if(height { const chartBox = document.getElementById('chartTableDiv'+this.chartIndex); - let height = chartItem.height; + let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入 if(height { const chartBox = document.getElementById('chartUrlDiv'+this.chartIndex); - let height = chartItem.height; + let height = Math.round(chartItem.height/10)*10;//图表高度四舍五入 if(height { if (response.code === 200) { //更新当前图表数据 diff --git a/nezha-fronted/src/components/charts/chartPreview.vue b/nezha-fronted/src/components/charts/chartPreview.vue index 7027e49ec..c339543fc 100644 --- a/nezha-fronted/src/components/charts/chartPreview.vue +++ b/nezha-fronted/src/components/charts/chartPreview.vue @@ -30,6 +30,11 @@ padding-bottom:20px !important; } + #chartPreviewDailog .el-dialog__header{ + padding: 20px 20px 0px !important; + } + +