managePlatform_duanZi.vue
7.13 KB
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
<template>
<div class="app-body">
<Header title="大船看板" :sysInitTimeNum="sysTimeNum"></Header>
<div class="dv-content-body">
<!-- 顶部头表 -->
<div class="dv-content-body-bottom-list">
<div class="AGVtop">
<headCenter ref="headCenter" class="AGV-start" />
</div>
<div class="AGVbody">
<bodyLeft ref="bodyLeft" class="AGV-running" />
<bodyRight ref="bodyRight" class="AGV-conten" />
</div>
<div class="AGVbittle">
<footerLeft ref="footerLeft" class="AGV-running" />
<footerRight ref="footerRight" class="AGV-conten" />
</div>
</div>
</div>
</div>
</template>
<script>
import Header from '@/layout/appHead'
import headCenter from '@/components/headCenter'
import bodyLeft from '@/components/bodyLeft'
import bodyRight from '@/components/bodyRight'
import footerLeft from '@/components/footerLeft'
import footerRight from '@/components/footerRight'
export default {
data() {
return {
baseUrlOff: 'http://172.16.30.219:5221/api/Index/GetWebFWSInfo',
// baseUrlOff: 'http://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData1',
baseUrlOnLine: window.appConfig.baseUrlintTwo,
sysData: {},
sysInitTimeNum: 20,
sysTimeNum: 20,
}
},
components: {
Header,
headCenter,
bodyLeft,
bodyRight,
footerLeft,
footerRight,
},
methods: {
getAGVDataOne() {
let opt = {
urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
logTitle: 'AGV-路线信息',
isUrlALL: true,
headers: window.baseOnLineOrOff,
header: window.baseOnLineOrOff,
// isHanderAjaxSuccessActionLoad: true,
// type: 'post',
}
let callBackFn = (res) => {
if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
setTimeout(() => {
this.$refs.headLeft.sed(res.data.data)
this.$refs.headCenter.getData(res.data.data)
this.$refs.headRight.sed(res.data.data)
this.$refs.footerLeft.sed(res.data.data)
this.$refs.footerRight.sed(res.data.data)
}, 300)
}
''.ajax(this, opt, callBackFn)
},
ajaxSuccessDataBefore(res, title) {
if (res.data.data == null || res.data.data.length == 0) {
this.sysData = []
''.Log(title + '无数据', 'getData')
return false
}
return true
},
intInterval: function () {
''.intInterval(this, this.sysInitTimeNum, () => {
this.getAGVDataOne()
})
},
setData() {
const data1 = {
x: ['01-15'],
running: [450]
}
this.$refs.footerLeft.getwarehouseHealthbar(data1)
const data2 = {
x: ['01-08', '01-09', '01-10', '01-11', '01-12', '01-13', '01-14'],
running: [650, 750, 850, 900, 800, 700, 800, 800],
}
this.$refs.footerLeft.getwarehouseHealthbar2(data2)
const data4 = [
['1号焊机', '电流过大', '01-09 15:33/1'],
['4号焊机', '电压过冲', '01-09 13:08/1'],
['7号焊机', '电压过冲', '01-09 10:54/1'],
['带锯床', '未匹配到该管径信息', '01-09 09:22/0']
]
this.$refs.footerRight.sed(data4)
const data5 = {
x: ['01-15'],
running: [850]
}
this.$refs.bodyLeft.getwarehouseHealthbar(data5)
const data3 = {
x: ['01-08', '01-09', '01-10', '01-11', '01-12', '01-13', '01-14'],
running: [800, 900, 650, 750, 850, 900, 750, 650],
}
this.$refs.bodyLeft.getwarehouseHealthbar2(data3)
const data7 = {
x: ['焊机', '带锯床', '切坡一体机'],
running: [36, 1, 1],
error: [0, 0, 0]
}
this.$refs.bodyRight.getwarehouseHealthbar(data7)
}
},
mounted() {
debugger
this.setData()
// this.getAGVDataOne()
// this.intInterval()
},
}
</script>
<style lang="scss" scoped>
.app-body {
height: 100%;
width: 100%;
}
.dv-content-body {
height: 90%;
width: 100%;
// background: rebeccapurple;
}
.dv-content-body-bottom-list {
width: 98.8%;
height: 98%;
margin: auto;
flex-wrap: wrap;
.AGVtop {
width: 100%;
height: 32%;
display: flex;
}
.AGVbody {
width: 100%;
height: 32%;
display: flex;
margin-top: 0.7%;
}
.AGVbittle {
width: 100%;
height: 32%;
display: flex;
margin-top: 0.7%;
}
.AGV-running {
width: 66%;
height: 101.3%;
border: 2px solid #3879c9;
justify-content: space-between;
align-items: center;
margin: 0px 0 10px 7px;
}
.AGV-start {
width: 32%;
height: 100%;
// border: 2px solid #3879c9;
justify-content: space-between;
align-items: center;
margin: 0px 0 10px 7px;
}
.location {
width: 33%;
height: 100%;
border: 2px solid #3879c9;
// display: flex;
// justify-content: space-between;
// align-items: center;
margin: 0px 0 10px 7px;
}
.AGV-conten {
width: 33%;
height: 100%;
border: 2px solid #3879c9;
justify-content: space-between;
align-items: center;
margin: 0px 0 10px 7px;
}
.AGV-conten2 {
width: 33.3%;
height: 101.3%;
border: 2px solid #3879c9;
justify-content: space-between;
align-items: center;
margin: 0px 0 10px 7px;
}
.box {
flex: 1;
/* 左右各占50%宽度 */
height: 100%;
display: flex;
flex-direction: column;
/* 内部item上下排列 */
justify-content: space-around;
/* item均匀分布 */
align-items: center;
/* item水平居中 */
}
/* 每个小项样式:宽85%、高18%、边框、内部左右排列 */
.item {
width: 80%;
height: 17%;
border-radius: 5px;
border: 1px solid #67c8fb;
display: flex;
justify-content: space-between;
/* 名称左、数值右 */
align-items: center;
/* 内容垂直居中 */
padding: 0 5px;
/* 内容不贴边框 */
background-color: #062448;
}
/* 名称/数值样式区分 */
.name {
color: #fff;
font-size: 14px;
}
.value {
color: #67c8fb;
font-size: 14px;
font-weight: bold;
}
}
</style>