overviewOfLibraryInformation.vue
6.47 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
266
<template>
<div class="app-body">
<Header title="立库信息总览" ></Header>
<div class="dv-content-body">
<!-- 顶部头表 -->
<div class="dv-content-body-head-list">
<div :class="eqName(item.name)" v-for="(item, index) in topData" :key="index" class="dv-content-body-head-list-delit1">
<div class="qty">{{ item.number }}</div>
<div class="text">{{ item.name }}</div>
</div>
<!-- <div class="dv-content-body-head-list-delit1">
<div class="qty">123456</div>
<div class="text">今日入库量</div>
</div>
<div class="dv-content-body-head-list-delit1">
<div class="qty">123456</div>
<div class="text">今日出库量</div>
</div>
<div class="dv-content-body-head-list-delit4">
<div class="qty">123456</div>
<div class="text">库存总量</div>
</div>
<div class="dv-content-body-head-list-delit2">
<div class="qty">123456</div>
<div class="text">库内物料品数</div>
</div>
<div class="dv-content-body-head-list-delit3">
<div class="qty">123456</div>
<div class="text">待执行任务数</div>
</div> -->
</div>
<!-- 中间图表 -->
<div class="dv-content-body-center-list">
<bodyCenterLeft ref="bodyCenterLeft"></bodyCenterLeft>
<bodyCenterRight ref="bodyCenterRight"></bodyCenterRight>
</div>
<!-- 底部图表 -->
<div class="dv-content-body-bottom-list">
<footerLeft ref="footerLeft"></footerLeft>
<footerRight ref="footerRight"></footerRight>
</div>
</div>
</div>
</template>
<script>
import Header from '@/layout/appHead'
import headLeft from '@/overviewOfLibraryInformationComponets/headLeft'
import headRight from '@/overviewOfLibraryInformationComponets/headRight'
import bodyCenterLeft from '@/overviewOfLibraryInformationComponets/bodyCenterLeft'
import bodyCenterRight from '@/overviewOfLibraryInformationComponets/bodyCenterRight'
import footerLeft from '@/overviewOfLibraryInformationComponets/footerLeft'
import footerRight from '@/overviewOfLibraryInformationComponets/footerRight'
export default {
data() {
return {
baseUrlOff: 'http://127.0.0.1:6001/api/BulletinBoard/Mes/V1/ReadData1',
baseUrlOnLine: window.appConfig.overviewOfLibraryInformationLine,
topData: [],
sysData: {},
sysInitTimeNum: window.appConfig.sysTimeNum,
sysTimeNum: window.appConfig.sysTimeNum,
}
},
components: {
Header,
headLeft,
headRight,
bodyCenterLeft,
bodyCenterRight,
footerLeft,
footerRight,
},
methods: {
getWMSData() {
let opt = {
urlSuffix: window.baseOnLineOrOff ? this.baseUrlOnLine : this.baseUrlOff,
logTitle: 'WMS',
isUrlALL: true,
headers: window.baseOnLineOrOff,
//isHanderAjaxSuccessActionLoad:true,
}
let callBackFn = (res) => {
if (!this.ajaxSuccessDataBefore(res, opt.logTitle)) return
this.getTopData()
this.$refs.bodyCenterLeft.getData(this.sysData.bodyCecnterLeft)
//this.$refs.bodyCenterRight.getData()
this.$refs.footerLeft.getData(this.sysData.footerLeft)
this.$refs.footerRight.bingDataSource(this.sysData.footerRight)
}
''.ajax(this, opt, callBackFn)
},
getTopData() {
this.topData = this.sysData.topData
//console.log(this.sysData.topData)
},
eqName(name) {
if (name == '库存总量') {
return 'dv-content-body-head-list-delit4'
} else if (name == '库内物料品数') {
return 'dv-content-body-head-list-delit2'
} else if (name == '待执行任务数') {
return 'dv-content-body-head-list-delit3'
} else {
return 'dv-content-body-head-list-delit1'
}
},
ajaxSuccessDataBefore(res, title) {
if (res.data == null) {
''.Log(title + '无数据', 'getData')
return false
}
return true
},
intInterval: function() {
''.intInterval(this, this.sysInitTimeNum, () => {
this.getWMSData()
})
},
},
mounted() {
//eslint-disable-next-line no-debugger
debugger
this.getWMSData()
// 【发布的时候要取消注释】
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-head-list {
display: flex;
justify-content: space-between;
align-items: center;
height: 15.5%;
}
.dv-content-body-head-list-delit1 {
width: 15%;
height: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
border: 3px solid hsl(208.57deg 51.22% 40.2%);
box-shadow: inset 0 0 20px hsl(201, 86%, 50%);
.qty {
width: 100%;
font-size: 30px;
font-family: electronicFont;
color: hsl(200.68deg 94.87% 69.41%);
text-align: center;
}
.text {
width: 100%;
color: hsl(200.68deg 94.87% 69.41%);
text-align: center;
}
}
.dv-content-body-head-list-delit2 {
width: 15%;
height: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
border: 3px solid hsl(264.77deg 77.48% 43.53%);
box-shadow: inset 0 0 20px hsl(264.77deg 77.48% 43.53%);
.qty {
width: 100%;
font-size: 30px;
font-family: electronicFont;
color: hsl(264.77deg 77.48% 43.53%);
text-align: center;
}
.text {
width: 100%;
color: hsl(264.77deg 77.48% 43.53%);
text-align: center;
}
}
.dv-content-body-head-list-delit3 {
width: 15%;
height: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
border: 3px solid hsl(160deg 100% 30%);
box-shadow: inset 0 0 20px hsl(160deg 100% 30%);
.qty {
width: 100%;
font-size: 30px;
font-family: electronicFont;
color: hsl(160deg 100% 30%);
text-align: center;
}
.text {
width: 100%;
color: hsl(160deg 100% 30%);
text-align: center;
}
}
.dv-content-body-head-list-delit4 {
width: 15%;
height: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
border: 3px solid rgb(1, 101, 113);
box-shadow: inset 0 0 30px rgb(1, 64, 89);
.qty {
width: 100%;
font-size: 30px;
font-family: electronicFont;
color: rgb(0, 235, 238);
text-align: center;
}
.text {
width: 100%;
color: rgb(0, 235, 238);
text-align: center;
}
}
.dv-content-body-center-list {
display: flex;
justify-content: space-between;
align-items: center;
height: 41.5%;
}
.dv-content-body-bottom-list {
display: flex;
height: 41.5%;
justify-content: space-between;
align-items: center;
}
}
</style>
<style lang="less">
.div-span-title {
display: block;
height: 1.9vw;
padding-left: 0vw;
padding-top: 0px;
font-size: 1.4vw;
color: aliceblue;
font-weight: 800;
margin-left: 10px;
}
</style>