From b7804ed63e602869dfb4947c38b54bc06f979030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 28 Jul 2022 18:39:30 +0800 Subject: [PATCH] =?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 --- .../main/resources/static/css/board/month.css | 18 ++++++- .../main/resources/static/js/board/month.js | 47 +++++++++++++++++-- .../main/resources/static/js/echartsCommon.js | 4 +- .../main/resources/templates/broad/month.html | 8 ++++ 4 files changed, 68 insertions(+), 9 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/css/board/month.css b/ruoyi-admin/src/main/resources/static/css/board/month.css index da87ba0..91bc199 100644 --- a/ruoyi-admin/src/main/resources/static/css/board/month.css +++ b/ruoyi-admin/src/main/resources/static/css/board/month.css @@ -21,8 +21,8 @@ body { position: absolute; width: 23%; height: 35%; - top: 18.5%; - left: 75.3%; + top: 61.5%; + left: 2.3%; } .quality{ position: absolute; @@ -40,6 +40,20 @@ body { /*top: 15%;*/ /*left: 75%;*/ } +.safe{ + position: absolute; + width: 22%; + height: 34%; + top: 61%; + left: 75.5%; +} +.abnormal{ + position: absolute; + width: 22%; + height: 34%; + top: 61%; + left: 51.5%; +} .scene{ background: url(../../img/board/month/two.jpg) no-repeat; background-size: 100% 100%; diff --git a/ruoyi-admin/src/main/resources/static/js/board/month.js b/ruoyi-admin/src/main/resources/static/js/board/month.js index 760ec25..bb92e58 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/month.js +++ b/ruoyi-admin/src/main/resources/static/js/board/month.js @@ -7,7 +7,6 @@ $(() => { const INTERVAL = 30000 autoUpdate(url + "/selectUserSatisfaction", INTERVAL, data => { - console.log(data) multipleVerticalBarChartTwo({ xName: ['产品体验', "购物体验", "服务体验", "订单履行率"], yDataOne: [data[0].productRate, data[0].shoppingRate, data[0].serviceRate, data[0].orderRate], @@ -16,6 +15,44 @@ $(() => { yDataTwoName: '' + data.map(val => val.yearName)[1], }, document.getElementById("satisfaction"), undefined, '%') }) + + autoUpdate(url + "/selectMonthNumberQaS", INTERVAL, data => { + multipleVerticalBarChartTwo({ + xName:data.map(val => `${val.monthName}月`), + yDataOne: data.map(val => val.bhNumber), + yDataOneName: '闭环数', + yDataTwo: data.map(val => val.qaNumber), + yDataTwoName: "隐患数", + }, document.getElementById("safe"), '') + }) + autoUpdate(url + "/selectMonthQANumber", INTERVAL, data => { + console.log(data) + pieChart(data.map((val,index) => { + if (index == 0 ) { + return { + name: val.name, + value: val.rate, + itemStyle: { + color: 'red', + } + } + } + if (index == 1) { + return { + name: val.name, + value: val.rate, + itemStyle: { + color: 'yellow', + } + } + } + return { + name: val.name, + value: val.rate + } + + }), document.getElementById("abnormal"),'%'); + }) autoUpdate(url + "/selectProductInStoreGroupMonth", INTERVAL, data => { total(data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0), '#total') @@ -69,14 +106,14 @@ const curWeek = () => { const moduleTitle = () => { const html = ` - 智能冷柜集成控制中心 + 智能冷柜中央管控平台 用户满意度 产品升级 场景升级 - 全价值链 + 品质提升 产量统计 - 品质提升 - 周质量分析 + 单台能耗 + 质量分析 安全生产 ` $('body').append(html) diff --git a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js index 71744a7..d9c72ee 100644 --- a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js +++ b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js @@ -1065,7 +1065,7 @@ const lineChart = function (data, id) { // 饼图 -const pieChart = function (data, id) { +const pieChart = function (data, id,unit='次') { let charts = echarts.init(id); console.log(data) if (!data) { @@ -1115,7 +1115,7 @@ const pieChart = function (data, id) { roseType: "radius", label: { normal: { - formatter: "{b|{b}} \n {c|{c}次}", + formatter: `{b|{b}} \n {c|{c}${unit}}`, rich: { c: { color: "rgb(241,246,104)", diff --git a/ruoyi-admin/src/main/resources/templates/broad/month.html b/ruoyi-admin/src/main/resources/templates/broad/month.html index 8f395e9..eb52b8a 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/month.html +++ b/ruoyi-admin/src/main/resources/templates/broad/month.html @@ -46,6 +46,14 @@
+ + + + +品牌赋能 +全网协同 +生态终端 +感动用户