zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>成型车间监控</title>
<link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="上海兰宝数据采集系统,卷接包数据采集" />
<meta name="author" content="leejean" />
<jsp:include page="../../initlib/initAll.jsp"></jsp:include>
<style type="text/css">
*{font-family: "Microsoft YaHei","微软雅黑","宋体",Arial;}
body{background-color: #E0ECFF}
ul{list-style: none;}
ul li{margin-top:4px;}
/* 顶部信息区域 */
.info_bar {min-width:1330px;width:99.8%;height: 25px;background-color: #E0ECFF;background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%);background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%);
background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%);background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%);background-repeat: repeat-x;filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0);
border-color: #95B8E7;border-width: 1px;border-style: solid;padding: 5px 0px;position: relative;}
.info_bar_botton{height: 20px;}
.info_bar_botton a{width:80px;height: 25px;display: block;float:left;margin-right: 15px;}
.info_bar_botton .run_button{background:url(img/run_botton.png) no-repeat;}
.info_bar_botton .stop_button{background:url(img/stop_button.png) no-repeat;}
.info_bar_botton .interrupt_button{background:url(img/interrupt_button.png) no-repeat;}
.info_bar_info{height: 25px;float:left;margin-left: 15px;}
.info_bar_info span{color:blue;font-weight: bold;}
/* div{border:1px solid red;} */
.fl{float:left;}
.cb{clear:both;}
.filter_div{width:540px;height:262px;float:left;margin-left:5px;margin-top:5px;;background-color:#858489;border-radius:5px;overflow: hidden;}
.filter_div .filter_img{width:550px;height:106px;background-image: url("img/filter.png")}
.filter_div .filter_info{width:550px;height:152px;background-color:#858489;}
.packer_type{font-weight: bold;
margin: 5px 0px 0px 5px;
/* border: 1px solid red; */
width: 525px;
height: 95px;
/* text-align: center; */
cursor: pointer;}
    .roller_type{font-weight: bold;
margin: 5px 0px 0px 30px;
/* border: 1px solid red; */
height: 95px;
text-align: center;
width: 240px;
cursor: pointer;}
    .roller_status{margin-left:160px;}
    .packer_status{}
    .group_info{width:240px;text-align:center}
    .group_info span{font-size:24px;font-weight:bold;line-height:50px;}
    .roller_info{width:190px;}
    .center_info{width:150px;text-align:center;}
    .packer_info{width:190px;}
     ul li{ font-size: 14px;}
</style>
<script type="text/javascript">
    //加载机组信息
    $.post("${pageContext.request.contextPath}/pms/isp/initFilterGroups.do",function(rows){
        var html = "";
        for(var i=0;i<rows.length;i++){
            html += getFilterDiv(rows[i]);
        }
        $("#content").html(html);
        initWorkOrderInfo();
    },"JSON");
    //加载机组工单信息
    function initWorkOrderInfo(){
        //type 1:卷烟机工单2:包装机工单3:封箱机工单4:成型机工
        $.post("${pageContext.request.contextPath}/pms/isp/initWorkOrderInfo.do",{type:4},function(rows){
            if(!rows){
                return;
            }
            for(var i=0;i<rows.length;i++){
                var data = rows[i];
                $("#teamName"+data.eqpcode).html(data.teamName);
                $("#matName"+data.eqpcode).html(data.matName);
                $("#planQty"+data.eqpcode).html(data.qty);
            }
        },"JSON");
    }
    function getFilterDiv(data){
          var div = "<div class='filter_div'>"+
                    "                    <div class='filter_img'>"+
                    "                <div class='fl packer_type' title='点击查看详情' onclick='gotoDetJsp("+data.code+");' id='type"+data.code+"' name="+data.name+">"+data.type+"</div>"+
                    "            </div>"+
                    "            <div class='filter_info'>"+
                    "                <div>"+
                    "                    <div  class='fl roller_status'>"+
                    "                        <img id='status_img"+data.code+"' src='img/cut.gif'/>"+
                    "                    </div>"+
                    "                    <div class='fl group_info'>"+
                    "                        <span>"+data.name+"</span>"+
                    "                    </div>"+
                    "                </div>"+
                    "                <div class='cb'>"+
                    "                    <div class='fl roller_info' id='data1"+data.code+"'>"+
                    "                        <ul>"+
                    "                            <li><span>状态:</span><span class='run'></span></li>"+
                    "                            <li><span>车速:</span><span class='speed'>0</span>&nbsp;<span>支/分钟</span></li>"+
                    "                            <li><span>产量:</span><span class='qty'>0</span>&nbsp;<span>万支</span></li>"+
                    "                        </ul>"+
                    "                    </div>"+
                    "                    <div class='fl center_info'>"+
                    "                        <ul>"+
                    "                            <li><span id='teamName"+data.code+"'>-</span></li>"+
                    "                            <li><span id='matName"+data.code+"'>-</span></li>"+
                    "                            <li><span style='font-size:12px'>计划产量:</span><span id='planQty"+data.code+"'>0</span>&nbsp;<span style='font-size:12px'>万支</span></li>"+
                    "                        </ul>"+
                    "                    </div>"+
                    "                    <div class='fl packer_info' id='data2"+data.code+"'>"+
                    "                        <ul>"+
                    "                            <li><span>运行时间:</span><span class='runTime'>0</span>&nbsp;<span>分</span></li>"+
                    "                            <li><span>停机时间:</span><span class='stopTime'>0</span>&nbsp;<span>分</span></li>"+
                    "                            <li><span>停机次数:</span><span class='stopTimes'>0</span>&nbsp;<span>次</span></li>"+
                    "                        </ul>"+
                    "                    </div>"+
                    "                </div>"+
                    "            </div>"+
                    "    </div> ";
            return div;
    }
    function gotoDetJsp(code){
        //window.location="${pageContext.request.contextPath}/pms/isp/gotoDetJsp.do?code="+code+"&type="+($("#type"+code).html());
        var type=$("#type"+code).html().toUpperCase();
        // var url=type+".jsp";
        var url= "forming_detail.jsp";
        window.open("${pageContext.request.contextPath}/pms/isp/"+url+"?code="+code+"&type="+type,"myWindow");
    }
    function getAllFilterDatas(){
        //发送请求让WCT发来数据
        <%--$.post("${pageContext.request.contextPath}/isp/getAllFromWCT.do",{"machineType":3,"code":-4,"type":1});--%>
        <%--$.post("${pageContext.request.contextPath}/isp/getAllData.do",{"machineType":3,"type":1},function(datas){--%>
        $.post("${pageContext.request.contextPath}/pms/isp/getAllFilterDatas.do",function(datas){
            if(datas.success){
                datas=datas.msg;
                datas=$.parseJSON(datas);
                // console.info(datas);
                for(var i=0;i<datas.length;i++){
                    var data = datas[i];
                    var code= data.code;
                    var online = data.online;
                    var speed = data.speed;
                    var runTime = data.runTime;
                    var stopTime = data.stopTime;
                    var stopTimes = data.stopTimes;
                    var qty = data.qty;
                    $("#data1"+code+" .run").html(getRunStatus(code,online,speed));
                    $("#data1"+code+" .qty").html(qty/10000);
                    $("#data1"+code+" .speed").html(speed);
                    $("#data2"+code+" .runTime").html((runTime/60).toFixed(2));
                    $("#data2"+code+" .stopTime").html((stopTime/60).toFixed(2));
                    $("#data2"+code+" .stopTimes").html(stopTimes);
                }
            }
        },"JSON");
    }
    function getRunStatus(code,online,speed){
        // 是否有工单
        // var teamName = $("#teamName"+code).html();
        // if(online ){
        //     if(online/1==0&&speed<0){
        //         $("#status_img"+code).attr("src","img/stop.gif");
        //         return "运行停止";
        //     }else{
        //         $("#status_img"+code).attr("src","img/run.gif");
        //         return "运行";
        //     }
        // }else{
        //     $("#status_img"+code).attr("src","img/cut.gif");
        //     return "网络断开";
        // }
 
        if(online&&online=="1"){
            if(speed>0){
                $("#status_img"+code).attr("src","img/run.gif");
                return "运行";
 
            }else{
                $("#status_img"+code).attr("src","img/stop.gif");
                return "运行停止";
            }
        }else{
            $("#status_img"+code).attr("src","img/cut.gif");
            return "网络断开";
        }
 
    }
 
    window.setTimeout(" getAllFilterDatas()",500);
    window.setInterval("getAllFilterDatas()",6000);
 
</script>
</head>
<body>
<div class="info_bar" id="ccc">
    <div class="info_bar_botton" style="padding-left: 6px;">
        <a class="run_button" href="#"></a>
        <a class="stop_button" href="#"></a>
        <a class="interrupt_button" href="#"></a>
    </div>
</div>
<div id="content">
<!--     <div class='filter_div'>
            <div class='filter_img'>
                <div class='fl packer_type' title="点击查看详情">ZB45</div>
            </div>
            <div class='filter_info'>
                <div>
                    <div  class='fl roller_status'>
                        <img src='img/cut.gif'/>
                    </div>
                    <div class='fl group_info'>
                        <span>1号卷包机组</span>
                    </div>
                </div>
                <div class='cb'>
                    <div class='fl roller_info'>
                        <ul>
                            <li><span>状态:</span><span>运行</span></li>
                            <li><span>车速:</span><span>400</span>&nbsp;<span>包/分钟</span></li>
                            <li><span>产量:</span><span>40</span>&nbsp;<span>箱</span></li>
                        </ul>
                    </div>
                    <div class='fl center_info'>
                        <ul>
                            <li><span >班组</span></li>
                            <li><span >牌号</span></li>
                            <li><span>计划产量:</span><span id='planQty"+data.rCode+"'></span>&nbsp;<span>箱</span></li>
                        </ul>
                    </div>
                    <div class='fl packer_info'>
                        <ul>
                            <li><span>运行时间:</span><span>700</span>&nbsp;<span>分</span></li>
                            <li><span>停机时间:</span><span>700</span>&nbsp;<span>分</span></li>
                            <li><span>停机次数:</span><span>40</span>&nbsp;<span>次</span></li>
                        </ul>
                    </div>
                </div>
            </div>
    </div>  -->
</div>
</body>
</html>