From f115f49c29081d907ee010e63398156a4e8b7854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 6 Jun 2022 16:10:28 +0800 Subject: [PATCH 1/6] 1 --- .../resources/static/css/tankShell/device.css | 54 ++++++++----------- .../resources/static/js/tankShell/device.js | 49 +++++++++++++++++ .../resources/templates/tankShell/device.html | 25 +++++---- .../classes/static/css/tankShell/device.css | 54 ++++++++----------- .../classes/static/js/tankShell/device.js | 49 +++++++++++++++++ .../classes/templates/tankShell/device.html | 25 +++++---- 6 files changed, 174 insertions(+), 82 deletions(-) diff --git a/productionboard/src/main/resources/static/css/tankShell/device.css b/productionboard/src/main/resources/static/css/tankShell/device.css index 0c17a6e..9b0dfa3 100644 --- a/productionboard/src/main/resources/static/css/tankShell/device.css +++ b/productionboard/src/main/resources/static/css/tankShell/device.css @@ -72,47 +72,39 @@ body { color:#A5E3B1; } -.theEnergyConsumptionContrast { - border: 1px solid red; +.OEEStatistics { + border: 0px solid red; position: absolute; - width: 24.1%; - height: 21%; - top: 44%; - left: 3.3%; + width: 35%; + height: 26%; + top: 71.5%; + left: 36%; } -.lossStatistics { - border: 1px solid yellowgreen; +.equipmentFailure { + border: 0px solid red; position: absolute; - width: 24%; - height: 21%; - top: 44%; - right: 3.3%; + width: 28%; + height: 22%; + top: 75%; + left: 70%; } -.deviceInfoTable { - border: 1px solid #6ACBFE; +.loss { + border: 0px solid red; position: absolute; - width: 33%; - height: 21%; - bottom: 5%; - left: 3.3%; + width: 28%; + height: 25%; + top: 41%; + left: 71%; } -.oeeStatistics { - border: 1px solid cornflowerblue; +.productionPlan { position: absolute; + border: 0px solid red; width: 33%; height: 21%; - bottom: 5%; - left: 38%; -} - -.faultRank { - border: 1px solid bisque; - position: absolute; - width: 24%; - height: 21%; - bottom: 5%; - right: 3.3%; + top: 73.5%; + left: 3.5%; + font-size: 9%; } \ No newline at end of file diff --git a/productionboard/src/main/resources/static/js/tankShell/device.js b/productionboard/src/main/resources/static/js/tankShell/device.js index 6fc6661..6791c6c 100644 --- a/productionboard/src/main/resources/static/js/tankShell/device.js +++ b/productionboard/src/main/resources/static/js/tankShell/device.js @@ -1,4 +1,53 @@ $(() => { + + //设备OEE统计 + OEEStatistics(null, document.getElementById("OEEStatistics")); + + //设备故障排名 + $.getJSON('/tankShell/getStatisticalOutputByModel', function (result) { + equipmentFailure(result, document.getElementById("equipmentFailure")); + }); + + //loss + $.getJSON('/tankShell/getInventoryStatistics', function (result) { + loss(result, document.getElementById("loss")); + }); + + //生产计划 + $.ajax({ + url: '/storage/getProductionPlan', + type: 'GET', + dataType: 'JSON', + success: function (res) { + let Res = res + Res.data.forEach(val => { + val[0] = 'sc-228NE' + val[1] = '431' + val[2] = '0' + val[3] = '431' + val[4] = '0%' + }); + Res.header = ['型号', '计划数', '完成数', '差异数', '执行进度'] + dynamicTable({ + el: '#productionPlan', + rowNum: 5, + timeout: 0, + header: Res.header, + data: Res.data, + index: false, + fontColor: '#B4B7BF ', + indexBGC: '#86F3FF', + headerBGC: 'rgba(8,36,75,0.2)', + oddRowBGC: 'rgba(8,36,75,0.2)', + evenRowBGC: 'rgba(6,25,57,0.2)', + colWidth: ['100%', '100%', '100%', '100%', '100%'] + }); + }, + error: function (e) { + console.log(e) + } + }); + /*数据信息*/ const statusArray = [0, 0, 0, 0, 0]; dataInformationFunction(statusArray); diff --git a/productionboard/src/main/resources/templates/tankShell/device.html b/productionboard/src/main/resources/templates/tankShell/device.html index 8c15b52..5713887 100644 --- a/productionboard/src/main/resources/templates/tankShell/device.html +++ b/productionboard/src/main/resources/templates/tankShell/device.html @@ -8,6 +8,7 @@ +
@@ -23,16 +24,20 @@ - - - - - - - - - - + + + + + + + + + + + + + +