diff --git a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java index 2b691ff..e09e393 100644 --- a/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java +++ b/productionboard/src/main/java/com/productionboard/controller/FoamBoxController.java @@ -53,6 +53,12 @@ public class FoamBoxController { case 1: mmap.put("positionId",1); break; + case 2: + mmap.put("positionId",2); + break; + case 3: + mmap.put("positionId",3); + break; default: break; } diff --git a/productionboard/src/main/resources/static/img/foamBox/foamBoxbackground2.jpg b/productionboard/src/main/resources/static/img/foamBox/foamBoxbackground2.jpg new file mode 100644 index 0000000..ce5c9b3 Binary files /dev/null and b/productionboard/src/main/resources/static/img/foamBox/foamBoxbackground2.jpg differ diff --git a/productionboard/src/main/resources/static/js/foamBox/index.js b/productionboard/src/main/resources/static/js/foamBox/index.js index a511d5b..750cf41 100644 --- a/productionboard/src/main/resources/static/js/foamBox/index.js +++ b/productionboard/src/main/resources/static/js/foamBox/index.js @@ -9,7 +9,11 @@ $(() => { //设备运行状态 $.getJSON(`/foamBox/getRunStatusJson?ids=${ids}`, function (result) { - deviceStatus(result); + if (ids === 0 || ids === 1){ + deviceStatus(result); + }else{ + deviceStatus2(result) + } }); // deviceStatus([1,1,1,1,1,1]); @@ -137,3 +141,14 @@ const deviceStatus = (statusArray) => { } +const deviceStatus2 = (statusArray) => { + let info = ` + + + + +`; + + $(".foamingLineRunStatus table tr").append(info); + +} diff --git a/productionboard/src/main/resources/templates/foamBox/index.html b/productionboard/src/main/resources/templates/foamBox/index.html index af0ee80..36e5775 100644 --- a/productionboard/src/main/resources/templates/foamBox/index.html +++ b/productionboard/src/main/resources/templates/foamBox/index.html @@ -1,12 +1,12 @@ - + 发泡和发泡线数据展示平台 - - - + + + @@ -64,6 +64,18 @@ }); const ids = [[${positionId}]]; + if (ids === 2 || ids === 3) { + console.log($('body')) + $('body').css( + { + backgroundColor: 'aquamarine', + background: 'url(../../img/foamBox/foamBoxbackground2.jpg)', + backgroundPosition: 'center center', + backgroundRepeat: 'no-repeat', + backgroundAttachment: 'fixed', + backgroundSize: '100% 100%', + }) + } // let info = ` //