From 1231b66c9c5e6ba5e0338a2ba22c9e28f50eda75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 22 Jul 2022 17:34:22 +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 --- .../static/js/board/orderVisualization.js | 71 +++++++++++-------- .../main/resources/static/js/echartsCommon.js | 3 +- 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/js/board/orderVisualization.js b/ruoyi-admin/src/main/resources/static/js/board/orderVisualization.js index c5096b3..f33f723 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/orderVisualization.js +++ b/ruoyi-admin/src/main/resources/static/js/board/orderVisualization.js @@ -9,68 +9,81 @@ $(() => { card({top: 60, left: 54.5,title:'测温性能',name1:'问题1',value1:'值1',name2:'问题2',value2:'值2',name3:'问题3',value3:'值3'},'#cardFour') card({top: 60, left: 62.5,title:'成品外观',name1:'问题1',value1:'值1',name2:'问题2',value2:'值2',name3:'问题3',value3:'值3'},'#cardFive') // 公共请求地址 - let url = '/broad/beforeLibrary' + // let url = '/broad/beforeLibrary' + let url = '' // 轮询间隔时间 const INTERVAL = 30000 //每日人力出勤轮询 - // autoUpdate(url + "/ ", INTERVAL, data => { - let data = [ + autoUpdate(url + "/team6s ", INTERVAL, data => { + data ??= [ { - name: '班组1', - value: 72, + teamName: '班组1', + teamNumber: 72, + path:'' }, { - name: '班组2', - value: 52, + teamName: '班组2', + teamNumber: 52, + path:'' }, { - name: '班组3', - value: 72, + teamName: '班组3', + teamNumber: 72, + path:'' }, { - name: '班组4', - value: 29, + teamName: '班组4', + teamNumber: 29, + path:'' }, { - name: '班组5', - value: 82, + teamName: '班组5', + teamNumber: 82, + path:'' }, { - name: '班组6', - value: 82, + teamName: '班组6', + teamNumber: 82, + path:'' }, { - name: '班组7', - value: 28, + teamName: '班组7', + teamNumber: 28, + path:'' }, { - name: '班组8', - value: 62, + teamName: '班组8', + teamNumber: 62, + path:'' }, { - name: '班组9', - value: 82, + teamName: '班组9', + teamNumber: 82, + path:'' }, { - name: '班组10', - value: 38, + teamName: '班组10', + teamNumber: 38, + path:'' }, { - name: '班组11', - value: 93, + teamName: '班组11', + teamNumber: 93, + path:'' }, ] data.sort((a,b)=>{ - return b.value - a.value + return b.teamNumber - a.teamNumber }) console.log(data) singleVerticalBarChartTwo({ - xName: ['班组1', '班组2', '班组3', '班组4', '班组5', '班组6', '班组7', '班组8', '班组9', '班组10'], - yData: [38, 60, 40, 55, 42, 39, 45, 40, 63, 38], + xName: data.map(val => val.teamName), + yData: data.map(val => val.teamNumber), + yImg: data.map(val => val.path), }, document.getElementById("manpowerAttendance")) - // }) + }) // IQC horizontalRoundedBarChartWithBackgroundTwo(null, document.getElementById("IQC")) diff --git a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js index 1b48b4c..237dc78 100644 --- a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js +++ b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js @@ -1609,6 +1609,7 @@ const singleVerticalBarChartTwo = function (data, id) { color: '#c0c3cd', //X轴文字 fontSize: 14, interval: 0, + rotate:20, }, axisTick: { lineStyle: { @@ -1683,7 +1684,7 @@ const singleVerticalBarChartTwo = function (data, id) { width: 3 * vw, height: 3 * vw, backgroundColor: { - image: '../../img/board/intelligentRefrigeratorInterconnectionFactory/btnOneClick.png' + image: 'http://10.100.70.5:9090/profile/upload/2022/07/22/%E9%99%88%E5%A6%82%E5%8D%8E_20220722161444A002.jpeg' }, }, }