|
|
@@ -34,29 +34,28 @@
|
|
|
font-weight: bold;
|
|
|
text-align: center;
|
|
|
}
|
|
|
- .oprnobox-header .oprno-num{
|
|
|
- width: 178px;
|
|
|
- /*background-color: #00F7DE;*/
|
|
|
+ .oprnobox-header .oprno-name{
|
|
|
+ width: 25%;
|
|
|
float: left;
|
|
|
}
|
|
|
- .oprnobox-header .oprno-title{
|
|
|
- width: 397px;
|
|
|
- /*background-color: red;*/
|
|
|
+ .oprnobox-header .oprno-plan{
|
|
|
+ width: 15%;
|
|
|
float: left;
|
|
|
}
|
|
|
- .oprnobox-header .oprno-classes{
|
|
|
- width: 180px;
|
|
|
- /*background-color: green;*/
|
|
|
+ .oprnobox-header .oprno-actual{
|
|
|
+ width: 15%;
|
|
|
float: left;
|
|
|
}
|
|
|
- .oprnobox-header .oprno-day{
|
|
|
- width: 180px;
|
|
|
- /*background-color: salmon;*/
|
|
|
+ .oprnobox-header .oprno-ng{
|
|
|
+ width: 15%;
|
|
|
float: left;
|
|
|
}
|
|
|
-
|
|
|
- .oprno-val{
|
|
|
- width: 161px;
|
|
|
+ .oprnobox-header .oprno-rate{
|
|
|
+ width: 15%;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+ .oprnobox-header .oprno-quality{
|
|
|
+ width: 15%;
|
|
|
float: left;
|
|
|
}
|
|
|
|
|
|
@@ -65,63 +64,44 @@
|
|
|
height: 80px;
|
|
|
line-height: 80px;
|
|
|
overflow: hidden;
|
|
|
- font-size: 36px;
|
|
|
+ font-size: 28px;
|
|
|
text-align: center;
|
|
|
font-family: FZChaoCuHei-M10S;
|
|
|
font-weight: 400;
|
|
|
color: #FFFFFF;
|
|
|
- }
|
|
|
- .oprnobox-list .oprno-num{
|
|
|
- background-image: url("${ctxStatic}/screen/imgs/lbg.png");
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- float: left;
|
|
|
- width: 178px;
|
|
|
- height: 80px;
|
|
|
- }
|
|
|
- .oprnobox-list .oprno-right{
|
|
|
- position: relative;
|
|
|
- overflow: hidden;
|
|
|
background-image: url("${ctxStatic}/screen/imgs/rbg.png");
|
|
|
background-size: 100% 100%;
|
|
|
background-repeat: no-repeat;
|
|
|
- float: right;
|
|
|
- /*width: 752px;*/
|
|
|
- width: 1692px;
|
|
|
+ }
|
|
|
+ .oprnobox-list .oprno-name{
|
|
|
+ width: 25%;
|
|
|
height: 80px;
|
|
|
+ float: left;
|
|
|
}
|
|
|
- .oprnobox-list .oprno-right .oprno-title{
|
|
|
- width: 392px;
|
|
|
+ .oprnobox-list .oprno-plan{
|
|
|
+ width: 15%;
|
|
|
height: 80px;
|
|
|
float: left;
|
|
|
}
|
|
|
- .oprnobox-list .oprno-right .oprno-classes{
|
|
|
- width: 180px;
|
|
|
+ .oprnobox-list .oprno-actual{
|
|
|
+ width: 15%;
|
|
|
height: 80px;
|
|
|
float: left;
|
|
|
}
|
|
|
- .oprnobox-list .oprno-right .oprno-day{
|
|
|
- width: 180px;
|
|
|
+ .oprnobox-list .oprno-ng{
|
|
|
+ width: 15%;
|
|
|
+ height: 80px;
|
|
|
float: left;
|
|
|
+ }
|
|
|
+ .oprnobox-list .oprno-rate{
|
|
|
+ width: 15%;
|
|
|
height: 80px;
|
|
|
+ float: left;
|
|
|
}
|
|
|
-
|
|
|
- .dangerbox{
|
|
|
- position: absolute;
|
|
|
- z-index: 100000;
|
|
|
- bottom: 25px;
|
|
|
- left: 25px;
|
|
|
- width:1880px;
|
|
|
- height:70px;
|
|
|
- line-height: 70px;
|
|
|
- text-align: center;
|
|
|
- background: rgba(255,0,0,0.2);
|
|
|
- border: 1px solid #FF0000;
|
|
|
- color: #D13D3E;
|
|
|
- font-family: Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- font-size: 34px;
|
|
|
- display: none;
|
|
|
+ .oprnobox-list .oprno-quality{
|
|
|
+ width: 15%;
|
|
|
+ height: 80px;
|
|
|
+ float: left;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
@@ -136,52 +116,27 @@
|
|
|
|
|
|
<div class="oprnobox box1">
|
|
|
<div class="oprnobox-header">
|
|
|
- <div class="oprno-num">工位</div>
|
|
|
- <div class="oprno-title">工位名称</div>
|
|
|
- <div class="oprno-val">当班/当日产值</div>
|
|
|
- <div class="oprno-val">5308产值</div>
|
|
|
- <div class="oprno-val">5305产值</div>
|
|
|
- <div class="oprno-val">8302产值</div>
|
|
|
- <div class="oprno-val">8301产值</div>
|
|
|
- <div class="oprno-val">7939产值</div>
|
|
|
- <div class="oprno-val">7933产值</div>
|
|
|
- <div class="oprno-val">印尼产值</div>
|
|
|
+ <div class="oprno-name">工序名称</div>
|
|
|
+ <div class="oprno-plan">计划投产数</div>
|
|
|
+ <div class="oprno-actual">实际产出数</div>
|
|
|
+ <div class="oprno-ng">不良数</div>
|
|
|
+ <div class="oprno-rate">达成率(%)</div>
|
|
|
+ <div class="oprno-quality">合格率(%)</div>
|
|
|
</div>
|
|
|
|
|
|
<div id="numbox">
|
|
|
<!--<div class="oprnobox-list">
|
|
|
- <div class="oprno-num">OP060</div>
|
|
|
- <div class="oprno-right">
|
|
|
- <div class="oprno-title">后梁FSW</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="oprnobox-list">
|
|
|
- <div class="oprno-num">OP060</div>
|
|
|
- <div class="oprno-right">
|
|
|
- <div class="oprno-title">后梁FSW</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- <div class="oprno-val">0/0</div>
|
|
|
- </div>
|
|
|
+ <div class="oprno-name">CMT</div>
|
|
|
+ <div class="oprno-plan">180</div>
|
|
|
+ <div class="oprno-actual">180</div>
|
|
|
+ <div class="oprno-ng">0</div>
|
|
|
+ <div class="oprno-rate">100%</div>
|
|
|
+ <div class="oprno-quality">100%</div>
|
|
|
</div>-->
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
- <div class="dangerbox" id="dangerbox">
|
|
|
-<!-- 2025-05-12 11:23:30 【OP060A-后梁FSW】异常报警:000020015308-0100101425042600115-->
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -200,7 +155,6 @@
|
|
|
changeZoom();
|
|
|
|
|
|
getData();
|
|
|
- getAlarmData();
|
|
|
|
|
|
setInterval(function () {
|
|
|
getData();
|
|
|
@@ -208,7 +162,6 @@
|
|
|
|
|
|
setInterval(function () {
|
|
|
formatData();
|
|
|
- getAlarmData();
|
|
|
},1000*10);
|
|
|
});
|
|
|
|
|
|
@@ -221,67 +174,55 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- function getAlarmData() {
|
|
|
- let url = "/js/a/mes/mesProduct/alarmData";
|
|
|
- $.post(url,function (ret) {
|
|
|
- console.log(ret); //2025-05-12 11:23:30 【OP060A-后梁FSW】异常报警:000020015308-0100101425042600115
|
|
|
- if(ret.result == "true"){
|
|
|
- str = ret.data.createDate+" 【"+ret.data.oprno+"-"+ret.data.title+"】"+ret.data.remark+":"+ret.data.sn;
|
|
|
- $("#dangerbox").show().html(str)
|
|
|
- }else{
|
|
|
- $("#dangerbox").hide().html("");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
function formatData(){
|
|
|
let str = '';
|
|
|
- if(curIdx == 0){
|
|
|
- curIdx = 1;
|
|
|
- let i = 0;
|
|
|
- for (let o in lists) {
|
|
|
- if(i < 9){
|
|
|
- str += '<div class="oprnobox-list">';
|
|
|
- str += '<div class="oprno-num">'+lists[o].oprno+'</div>';
|
|
|
- str += '<div class="oprno-right">';
|
|
|
- str += '<div class="oprno-title">'+lists[o].title+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shiftCount+'/'+lists[o].dayCount+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift5308+'/'+lists[o].day5308+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift5305+'/'+lists[o].day5305+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift8302+'/'+lists[o].day8302+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift8301+'/'+lists[o].day8301+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift7939+'/'+lists[o].day7939+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift7933+'/'+lists[o].day7933+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shiftyn+'/'+lists[o].dayyn+'</div>';
|
|
|
- str += '</div>';
|
|
|
- str += '</div>';
|
|
|
+ const pageSize = 7; // 每页显示7条
|
|
|
+ const totalCount = Object.keys(lists).length;
|
|
|
+ const totalPages = Math.ceil(totalCount / pageSize);
|
|
|
+
|
|
|
+ // 计算当前页的起始和结束索引
|
|
|
+ const startIdx = curIdx * pageSize;
|
|
|
+ const endIdx = Math.min(startIdx + pageSize, totalCount);
|
|
|
+
|
|
|
+ let i = 0;
|
|
|
+ for (let o in lists) {
|
|
|
+ if(i >= startIdx && i < endIdx){
|
|
|
+ let item = lists[o];
|
|
|
+
|
|
|
+ // 计算不良数
|
|
|
+ let ngCount = (item.dayCountTotal || 0) - (item.dayCountOk || 0);
|
|
|
+
|
|
|
+ // 计算达成率
|
|
|
+ let achieveRate = '0';
|
|
|
+ if(item.planCount && item.planCount > 0){
|
|
|
+ achieveRate = ((item.dayCountTotal || 0) / item.planCount * 100).toFixed(1);
|
|
|
}
|
|
|
- i++;
|
|
|
- }
|
|
|
- }else{
|
|
|
- curIdx = 0;
|
|
|
- let i = 0;
|
|
|
- for (let o in lists) {
|
|
|
- if(i >= 9){
|
|
|
- str += '<div class="oprnobox-list">';
|
|
|
- str += '<div class="oprno-num">'+lists[o].oprno+'</div>';
|
|
|
- str += '<div class="oprno-right">';
|
|
|
- str += '<div class="oprno-title">'+lists[o].title+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shiftCount+'/'+lists[o].dayCount+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift5308+'/'+lists[o].day5308+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift5305+'/'+lists[o].day5305+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift8302+'/'+lists[o].day8302+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift8301+'/'+lists[o].day8301+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift7939+'/'+lists[o].day7939+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shift7933+'/'+lists[o].day7933+'</div>';
|
|
|
- str += '<div class="oprno-val">'+lists[o].shiftyn+'/'+lists[o].dayyn+'</div>';
|
|
|
- str += '</div>';
|
|
|
- str += '</div>';
|
|
|
+
|
|
|
+ // 计算合格率
|
|
|
+ let qualityRate = '100';
|
|
|
+ if(item.dayCountTotal && item.dayCountTotal > 0){
|
|
|
+ qualityRate = ((item.dayCountOk || 0) / item.dayCountTotal * 100).toFixed(1);
|
|
|
}
|
|
|
- i++;
|
|
|
+
|
|
|
+ str += '<div class="oprnobox-list">';
|
|
|
+ str += '<div class="oprno-name">'+(item.title || '')+'</div>';
|
|
|
+ str += '<div class="oprno-plan">'+(item.planCount || 0)+'</div>';
|
|
|
+ str += '<div class="oprno-actual">'+(item.dayCountTotal || 0)+'</div>';
|
|
|
+ str += '<div class="oprno-ng">'+ngCount+'</div>';
|
|
|
+ str += '<div class="oprno-rate">'+achieveRate+'%</div>';
|
|
|
+ str += '<div class="oprno-quality">'+qualityRate+'%</div>';
|
|
|
+ str += '</div>';
|
|
|
}
|
|
|
+ i++;
|
|
|
}
|
|
|
+
|
|
|
$("#numbox").html(str);
|
|
|
+
|
|
|
+ // 切换到下一页
|
|
|
+ curIdx++;
|
|
|
+ if(curIdx >= totalPages){
|
|
|
+ curIdx = 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function changeZoom() {
|