From ee2905499f3b4979ae56b7e024067252a208566f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Wed, 27 Jul 2022 15:34:45 +0800 Subject: [PATCH] '1' --- .../main/resources/static/css/board/month.css | 30 +---- .../main/resources/static/js/board/month.js | 115 +----------------- .../main/resources/templates/broad/month.html | 21 +--- 3 files changed, 4 insertions(+), 162 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 8df9637..b8350d7 100644 --- a/ruoyi-admin/src/main/resources/static/css/board/month.css +++ b/ruoyi-admin/src/main/resources/static/css/board/month.css @@ -10,38 +10,10 @@ body { font: normal 100% Arial, sans-serif; } -.manpowerAttendance{ +.satisfaction{ position: absolute; width: 25%; height: 35%; top: 15%; left: 71.5%; -} -.IQC{ - position: absolute; - width: 40%; - height: 35%; - top: 15%; - left: 30%; -} -.productionEfficiency{ - position: absolute; - width: 25%; - height: 35%; - top: 60%; - left: 3%; -} -.equipmentPower{ - position: absolute; - width: 39%; - height: 34%; - top: 60%; - left: 30.5%; -} -.topLeft{ - position: absolute; - width: 25%; - height: 34%; - top: 15.5%; - left: 3.5%; } \ No newline at end of file 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 4088241..02157fb 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/month.js +++ b/ruoyi-admin/src/main/resources/static/js/board/month.js @@ -1,117 +1,21 @@ $(() => { moduleTitle() - safe('#safe') // 公共请求地址 let url = '/broad/zhou' // 轮询间隔时间 const INTERVAL = 30000 - const orderDetailsTable = new AutoScrollTable(document.getElementById("IQC"), ["编号", "型号", "计划数量", "完成数量", "差异值"], {width: ['13%', '40%', null, null, '9%']}, 8) - //每日人力出勤轮询 - autoUpdate("/broad/mtk/team6s ", INTERVAL, data => { - data.sort((a, b) => { - return b.teamNumber - a.teamNumber - }) - singleVerticalBarChartTwo({ - xName: data.map(val => val.teamName), - yData: data.map(val => val.teamNumber), - yImg: data.map(val => val.path), - }, document.getElementById("manpowerAttendance")) - }) - - // 三日订单执行情况 - autoUpdate(url + "/selectOrderRateInfo", INTERVAL, data => { - let newData = [] - data.forEach((val,index) => { - if (val.actual_number !== 0){ - newData.push(data[index]) - } - }) - singleVerticalBarChart({ - xName: newData.map(val => val.name_sub), - yData: newData.map(val => val.actual_number), - }, document.getElementById("productionEfficiency"), -20) - orderDetailsTable.loadData(data.map(value => [value.plan_code, value.name, value.plan_number, value.actual_number, value.plan_number - value.actual_number]), Object.keys(["编号", "型号", "计划数量", "完成数量", "差异值"])) - - }) - - // autoUpdate(url + "/mtk_selectOrderInfoBy3dTatle", INTERVAL, data => { - // total(data.find(val => val.name === '入库订单统计').qty, '#total') - // Tips(data.find(val => val.name === '订单数量').qty, data.find(val => val.name === '完成数量').qty, data.find(val => val.name === '清单率').qty, '#Tips') - // }) - - autoUpdate(url+"/selectOrderRateInfoTatle", INTERVAL, data => { - Tips(data.find(val => val.name === '订单数量').qty, data.find(val => val.name === '完成数量').qty, data.find(val => val.name === '清单率').qty, '#Tips') - }) - - // 当日订单入库统计 - autoUpdate(url + "/zhou_selectQaItemInfo", INTERVAL, data => { - let arr = [0, 0, 0, 0, 0, 0] - let yDataOne = [...(data.find(val => val.code == '内胆检漏')?.list.map(val => val.rate) || []), ...arr] - let yDataTwo = [...(data.find(val => val.code == '安全检测')?.list.map(val => val.rate) || []), ...arr] - let yDataThree = [...(data.find(val => val.code == '成品检漏')?.list.map(val => val.rate) || []), ...arr] - let yDataFour = [...(data.find(val => val.code == '测温性能')?.list.map(val => val.rate) || []), ...arr] - let yDataFive = [...(data.find(val => val.code == '成品外观')?.list.map(val => val.rate) || []), ...arr] - multipleBrokenLineAreaDiagramTwo( - { - xData: data.find(val => val.code == '横坐标')?.list.map(val => val.name), - yDataOne: yDataOne, - yDataTwo: yDataTwo, - yDataThree: yDataThree, - yDataFour: yDataFour, - yDataFive: yDataFive, - yDataOneName: '内胆检漏', - yDataTwoName: '安全检测', - yDataThreeName: '成品检漏', - yDataFourName: '测温性能', - yDataFiveName: '成品外观', - }, document.getElementById("equipmentPower")) - // pieChart(data.map((val, index) => { - // if (index == 0 ) { - // return { - // name: val.type, - // value: val.qty, - // itemStyle: { - // color: 'red', - // } - // } - // } - // if (index == 1) { - // return { - // name: val.type, - // value: val.qty, - // itemStyle: { - // color: 'yellow', - // } - // } - // } - // return { - // name: val.type, - // value: val.qty, - // } - // - // } - // ), document.getElementById("equipmentPower")); - }) autoUpdate(url + "/selectProductInStore", INTERVAL, data => { let list = data.map(val => val.list) - let yDataOne = [] - let yDataTwo = [] - list.forEach(val => { - yDataOne.push(val.find(val => val.name == '计划')?.qty || 0) - yDataTwo.push(val.find(val => val.name == '产量')?.qty || 0) - }) - - total(yDataTwo.reduce((val1,val2) => val1 + val2 , 0),'#total') multipleVerticalBarChartTwo({ xName: data.map(val => val.code), yDataOne: yDataOne, yDataOneName: '计划', yDataTwo: yDataTwo, yDataTwoName: "产量", - }, document.getElementById("topLeft"), -20) + }, document.getElementById("satisfaction"), -20) }) @@ -149,23 +53,6 @@ const moduleTitle = () => { $('body').append(html) } -const safe = (el) => { - const html = ` - ${new Date().getFullYear().toString()}年连续安全生产天数 - ${today()} - 智能冷柜互联工厂 - ` - $(el).html(html) -} - - -const Tips = (val1 = 0, val2 = 0, val3 = 0, el) => { - const html = ` - 订单数量:${val1}  完成数量:${val2}  清单率:${val3}% - ` - $(el).html(html) -} - const total = (val1 = 0, el) => { const html = ` 合计:${val1} 台 diff --git a/ruoyi-admin/src/main/resources/templates/broad/month.html b/ruoyi-admin/src/main/resources/templates/broad/month.html index 6b7f83c..acd97a2 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/month.html +++ b/ruoyi-admin/src/main/resources/templates/broad/month.html @@ -26,27 +26,10 @@ -
-
-
-
- -
- - -
- - -
- - - -
- - -
+ +