diff --git a/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java new file mode 100644 index 0000000..359b6fc --- /dev/null +++ b/productionboard/src/main/java/com/productionboard/controller/AluminumTtankController.java @@ -0,0 +1,79 @@ +package com.productionboard.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * 铝内胆可视化看板 + * @author WenJY + * @date 2022年04月20日 14:40 + */ +@Controller +@RequestMapping("/aluminumTank") +public class AluminumTtankController { + + private String prefix = "aluminumTank/index"; + + @GetMapping() + public String index() + { + return prefix; + } + + /** + * 根据型号统计产量 + * + * @author WenJY + * @date 2022/4/20 10:15 + * @return java.lang.String + */ + @GetMapping("/getStatisticalOutputByModel") + @ResponseBody + public String getStatisticalOutputByModel() { + String info = + "{\n" + + "\t\"datas\":[\n" + + " {\"ranking\": 1,\"station\":\"SC227\",\"value\": 199999},\n" + + " {\"ranking\": 2,\"station\":\"SC228\",\"value\": 104970},\n" + + " {\"ranking\": 3,\"station\":\"SC229\",\"value\": 29034},\n" + + " {\"ranking\": 4,\"station\":\"SC223\",\"value\": 23489},\n" + + " {\"ranking\": 5,\"station\":\"SC224\",\"value\": 18203}\n" + + " ],\n" + + "\t\"plan\":[290000, 290000, 290000, 290000, 290000, 290000]\n" + + "}"; + return info; + } + + /** + * 库存 统计 + * + * @author WenJY + * @date 2022/4/20 10:16 + * @return java.lang.String + */ + @GetMapping("/getInventoryStatistics") + @ResponseBody + public String getInventoryStatistics() { + String info = + "{\n" + + "\t\"datas\":[\n" + + " {\n" + + " \"name\": \"SC528\",\n" + + " \"value\": 175.17\n" + + " },\n" + + " {\n" + + " \"name\": \"SC529\",\n" + + " \"value\": 148.35\n" + + " },\n" + + " {\n" + + " \"name\": \"SC327\",\n" + + " \"value\": 95.36\n" + + " }\n" + + " ]\n" + + "}"; + return info; + } + +} diff --git a/productionboard/src/main/resources/static/css/aluminumTank/style.css b/productionboard/src/main/resources/static/css/aluminumTank/style.css new file mode 100644 index 0000000..ea5bd5f --- /dev/null +++ b/productionboard/src/main/resources/static/css/aluminumTank/style.css @@ -0,0 +1,35 @@ +body { + background-color: aquamarine; + background: url(../../img/aluminumTank/aluminumTankbackground.jpg); + background-position: center center; + background-repeat: no-repeat; + background-attachment: fixed; + background-size: 100% 100%; +} + +.statisticalOutputByModel{ + border: 1px solid red; + position: absolute; + width: 45.5%; + height: 32%; + top: 23%; + left: 3.5%; +} + +.inventoryStatistics{ + border: 1px solid red; + position: absolute; + width: 45.5%; + height: 32%; + top: 23%; + right: 3.5%; +} + +.hourlyOutputStatistics{ + border: 1px solid red; + position: absolute; + width: 93%; + height: 32%; + bottom: 4.5%; + left: 3.5%; +} \ No newline at end of file diff --git a/productionboard/src/main/resources/static/img/aluminumTank/aluminumTankbackground.jpg b/productionboard/src/main/resources/static/img/aluminumTank/aluminumTankbackground.jpg new file mode 100644 index 0000000..69773f7 Binary files /dev/null and b/productionboard/src/main/resources/static/img/aluminumTank/aluminumTankbackground.jpg differ diff --git a/productionboard/src/main/resources/static/js/aluminumTank/index.js b/productionboard/src/main/resources/static/js/aluminumTank/index.js new file mode 100644 index 0000000..ca890fd --- /dev/null +++ b/productionboard/src/main/resources/static/js/aluminumTank/index.js @@ -0,0 +1,18 @@ +$(()=>{ + //班组统计 + onDutyPlan(1234,1202,33); + + //按型号统计产量 + $.getJSON('/aluminumTank/getStatisticalOutputByModel', function (result) { + horizontalBarChart(result,document.getElementById("statisticalOutputByModel")); + }); + + //小时产量 + bluePolygonHistogram(null,document.getElementById("hourlyOutputStatistics")); + + //库存统计 + $.getJSON('/aluminumTank/getInventoryStatistics', function (result) { + threeDimensionalCylindrical(result,document.getElementById("inventoryStatistics")); + }); +}) + diff --git a/productionboard/src/main/resources/static/js/common/echarts.common.js b/productionboard/src/main/resources/static/js/common/echarts.common.js index 755ba60..05076de 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -835,8 +835,8 @@ const multipleBrokenLineAreaDiagram = (res,ids) =>{ $(window).resize(mycharts.resize); } -//多边形柱状图 -const polygonalHistogram = (res, ids) =>{ +//绿色多边形柱状图 +const greenPolygonalHistogram = (res, ids) =>{ let mycharts = echarts.init(ids); let option = { @@ -1021,8 +1021,8 @@ const polygonalHistogram = (res, ids) =>{ $(window).resize(mycharts.resize); } -//多边形柱状图-2 -const polygonalHistogram2 = (res, ids) =>{ +//蓝色多边形柱状图 +const bluePolygonHistogram = (res, ids) =>{ let mycharts = echarts.init(ids); let option = { @@ -1051,7 +1051,7 @@ const polygonalHistogram2 = (res, ids) =>{ left: 20, right: 20, bottom: 10, - top: 40, + top: 20, }, xAxis: { axisLabel: { @@ -1077,18 +1077,19 @@ const polygonalHistogram2 = (res, ids) =>{ show: true, }, data: [ - "0点~2点", - "3点~5点", - "6点~8点", - "0点~2点", - "3点~5点", - "6点~8点", - "0点~2点", - "3点~5点", + "7点", + "8点", + "9点", + "10点", + "11点", + "12点", + "13点", + "14点", ], type: "category", }, yAxis: { + show: false, axisLabel: { color: "#c0c3cd", fontSize: 14, @@ -1098,10 +1099,10 @@ const polygonalHistogram2 = (res, ids) =>{ color: "#384267", width: 1, }, - show: true, + show: false, }, splitLine: { - show: true, + show: false, lineStyle: { color: "#384267", type: "dashed", @@ -1113,7 +1114,7 @@ const polygonalHistogram2 = (res, ids) =>{ width: 1, type: "dashed", }, - show: true, + show: false, }, name: "", }, diff --git a/productionboard/src/main/resources/static/js/preassemble/index.js b/productionboard/src/main/resources/static/js/preassemble/index.js index 42268b9..cf5db0c 100644 --- a/productionboard/src/main/resources/static/js/preassemble/index.js +++ b/productionboard/src/main/resources/static/js/preassemble/index.js @@ -7,7 +7,7 @@ $(()=>{ }); //小时产量 - polygonalHistogram(null,document.getElementById("hourlyOutputStatistics")); + greenPolygonalHistogram(null,document.getElementById("hourlyOutputStatistics")); //库存统计 $.getJSON('/tankShell/getInventoryStatistics', function (result) { diff --git a/productionboard/src/main/resources/templates/aluminumTank/index.html b/productionboard/src/main/resources/templates/aluminumTank/index.html new file mode 100644 index 0000000..991c19f --- /dev/null +++ b/productionboard/src/main/resources/templates/aluminumTank/index.html @@ -0,0 +1,29 @@ + + +
+ +