From 94f00a35b74912de7d3fc6f3448e2643710cbf02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= <523037378@qq.com> Date: Fri, 6 Mar 2020 20:54:44 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20dashboard=20=E5=9B=BE=E8=A1=A8=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=8C=96=E3=80=81endpoint=20view=20graph=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.统一高度设为80% --- nezha-fronted/src/assets/stylus/main.scss | 15 +++++++++- .../src/components/charts/chart-table.vue | 6 ++-- .../components/charts/line-chart-block.scss | 11 +++++-- .../components/charts/line-chart-block.vue | 30 +++++++++++-------- .../src/components/common/exportXLSX.vue | 8 ++--- .../src/components/page/project/project.vue | 25 +++++++++------- 6 files changed, 62 insertions(+), 33 deletions(-) diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 2ced6eb50..f98f7f645 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1107,8 +1107,21 @@ li{ /* --end--复选框自定义颜色 */ /* dashboard-dialog */ +.nz-dialog { + overflow: hidden; +} .nz-dialog .el-dialog { - border-radius: 10px; + border-radius: 5px; +} +.line-chart-block-modal .el-dialog { + margin-top: 5% !important; +} +.table-chart-dialog .el-dialog { + height: 80%; + margin-top: 5% !important; +} +.table-chart-dialog .el-dialog .el-dialog__body { + height: calc(100% - 100px); } .nz-dialog .el-dialog__body { padding: 0 20px 30px 20px; diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index e6f96e372..eaf69ada3 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -25,7 +25,7 @@
- + @@ -38,7 +38,7 @@
- +
{{data.title}}
@@ -47,7 +47,7 @@
- + diff --git a/nezha-fronted/src/components/charts/line-chart-block.scss b/nezha-fronted/src/components/charts/line-chart-block.scss index b5279bb16..d2a4a9e39 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.scss +++ b/nezha-fronted/src/components/charts/line-chart-block.scss @@ -29,6 +29,9 @@ line-height: 18px; font-family: Roboto,Helvetica Neue,Arial,sans-serif; } +.legend-container-screen.legend-container { + height: 115px; +} .legend-item{ text-overflow:ellipsis; white-space:nowrap; @@ -107,12 +110,12 @@ } .line-chart-block-modal { .el-dialog{ - height:480px; + height: 80%; } .line-area { box-sizing: border-box; background: #FFF; - min-height: 95px; + height: 100%; span.highcharts-title {/*针对highcharts设置的样式,echarts需要修改??*/ display: block !important; width: 50%; @@ -135,4 +138,8 @@ .pt10{ padding-top:10px; } + .el-dialog__body { + height: calc(100% - 200px); + } + } diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 9e379868e..b77eb6e2d 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -37,10 +37,10 @@
-
- {{item.alias?item.alias:item.name}} -
-
+
+ {{item.alias?item.alias:item.name}} +
+
-
-
-
- {{item.alias?item.alias:item.name}} -
-
+
+ +
+ +
+ {{item.alias?item.alias:item.name}} +
+
+
+ @@ -605,7 +609,6 @@ //bottom:0 }, grid: { - //height:"50%", top: 13, left: 0, right: 30, @@ -854,8 +857,9 @@ }); } this.$nextTick(() => { - let divHeight = this.$refs.screenLegendArea.offsetHeight; - this.echartModalStore.resize({height:(400-divHeight)}); + this.$refs.screenLegendScrollbar.update(); + /*let divHeight = this.$refs.screenLegendArea.offsetHeight; + this.echartModalStore.resize({height: '100%'});*/ }); } }, diff --git a/nezha-fronted/src/components/common/exportXLSX.vue b/nezha-fronted/src/components/common/exportXLSX.vue index ec39fd0ad..9be3f4d7d 100644 --- a/nezha-fronted/src/components/common/exportXLSX.vue +++ b/nezha-fronted/src/components/common/exportXLSX.vue @@ -260,7 +260,7 @@ /*去除上传文件动画end*/