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/box.html b/ruoyi-admin/src/main/resources/templates/broad/box.html index d600804..61e8b29 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/box.html +++ b/ruoyi-admin/src/main/resources/templates/broad/box.html @@ -18,6 +18,9 @@ @@ -243,14 +238,12 @@ -
-
-
+
- - - +
+
+
@@ -359,21 +352,21 @@