From b9b275df0a3e5b59258e98e2e31073e7bbdc11c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 20 Jul 2022 13:30:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/css/autoscroll-table.css | 11 +- .../resources/static/js/autoscroll-table.js | 12 +- .../main/resources/static/js/echartsCommon.js | 13 +- .../main/resources/templates/broad/fp.html | 165 +++++++----------- 4 files changed, 85 insertions(+), 116 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/css/autoscroll-table.css b/ruoyi-admin/src/main/resources/static/css/autoscroll-table.css index 030103d..4813861 100644 --- a/ruoyi-admin/src/main/resources/static/css/autoscroll-table.css +++ b/ruoyi-admin/src/main/resources/static/css/autoscroll-table.css @@ -8,14 +8,9 @@ padding: 0.6% 0; } -.autoscroll-table td { - font-size: 88%; - text-align: center; - padding: 0.8% 0; -} .autoscroll-table > thead { - position: fixed; + position: sticky; background-color: #103BBD; color: #FFFFFF; outline: #103BBD solid 1px; @@ -90,12 +85,14 @@ /* Font size readjust */ .autoscroll-table th { - font-size: 10%; + font-size: 0.85vw; } .autoscroll-table td { font-size: 0.75vw; white-space:nowrap; + text-align: center; + padding: 0; } .autoscroll-table caption { diff --git a/ruoyi-admin/src/main/resources/static/js/autoscroll-table.js b/ruoyi-admin/src/main/resources/static/js/autoscroll-table.js index ecd3144..ecdb7e0 100644 --- a/ruoyi-admin/src/main/resources/static/js/autoscroll-table.js +++ b/ruoyi-admin/src/main/resources/static/js/autoscroll-table.js @@ -234,6 +234,7 @@ class AutoScrollTable { } resize() { + const parent = this.el.querySelector(".autoscroll-table").parentNode const thead = this.el.querySelector(".autoscroll-table .autoscroll-table_thead"); const theadRow = thead.children[0] let tbody = this.el.querySelector(".autoscroll-table .autoscroll-table_tbody1"); @@ -256,14 +257,19 @@ class AutoScrollTable { } thead.style.width = window.getComputedStyle(tbody).width - shadow.style.height = window.getComputedStyle(theadRow).height - thead.style.top = window.getComputedStyle(this.el).top + let tr = this.el.querySelectorAll(".autoscroll-table .autoscroll-table_tbody1 tr") + tr.forEach(val => { + val.style.lineHeight = `${(parseFloat(window.getComputedStyle(parent).height) - parseFloat(window.getComputedStyle(theadRow).height))/5}px` + }) + + shadow.style.display ='none' + thead.style.top = '0' if (caption) { caption.style.width = thead.style.width const captionHeight = parseFloat(window.getComputedStyle(caption).height) - thead.style.top = `${parseFloat(thead.style.top) + captionHeight}px` + thead.style.top = '0' shadow.style.height = `${parseFloat(shadow.style.height) + captionHeight}px` } } diff --git a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js index f4c2cf2..de9e7b2 100644 --- a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js +++ b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js @@ -1412,12 +1412,12 @@ const multipleBrokenLineAreaDiagram = (data, ids) => { xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], yDataOne: new Fun().randomNum(), yDataTwo: new Fun().randomNum(), - yDataThree: new Fun().randomNum(), yDataOneName: '制氢量', yDataTwoName: '发电量', - yDataThreeName: '充装量', } } + let max = Math.round(Math.max(...data.yDataOne,...data.yDataTwo)) + let min = Math.round(Math.min(...data.yDataOne,...data.yDataTwo)) let option = { tooltip: { @@ -1459,7 +1459,8 @@ const multipleBrokenLineAreaDiagram = (data, ids) => { }, axisLabel: { show: true, - color: '#fff' + color: '#fff', + interval:0, }, data: data.xData, }, @@ -1470,7 +1471,8 @@ const multipleBrokenLineAreaDiagram = (data, ids) => { axisTick: { show: false, }, - min:15, + max:max+0.5, + min:min - 1, axisLine: { lineStyle: { color: "#57617B", @@ -1478,7 +1480,8 @@ const multipleBrokenLineAreaDiagram = (data, ids) => { }, axisLabel: { show: true, - color: '#fff' + color: '#fff', + interval:0.5, }, splitLine: { show: false, diff --git a/ruoyi-admin/src/main/resources/templates/broad/fp.html b/ruoyi-admin/src/main/resources/templates/broad/fp.html index 9c61784..be7575e 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/fp.html +++ b/ruoyi-admin/src/main/resources/templates/broad/fp.html @@ -38,15 +38,7 @@ left: 3.4%; } - #bottom-left { - position: absolute; - border: 0px solid red; - width: 68%; - height: 25%; - top: 66.4%; - left: 3.5%; - font-size: 1vw; - } + .total { flex-wrap: nowrap; @@ -197,22 +189,24 @@ height: 100%; } - #bottom-left .autoscroll-table td { - padding-top: 0.3%; - padding-bottom: 0.3%; + + + .my-transition{ + position: absolute; + border: 0px solid red; + width: 68%; + height: 25%; + top: 66.4%; + left: 3.5%; + transform: scale(0.5, 0.5); + opacity: 0; + transition: transform 0.5s linear, opacity 0.5s linear; } - - #bottom-left-2 .autoscroll-table td { - padding-top: 0.3%; - padding-bottom: 0.3%; - } - - .my-transition2 { position: absolute; border: 0px solid red; width: 68%; - height: 29.6%; + height: 25%; top: 66.4%; left: 3.5%; transform: scale(0.5, 0.5); @@ -222,6 +216,7 @@ .my-click-transiton { opacity: 1; + z-index: 2 ; transform: scale(1, 1); } @@ -243,14 +238,12 @@ -
-
-
+
- - - +
+
+
@@ -359,21 +352,21 @@