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
| <%@ page contentType="text/html;charset=UTF-8"%>
| <!DOCTYPE html>
| <html>
| <head>
| <meta charset="utf-8">
| <meta http-equiv="expires" content="0">
| <meta http-equiv="pragma" content="no-cache">
| <meta http-equiv="cache-control" content="no-cache">
| <title>贴膜台组</title>
|
| <script src="../js/main.js"></script>
|
|
|
|
| <style>
|
|
| body {
| background-color: #D5EAFF;
| }
| #divhead{
| float: left;
| margin-top: 3%;
| width: 98%;
| margin-left: 1%;
| }
| #divBody{
| margin-top: 4%;
| float: left;
| width: 100%;
| height: 60%;
| }
| #orderData{
| float: left;
| height: 98%;
| width: 55%;
| background-color: blanchedalmond;
| }
| #chart-wrap{
| float: left;
| margin-left: 0;
| height: 98%;
| width: 44%;
|
| }
|
| </style>
| </head>
| <body>
| <div id="app" @mousemove="onmouseMove" v-loading="loading" element-loading-background="white" style="height: 99%;">
| <div v-show="this.global.pollingIndex==0" id="mains">
| <h3>贴膜台组</h3>
| <parts-change></parts-change>
| <div id="divhead">
| <show-table :tablehead="tableHead" :tabledata="tableData"></show-table>
| </div>
| <div id="divBody">
| <div id="orderData">
| <screen-order :tablehead="orderHead" :tabledata="orderData"></screen-order>
| </div>
|
| <div id="chart-wrap"></div>
| </div>
| </div>
| <screen-photo :id="13" :intime="this.global.timer" v-show="this.global.pollingIndex==1"></screen-photo>
|
|
| </div>
| </body>
|
|
|
|
|
| <script>
| let app = new Vue({
| el: '#app',
| mixins:[mixin],
|
| data() {
| return {
| tableHead: [{}],
| tableData: [{}],
| machineElectric:[{}],
| machineWater:[{}],
| orderHead:[{}],
| orderData:[{}],
| loading:true,
| val: {
| title:{
| text:'',
| left:'center'
| },
| tooltip: {
| trigger: 'axis',
| axisPointer: {
| type: 'shadow'
| }
| },
| grid: {
| left: '3%',
| right: '4%',
| bottom: '3%',
| containLabel: true
| },
| xAxis: [{
| type: 'category',
| data: [],
| 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)'
| }
| },
|
| ]
| },
| }
|
| },
| methods: {
| echarsInit(type) {
| let HisArr=[]
| let datas=this.machineElectric
| HisArr[0] = this.$echarts.init(document.getElementById('chart-wrap'));
|
| this.val.yAxis[0].name="电耗";
| this.val.series[0].name='电耗(kw·h)'
| this.val.series[0].itemStyle.color='rgb(84,112,198)'
| danwei="(kw·h)"
|
| for(let i in datas){
| this.val.title.text=this.machineElectric[i]["0_machine_name"]+danwei
| this.val.xAxis[0].data=datas[i]["6_shijian"].split(',');
| this.val.series[0].data=datas[i]["5_jiqidianliang"].split(',');
| HisArr[i].setOption(this.val);
| }
| },
|
| },
| watch: {
| machineElectric(){
| if(Object.keys(this.machineElectric[0]).length==0){
| return
| }
| this.echarsInit(0)
| this.loading=false
| }
| },
| async mounted() {
| let sql=""
| let flag=2
| sql="{call AXJ_a_largeScreen_order_tableHead_select()}"
| await this.loadAjxss('大屏显示机器表头',sql,flag,"tableHead")
| sql="{call AXJ_a_largeScreen_orderRatio_tableHead_select()}"
| await this.loadAjxss('贴膜检测以及钢化大屏比例表头',sql,flag,"orderHead")
| await this.getTableData('贴膜') // 磨边倒角
| await this.getMachineElectric('贴膜','6')
| let timer1=await setInterval(()=>{
| sql="{call AXJ_a_largeScreen_orderRatio_tableData_select()}"
| this.interValLoadAjxs('贴膜以及钢化大屏比例数据',sql,flag,"orderData",timer1)
| },5000)
| this.onmouseMove()
|
| }
| });
| </script>
|
| </html>
|
|