廖井涛
2025-05-27 d687ff755f0f3022dcd1f57a03104b0e91536ab3
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
245
246
247
248
249
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
 
<html>
<head>
<script src="tb.js"></script>
<script src="jq.js"></script>
<script src="${ctx}/static/js/ng/tb.js" type="text/javascript"></script>
 
<style>
.table>tbody>tr>td {
    vertical-align: middle;
    /* content:middle; */
     text-align: center;
    font-weight: bold;
    font-size:16px;
    /* border: 1px solid green; */
}
 
.table>thead>tr>th{
    font-weight: bold;
    font-size:20px;
     text-align: center;
}
.table tbody tr:nth-child(1){
    background:#00FF7F;
}
h1{
 display : inline;
}
</style>
 
<script>
 
var rTime = 5000;//自动刷新间隔时间 单位:毫秒
    <%String groups = request.getParameter("group");
            if (groups == null)
                groups = "null";
            out.print("var group=" + groups + ";\r\n");%>
 
</script>
 
<title>折弯-打胶</title>
</head>
<body>
    <div class="content-wrapper" id="bBody">
        <!-- 上片位信息 -->
        <div>
            <section class="content container-fluid">
                <div class="box" style="overflow: auto;">
                    <div class="box-header"></div>
                    <!-- /.box-header -->
                    <div style="float:left;width:1100">
                        <canvas id="mycanvas" width="1100" height="700" style="border: 1px solid #d2d6de;">
 
                        </canvas></div>
                    <div style="float:left;width:500" class="box-body no-padding" id="jiaWeiXinXi"></div>
                </div>
            </section>
        </div>
    <script>
        <!-- 玻璃显示 -->
        <%String groupss = request.getParameter("group");
        if (groupss == null)
            groupss = "null";
        out.print("var group=" + groupss + ";\r\n");%>
        function loadglass() {
            $.ajax({
                type : "post",
                dataType : "json",
                data : {
                    yemian:"折弯页面",
                    caozuo:"获取列表",
                    leixing:"查询",
                    line : group
                },
                url : "/gmms2/mesview/data/_Wangang_mangage",
                success : function(data){
                    var canva=document.getElementById('mycanvas');
                    var content=canva.getContext('2d');
                    canva.width=1100;
                    canva.height=700;
                    var g_width=data[0][1];
                    var g_height=data[0][2];
                    var t_width=g_width/2.5;
                    var t_height=g_height/2.5;
                    content.fillStyle='#00BFFF';
                    content.fillRect(((1100-t_width)/2), ((700-t_height)/2), t_width, t_height);
 
                    content.textAlign = 'center'; //文字居中
                    content.font = 'bold 40px Arial'; //文字样式:加粗 16像素 字体Arial
                    content.fillStyle = '#000000'; //字体颜色
                    content.fillText(' '+g_width+' * '+g_height+' ', 550, 600); //fillText里面的可填写的值(文本内容, x坐标, y坐标, 文本最大宽度)   
                },
                error : function(data){
                    /* alert(1); */
                }
            });
        }          
        loadglass();
    </script>
    <!-- 表内容显示 -->
    <script>
        var opt = {
            table : {
                style : "width:500",
                "class" : "table table-striped table-hover"
            },
            columns : [
             {
                name : "合片序号",
                binding : 0,
                //style : "width:8%",
                filter : {}
            }, {
                name : "宽",
                binding : 1,
                //style : "width:5%",
                //    editAble:true,//设置列可编辑
                filter : {}
            //设置列可搜索
            }, {
                name : "高",
                binding : 2,
                //style : "width:8%",
                filter : {}
            }, {
 
                name : "厚",
                binding : 3,
                filter : {}
            }, {
                name : "中空流程卡",
                binding : 4,
                //style : "width:8%",
                filter : {}
            }, {
                name : "片数",
                binding : 5,
                //style : "width:8%",
                filter : {}
            }]
        };
        
        //创建表
        var db = createTable(document.getElementById("jiaWeiXinXi"), opt);
        var a = true;
        var t = false;
        
        //加载表格内容        
        function loadTable() {
            //alert("刷新了");
            $.ajax({
                type : "post",
                dataType : "json",
                data : {
                    yemian:"折弯页面",
                    caozuo:"获取列表",
                    leixing:"查询",
                    line : group
                },
                url : "/gmms2/mesview/data/_Wangang_mangage",
                success : loadSuccess,
                error : loadError
            });
            //a = true;
        }
        loadTable();
 
        function loadSuccess(data) {
            var d = data;
            for (var i = 0; i < d.length; i++) {    
                var s;
            }
            db.update(d);
 
        }
 
        function loadError(data) {
            /*$("#CZ_Msg").modal('toggle');
            $("#cz_Ming").html("获取列表");
            $("#cz_Zhuangtai").html("执行失败,请检查原因!"+data);
            $("#cz_Zhuangtai").attr("style", "color:red;");*/
            
            
            /* if (a == true) {
                setTimeout(loadTable, 5000);
                a = false;
            } */
        }
 
        //InitLoad();
    </script>
 
    <!-- 页面定时刷新 暂停 恢复 -->
    <script>
        var interval = setInterval('loadTable()', rTime);//定时刷新
        var interval2 = setInterval('loadglass()', rTime);//定时刷新
        function refresh() {
            interval = setInterval('loadTable()', rTime);//刷新恢复
            interval2 = setInterval('loadglass()', rTime);//刷新恢复
        }
 
        function stopRefresh() {
            clearInterval(interval);//停止刷新
            interval2 = setInterval('loadglass()', rTime);//刷新恢复
        }
 
        $(function() {
 
            $('#TK-info').on('show.bs.modal', function() {
                stopRefresh();
                //alert("停止刷新1");
            });
 
            $('#QK-info').on('show.bs.modal', function() {
                stopRefresh();
                //alert("停止刷新2");
            });
 
            $('#BJ-Info').on('show.bs.modal', function() {
                stopRefresh();
                //alert("停止刷新3");
            })
            
            $('#TK-info').on('hide.bs.modal', function() {
                refresh();
                //alert("开始刷新1");
            });
 
            $('#QK-info').on('hide.bs.modal', function() {
                refresh();
                //alert("开始刷新2");
            });
 
            $('#BJ-Info').on('hide.bs.modal', function() {
                refresh();
                //alert("开始刷新3");
            })
            
            
        });
    </script>
 
</body>
 
 
</html>