From de8aa6d6155460a0c80a57421a8709d486adcc9d Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Wed, 9 Oct 2024 10:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/usernum/usernum.html | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html index fb660a4..cb2bd45 100644 --- a/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html +++ b/ruoyi-admin/src/main/resources/templates/system/usernum/usernum.html @@ -29,10 +29,13 @@ <div class="row"> <div class="echart"> <div class="children_echarts left_echarts"> - <div id="leftMain" style="width: 600px;height:330px"></div> + <div id="leftMain" style="width: 500px;height:330px"></div> + </div> + <div class="children_echarts center_echarts"> + <div id="centerMain" style="width: 500px;height:330px"></div> </div> <div class="children_echarts right_echarts"> - <div id="rightMain" style="width: 600px;height:330px"></div> + <div id="rightMain" style="width: 400px;height:330px"></div> </div> </div> <div class="col-sm-12 search-collapse"> @@ -251,6 +254,41 @@ console.log(response.data.data) } }) + var centerChart = echarts.init(document.getElementById('centerMain')); + axios.post(prefix + '/countCheckMonth').then(response => { + if (response.data.code == web_status.SUCCESS){ + centerChart.setOption({ + title: { + text: '已登记统计' + }, + tooltip: {}, + legend: { + data:['人数'] + }, + xAxis: { + data: response.data.data.xAxisData, + axisLabel: { + rotate: 45, // 旋转标签的角度 + margin: 10, // 标签与坐标轴的间距 + }, + }, + yAxis: { + + }, + series: [ + { + name: '人数', + type: 'bar', + data: response.data.data.yAxisData, + itemStyle: { + color: '#2ee37b' + } + } + ] + }); + console.log(response.data.data) + } + }) var rightMain = echarts.init(document.getElementById('rightMain')); axios.post(prefix + '/countUser').then(response => { if (response.data.code == web_status.SUCCESS){