From a7ce128620d251d9fdae07b38ce7d980a8f650ec Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Fri, 23 Aug 2024 14:27:20 +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 --- .../system/check/checknum/checknum.html | 62 +++++++------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/check/checknum/checknum.html b/ruoyi-admin/src/main/resources/templates/system/check/checknum/checknum.html index b7a90be..d5f03a1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/check/checknum/checknum.html +++ b/ruoyi-admin/src/main/resources/templates/system/check/checknum/checknum.html @@ -143,10 +143,10 @@
-
+
-
+
@@ -224,52 +224,36 @@ } }) var rightMain = echarts.init(document.getElementById('rightMain')); - axios.post(prefix + '/countType').then(response => { + axios.post(prefix + '/countCheckType').then(response => { if (response.data.code == web_status.SUCCESS){ rightMain.setOption({ - title:{ - text:'检查类型统计' - }, - tooltip: { - trigger: 'item' + title: { + text: '检查类型统计' }, + tooltip: {}, legend: { - orient: 'vertical', - x: 'left', - y:'bottom' + data:['检查类型'] + }, + xAxis: { + data: response.data.data.xAxisData, + axisLabel: { + rotate: 45, // 旋转标签的角度 + margin: 10, // 标签与坐标轴的间距 + }, + }, + yAxis: { + }, series: [ { - type: 'pie', - radius: ['40%', '70%'], - avoidLabelOverlap: false, + name: '检查类型', + type: 'bar', + data: response.data.data.yAxisData, itemStyle: { - borderRadius: 10, - borderColor: '#fff', - borderWidth: 2 - }, - label: { - show: false, - position: 'center' - }, - emphasis: { - label: { - show: true, - fontSize: 20, - fontWeight: 'bold' - } - }, - labelLine: { - show: false - }, - data: response.data.data.map((item,index) => ({ - ...item, - itemStyle: { - color: ['#ff9999', '#66b3ff'][index] - } - })) + color: '#ff9999' + } } - ] + ], }); } })