|
|
@@ -2,7 +2,7 @@
|
|
2
|
2
|
* @Author: dayan_hjm
|
|
3
|
3
|
* @Date: 2023-10-25 10:32:44
|
|
4
|
4
|
* @Last Modified by: dayan_hjm
|
|
5
|
|
- * @Last Modified time: 2023-11-08 09:56:35
|
|
|
5
|
+ * @Last Modified time: 2023-11-08 17:23:19
|
|
6
|
6
|
*/
|
|
7
|
7
|
/*
|
|
8
|
8
|
* @Author: dayan_hjm
|
|
|
@@ -43,24 +43,18 @@ class Home extends Component {
|
|
43
|
43
|
updateTime: '',
|
|
44
|
44
|
changGif: false,
|
|
45
|
45
|
plannedCompletionData: [
|
|
46
|
|
- { name: '射洪', value: 78.1 },
|
|
47
|
|
- { name: '广东', value: 12 },
|
|
48
|
|
- { name: '珠海', value: 65 },
|
|
49
|
|
- { name: '潮汕', value: 45 },
|
|
50
|
46
|
],
|
|
51
|
47
|
plannedCompletionNum: 1,
|
|
52
|
48
|
manHourData: [
|
|
53
|
|
- { name: '射洪', value: 0.2 },
|
|
54
|
|
- { name: '广东', value: 33 },
|
|
55
|
|
- { name: '珠海', value: 65 },
|
|
56
|
|
- { name: '潮汕', value: 65 },
|
|
57
|
49
|
],
|
|
58
|
50
|
manHourNum: 1,
|
|
59
|
51
|
};
|
|
60
|
52
|
this.timer = null //定时器,用于检测同步状态
|
|
61
|
53
|
}
|
|
62
|
54
|
componentWillMount() {
|
|
63
|
|
- this.getToken()
|
|
|
55
|
+ if(window.location.host.indexOf("localhost") == -1){
|
|
|
56
|
+ this.getToken()
|
|
|
57
|
+ }
|
|
64
|
58
|
}
|
|
65
|
59
|
|
|
66
|
60
|
async getToken() {
|
|
|
@@ -177,7 +171,7 @@ class Home extends Component {
|
|
177
|
171
|
yearDecline = x.indexValue
|
|
178
|
172
|
} else if (x.indexName == '产品库存') {
|
|
179
|
173
|
yearSend = x.indexValue
|
|
180
|
|
- } else if (x.indexName == '年度产量') {
|
|
|
174
|
+ } else if (x.indexName == '年度发货量') {
|
|
181
|
175
|
productInventory = x.indexValue
|
|
182
|
176
|
}
|
|
183
|
177
|
});
|
|
|
@@ -208,13 +202,13 @@ class Home extends Component {
|
|
208
|
202
|
//产量计划完成率
|
|
209
|
203
|
var p1 = document.getElementById('plannedCompletionBox');
|
|
210
|
204
|
const datas_ = plannedCompletionData[plannedCompletionNum - 1];
|
|
211
|
|
- var res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_.value + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_.name + '</p></div>';
|
|
|
205
|
+ var res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_?.value.toFixed(2) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_.name + '</p></div>';
|
|
212
|
206
|
p1.innerHTML = res;
|
|
213
|
207
|
|
|
214
|
208
|
//百万工时损工率
|
|
215
|
209
|
var p2 = document.getElementById('manHourBox');
|
|
216
|
210
|
const datas_2 = manHourData[manHourNum - 1];
|
|
217
|
|
- var res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2.value + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
|
|
|
211
|
+ var res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
|
|
218
|
212
|
p2.innerHTML = res2;
|
|
219
|
213
|
|
|
220
|
214
|
const num_ = plannedCompletionNum + 1 >= plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
|
|
|
@@ -225,7 +219,7 @@ class Home extends Component {
|
|
225
|
219
|
|
|
226
|
220
|
render() {
|
|
227
|
221
|
const stores = this.store.state;
|
|
228
|
|
- const { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
|
|
|
222
|
+ let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
|
|
229
|
223
|
let { changGif, updateTime, } = this.state;
|
|
230
|
224
|
return (
|
|
231
|
225
|
<div className={"home_box"}>
|
|
|
@@ -239,7 +233,7 @@ class Home extends Component {
|
|
239
|
233
|
|
|
240
|
234
|
<div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
|
|
241
|
235
|
<div className="topMsg">
|
|
242
|
|
- <Tooltip placement="bottom" title={' ● 从1月至m-1月的产值累计,产值计算方式:销售单价*产量'}>
|
|
|
236
|
+ <Tooltip placement="bottom" title={' ● 从1月至m-1月的产值累计,产值计算方式:∑销售单价*产量'}>
|
|
243
|
237
|
<p className="topMsg_title">总产值</p>
|
|
244
|
238
|
</Tooltip>
|
|
245
|
239
|
<div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
|
|
|
@@ -250,7 +244,7 @@ class Home extends Component {
|
|
250
|
244
|
|
|
251
|
245
|
<div class="center_box2 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
|
|
252
|
246
|
<div className="center_box">
|
|
253
|
|
- <Tooltip placement="bottom" title={' ● 即为 t-1天的库存金额,百分比即为产品库存金额占总体金额的百分比'}>
|
|
|
247
|
+ <Tooltip placement="bottom" title={' ● 即为 更新数据ETL日期当天的库存金额,百分比即为产品库存金额占总体金额的百分比'}>
|
|
254
|
248
|
<p className="topMsg_title" style={{ position: "relative", zIndex: 999999 }}>库存金额</p>
|
|
255
|
249
|
</Tooltip>
|
|
256
|
250
|
<div className="topMsg_content">
|
|
|
@@ -261,7 +255,7 @@ class Home extends Component {
|
|
261
|
255
|
|
|
262
|
256
|
<div class="bottomContent2 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
|
|
263
|
257
|
<div className="bottomContent bigDivPd">
|
|
264
|
|
- <Tooltip placement="bottom" title={' ● m-6至m月的产量和发货量的对比数据(含外加工)当月的数据计算至t-1天'}>
|
|
|
258
|
+ <Tooltip placement="bottom" title={' ● m-6至m月的产量和发货量的对比数据(含外加工)当月的数据计算至更新数据ETL日期当天'}>
|
|
265
|
259
|
<p className="topMsg_title">月度产量/发货量</p>
|
|
266
|
260
|
</Tooltip>
|
|
267
|
261
|
<div className="topMsg_content">
|
|
|
@@ -281,24 +275,24 @@ class Home extends Component {
|
|
281
|
275
|
<div className="right_li">
|
|
282
|
276
|
<span className="topMsg_number" class="shu1">{yearDecline}</span>
|
|
283
|
277
|
<p className="topMsg_line"></p>
|
|
284
|
|
- <Tooltip placement="bottom" title={' ● 即为从1/1至t-1天的产量之和(含外加工)'}>
|
|
|
278
|
+ <Tooltip placement="bottom" title={' ● 即为从当年1月1日至更新数据ETL日期当天的产量之和(含外加工)'}>
|
|
285
|
279
|
<span className="topMsg_tip">年度产量/吨</span>
|
|
286
|
280
|
</Tooltip>
|
|
287
|
281
|
</div>
|
|
288
|
282
|
</div>
|
|
289
|
283
|
<div className="center_li">
|
|
290
|
284
|
<div className="right_li">
|
|
291
|
|
- <span className="topMsg_number" class="shu1">{yearSend}</span>
|
|
|
285
|
+ <span className="topMsg_number" class="shu1">{productInventory}</span>
|
|
292
|
286
|
<p className="topMsg_line"></p>
|
|
293
|
|
- <Tooltip placement="bottom" title={' ● 即为从当年1/1至t-1天的发货量之和(含外加工)'}>
|
|
|
287
|
+ <Tooltip placement="bottom" title={' ● 即为从当年1月1日至更新数据ETL日期当天的发货量之和(含外加工)'}>
|
|
294
|
288
|
<span className="topMsg_tip">年度发货量/吨</span>
|
|
295
|
289
|
</Tooltip>
|
|
296
|
290
|
</div>
|
|
297
|
291
|
</div>
|
|
298
|
292
|
<div className="center_li">
|
|
299
|
|
- <span className="topMsg_number" class="shu1">{productInventory}</span>
|
|
|
293
|
+ <span className="topMsg_number" class="shu1">{yearSend}</span>
|
|
300
|
294
|
<p className="topMsg_line"></p>
|
|
301
|
|
- <Tooltip placement="bottom" title={' ● t-1天的产品库存数量(含外加工)'}>
|
|
|
295
|
+ <Tooltip placement="bottom" title={' ● 更新数据ETL日期当天的产品库存数量(含外加工)'}>
|
|
302
|
296
|
<span className="topMsg_tip">产品库存/吨</span>
|
|
303
|
297
|
</Tooltip>
|
|
304
|
298
|
</div>
|
|
|
@@ -308,7 +302,7 @@ class Home extends Component {
|
|
308
|
302
|
</div>
|
|
309
|
303
|
<div class="bottomContent3 animate__animated animate__fadeInUp animate__slower">
|
|
310
|
304
|
<div className="bottomContent">
|
|
311
|
|
- <Tooltip placement="bottom" title={' ● t-31 至t-1 天的产量(含外加工)'}>
|
|
|
305
|
+ <Tooltip placement="bottom" title={' ● t-31 至更新数据ETL日期当天的日产量(含外加工)'}>
|
|
312
|
306
|
<p className="topMsg_title">近30天产量</p>
|
|
313
|
307
|
</Tooltip>
|
|
314
|
308
|
<div className="topMsg_content">
|
|
|
@@ -323,7 +317,7 @@ class Home extends Component {
|
|
323
|
317
|
<div className="rightContent">
|
|
324
|
318
|
<div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
|
|
325
|
319
|
<div className="topMsg bigDivPd">
|
|
326
|
|
- <Tooltip placement="bottom" title={' ● 即为m-1月的百万工时损工率'}>
|
|
|
320
|
+ <Tooltip placement="bottom" title={' ● 即为1月至m-1月的百万工时损工率'}>
|
|
327
|
321
|
<p className="topMsg_title">百万工时损工率</p>
|
|
328
|
322
|
</Tooltip>
|
|
329
|
323
|
<div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
|
|
|
@@ -337,7 +331,7 @@ class Home extends Component {
|
|
337
|
331
|
|
|
338
|
332
|
<div class="topMsg_22 animate__animated animate__fadeInDown animate__slower">
|
|
339
|
333
|
<div className="topMsg_2">
|
|
340
|
|
- <Tooltip placement="bottom" title={' ● m-6至m月\n近六个月的产品一次合格率和目标值合格率;\n当月的数据计算至t-1天'}>
|
|
|
334
|
+ <Tooltip placement="bottom" title={' ● m-6至m月近六个月的产品一次合格率和目标值合格率;当月的数据计算至更新数据ETL日期当天'}>
|
|
341
|
335
|
<p className="topMsg_title">一次合格率</p>
|
|
342
|
336
|
</Tooltip>
|
|
343
|
337
|
|
|
|
@@ -373,7 +367,7 @@ class Home extends Component {
|
|
373
|
367
|
</div>
|
|
374
|
368
|
</div>
|
|
375
|
369
|
<div className="bottom_box">
|
|
376
|
|
- <p style={{ color: "#6a818d" }}>
|
|
|
370
|
+ <p style={{ color: "#6a818d",lineHeight:'2px' }}>
|
|
377
|
371
|
更新时间 : {updateTime}
|
|
378
|
372
|
</p>
|
|
379
|
373
|
</div>
|