wu
2023-07-26 faf439a3f7859e1582e3d61464ee7d86e1c85427
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="builder.Manager"%>
<%@page import="ng.db.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<link rel="stylesheet" href="../js/static/css/element.css">
<link rel="stylesheet" href="../js/static/css/style.css">
<script src="../js/static/js/vue.js"></script>
<script src="../js/mixins.js"></script>
<script src="../js/echarts.min.js"></script>
<!-- import JavaScript -->
<script src="../js/static/js/element.js"></script>
<script src="../js/static/js/echarts.min.js"></script>
<title>瑕疵线</title>
</head>
<style>
body{
height: 100%;
width:100%;
flex-wrap: nowrap;
}
  .page-scroll {
      height: 100%;
    }
  
    .page-scroll .el-scrollbar__wrap {
      overflow-x: hidden;
    }
 
.el-table__header
{
height:20%;
 
#app{
width:100%;
height:100%;
}
#app1{
width:60%;  
position:absolute;
left:2%;
top:3%;  
}
#youtu{
height:50%;
width:30%;
background-color: aliceblue;
position:absolute;
right: 2%;
top:2%;
text-align: center;
line-height: 250px;
}
#time{
height:50%;
width:30%;
position:absolute;
top:50%;
}
#har{
width:100%;
position:absolute;
height:2%;
top:53%;  
background-color: darkgrey;
}   
#app2{
width:60%;
position:absolute;
left:2%;
top:62%;
}
#chart-wrap {
  width:30%;
  height:40%;
  position:absolute;
  right:2%; 
  top:55%;  
}
#time{
  width:50%;
  height:5%;
  position:absolute;
  left:2%; 
  top:35%;  
}
#time2{
  width:50%;
  height:10%;  
  position:absolute;
  left:2%;   
  top:40%;     
}
</style>
<body>   
<div id='app' style=''>
<div id='app1'>
<el-table border 
      :data="machine"
      height='200'
      width='200'
      style="width: 100%;"
       :cell-class-name="tableRowClassName"
      >
      <el-table-column
        prop="name"
        label="订单号">
      </el-table-column>
      <el-table-column
        prop="ip"  
        label="已加工数量">
      </el-table-column>
      <el-table-column
        prop="port"
        label="代加工数量">
      </el-table-column>
      <el-table-column
        prop="st"
        label="直通率">
      </el-table-column>
      <el-table-column
        prop="count"
        label="NG数量">
      </el-table-column>
       <el-table-column
        prop="energy"
        label="能耗">
      </el-table-column>
     </el-table>
  </div>
<div id='time'>
 <el-header style="margin-top: 3%;height: 3%;">
      <el-date-picker   style="float: left;margin-bottom: 0.3%;"
          v-model="selectdate2"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期">
          </el-date-picker>
           <el-button @click="selectTimeOrder"  v-show="showFlag" type="primary" icon="el-icon-search"
            style="float: left;margin-left: 0.2%;margin-bottom: 0.3%;"
            >更新
          </el-button>
 </el-header>  
</div>
 
<div id='youtu'>
<img alt="" src="">
<p>产品图</p>
</div>
<div id='har'></div>
<div id='app2' style=''>
<el-table border
      :data="machine2"
      height='200'
      width='200'
      style="width: 100%;"
       :cell-class-name="tableRowClassName"
      >
      <el-table-column
        prop="name2"
        label="日期">
      </el-table-column>
      <el-table-column
        prop="ip2"  
        label="已加工数量">
      </el-table-column>
      <el-table-column
        prop="port2"
        label="破损数量">
      </el-table-column>
      <el-table-column
        prop="st2"
        label="能耗数">
      </el-table-column>
      <el-table-column
        prop="count2"
        label="直通率">
      </el-table-column>
     
     </el-table> 
     </div>
</div>
<div id="chart-wrap">
</div>
</body>
<script type="text/javascript">
 
 
    
    Vue.prototype.$echarts = echarts
    let app =new Vue({
      el: '#app',
      mixins:[mixin],
      data:{
        machine:<%out.print(  Manager.getDevice().toString());%>,
      },
      methods:{
          tableRowClassName({row,column,rowIndex,columnIndex}) {
              
               if (row['st'] == '未连接' && columnIndex==3 ) {
                 return 'success-row';
               }else{
                 return '';    
               }  
               
          }
      }, mounted(){
      }
     })
      
    
    //柱状图
   function zhutu () {
 
    var chartDom = document.getElementById('chart-wrap');
    var myChart = echarts.init(chartDom);
    var option;
 
    option = {
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'shadow'
        }
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: [
        {
          type: 'category',
          data: ['7/1', '7/2', '7/3', '7/4', '7/5', '7/6', '7/7'],
          axisLine: { lineStyle: { color: 'rgb(30, 144, 255)' } },
          axisLabel: { color: 'rgb(30, 144, 255)' },
          splitLine: { lineStyle: { color: 'rgb(30, 144, 255)', type: 'dashed' } }
        }
      ],  
      yAxis: [
        {
          type: "value",
          name: "能耗",
          nameTextStyle: {
            color: "rgb(30, 144, 255)",
            fontSize: 12,
            padding: [0, 0, 0, -30], //name文字位置 对应 上右下左
          },
          splitLine: {
            // 网格线
            show: false,
            lineStyle: { //分割线
              color: "rgb(180, 180, 180)",
              width: 1,
              type: "dashed" //dotted:虚线 solid:实线
            }
          },
          axisLabel: {
            // 轴文字
            color: "rgb(30, 144, 255)",
            fontSize: 12,
          },  
        },
 
      ],
      series: [
        {
          name: '能耗',
          type: 'bar',
          barWidth: '80%',
          data: [220, 152, 200, 334, 390, 330, 220],
          itemStyle: { color: 'rgb(180, 180, 180)' }
        },
 
      ]  
    };
        
    option && myChart.setOption(option);
  }
    window.onload = function () {  
        zhutu();
        
    }
    </script>
  
 
</html>