|
|
@@ -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: 2024-10-17 10:46:43
|
|
|
5
|
+ * @Last Modified time: 2024-10-18 15:00:12
|
|
6
|
6
|
*/
|
|
7
|
7
|
/*
|
|
8
|
8
|
* @Author: dayan_hjm
|
|
|
@@ -27,7 +27,7 @@ import OneQualified from "./component/oneQualified.jsx";
|
|
27
|
27
|
import MapView from "./component/mapView.jsx";
|
|
28
|
28
|
import $store from "@store/";
|
|
29
|
29
|
import {
|
|
30
|
|
- timeService,
|
|
|
30
|
+ momeyService,
|
|
31
|
31
|
numberService,
|
|
32
|
32
|
checkToken,
|
|
33
|
33
|
updateTimeService
|
|
|
@@ -48,6 +48,7 @@ class Home extends Component {
|
|
48
|
48
|
updateTime: '',
|
|
49
|
49
|
changGif: false,
|
|
50
|
50
|
changNun: false,
|
|
|
51
|
+ imgMsgData: [],
|
|
51
|
52
|
plannedCompletionData: [
|
|
52
|
53
|
],
|
|
53
|
54
|
plannedCompletionNum: 1,
|
|
|
@@ -85,9 +86,9 @@ class Home extends Component {
|
|
85
|
86
|
}
|
|
86
|
87
|
componentDidMount() {
|
|
87
|
88
|
this.fontMsgChange();
|
|
88
|
|
- this.getUrl();
|
|
89
|
89
|
this.getUrl2()
|
|
90
|
90
|
this.getUrl3();
|
|
|
91
|
+ this.getUrl();
|
|
91
|
92
|
setTimeout(() => {
|
|
92
|
93
|
this.videoStart();
|
|
93
|
94
|
}, 200)
|
|
|
@@ -156,33 +157,39 @@ class Home extends Component {
|
|
156
|
157
|
}
|
|
157
|
158
|
|
|
158
|
159
|
async getUrl() {
|
|
159
|
|
- await timeService().then(({ data = [], resultCode }) => {
|
|
|
160
|
+ const name_ = ["累计运输锂辉石 /Total Spodumene Shipments: ", "锂辉石库存量 /Spodumene Inventory:", "锂辉石库存量 /Spodumene Inventory:", "锂辉石库存量 /Spodumene Inventory:",""];
|
|
|
161
|
+ const style__ = [{ left: "3%", top: "29%" }, { right: "9%", top: "38%" }, { right: "32%", top: "48%" }, { left: "5%", top: "64%" }, { left: "65%", top: "47%" }]
|
|
|
162
|
+ let datas = [];
|
|
|
163
|
+ await momeyService().then(({ data = [], resultCode }) => {
|
|
160
|
164
|
if (+resultCode === 0) {
|
|
161
|
|
- let plannedCompletionData = [], manHourData = [];
|
|
|
165
|
+ function changeName(x, num) {
|
|
|
166
|
+ return {
|
|
|
167
|
+ ...x,
|
|
|
168
|
+ total: x.IndexValue,
|
|
|
169
|
+ totalName: name_[num],
|
|
|
170
|
+ styles: style__[num],
|
|
|
171
|
+ }
|
|
|
172
|
+ }
|
|
162
|
173
|
data.map((x, i) => {
|
|
163
|
|
- if (x.indexValue || x.indexValue == 0) {
|
|
164
|
|
- if (x.indexName == '产量计划完成率') {
|
|
165
|
|
- plannedCompletionData.push({
|
|
166
|
|
- name: x.factoryName,
|
|
167
|
|
- value: Number((x.indexValue * 100).toFixed(2)),
|
|
168
|
|
- })
|
|
169
|
|
- } else {
|
|
170
|
|
- manHourData.push({
|
|
171
|
|
- name: x.factoryName,
|
|
172
|
|
- // value: Number((x.indexValue * 100).toFixed(2)),
|
|
173
|
|
- value: Number(x.indexValue),
|
|
174
|
|
- })
|
|
175
|
|
- }
|
|
|
174
|
+ datas[0] = changeName({ IndexValue: this.store.state.tailiTotal }, 0);
|
|
|
175
|
+ if (x.IndexCode == '22') {
|
|
|
176
|
+ datas[1] = changeName(x, 1);
|
|
|
177
|
+ } else if (x.IndexCode == '23') {
|
|
|
178
|
+ datas[2] = changeName(x, 2);
|
|
|
179
|
+ } else if (x.IndexCode == '21') {
|
|
|
180
|
+ datas[3] = changeName(x, 3);
|
|
|
181
|
+ } else if (x.IndexCode == '24') {
|
|
|
182
|
+ datas[4] = changeName(x, 4);
|
|
176
|
183
|
}
|
|
177
|
184
|
});
|
|
178
|
|
- this.setState({ plannedCompletionData, manHourData, plannedCompletionNum: 1, manHourNum: 1 });
|
|
|
185
|
+ this.setState({ imgMsgData: datas });
|
|
179
|
186
|
}
|
|
180
|
187
|
});
|
|
181
|
188
|
}
|
|
182
|
189
|
async getUrl2() {
|
|
183
|
190
|
await numberService().then(({ data = [], resultCode }) => {
|
|
184
|
191
|
if (+resultCode === 0) {
|
|
185
|
|
- let totalValue = 0, productInventory=0,yearDecline = 0, yearSend = 0, annualPlan = 0, implementationOfThePlan = 0;
|
|
|
192
|
+ let tailiTotal = 0, totalValue = 0, productInventory = 0, yearDecline = 0, yearSend = 0, annualPlan = 0, implementationOfThePlan = 0;
|
|
186
|
193
|
data.map((x, i) => {
|
|
187
|
194
|
if (x.IndexCode == '1') {
|
|
188
|
195
|
yearDecline = x.IndexValue
|
|
|
@@ -194,9 +201,11 @@ class Home extends Component {
|
|
194
|
201
|
annualPlan = x.IndexValue //年度产量完成率
|
|
195
|
202
|
} else if (x.IndexCode == '5') {
|
|
196
|
203
|
implementationOfThePlan = x.IndexValue //年度锂辉石执行率
|
|
|
204
|
+ } else if (x.IndexCode == '6') {
|
|
|
205
|
+ tailiTotal = x.IndexValue //年度锂辉石执行率
|
|
197
|
206
|
}
|
|
198
|
207
|
});
|
|
199
|
|
- this.store.saveState({ totalValue, yearDecline, yearSend, productInventory,annualPlan,implementationOfThePlan });
|
|
|
208
|
+ this.store.saveState({ tailiTotal, totalValue, yearDecline, yearSend, productInventory, annualPlan, implementationOfThePlan });
|
|
200
|
209
|
setTimeout(() => {
|
|
201
|
210
|
$(".shu1").numScroll();
|
|
202
|
211
|
}, 2500)
|
|
|
@@ -254,8 +263,8 @@ class Home extends Component {
|
|
254
|
263
|
|
|
255
|
264
|
render() {
|
|
256
|
265
|
const stores = this.store.state;
|
|
257
|
|
- let { totalValue, yearDecline, yearSend, productInventory,annualPlan,implementationOfThePlan } = this.store.state;
|
|
258
|
|
- let { changGif, updateTime, changNun } = this.state;
|
|
|
266
|
+ let { totalValue, yearDecline, yearSend, productInventory, annualPlan, implementationOfThePlan } = this.store.state;
|
|
|
267
|
+ let { changGif, updateTime, changNun, imgMsgData } = this.state;
|
|
259
|
268
|
return (
|
|
260
|
269
|
<div className={[styles.tlk_box + ' home_box ']}>
|
|
261
|
270
|
{/* 水印 */}
|
|
|
@@ -366,7 +375,7 @@ class Home extends Component {
|
|
366
|
375
|
!changNun && <span className="topMsg_number" class="shu1">{yearSend}</span>
|
|
367
|
376
|
}
|
|
368
|
377
|
{
|
|
369
|
|
- changNun && <span className="topMsg_number">{getThousandNum(yearSend,true)}%</span>
|
|
|
378
|
+ changNun && <span className="topMsg_number">{getThousandNum(yearSend, true)}%</span>
|
|
370
|
379
|
}
|
|
371
|
380
|
<p className="topMsg_line"></p>
|
|
372
|
381
|
<Tooltip placement="bottom" title={' ● 截止更新日期的主产品库存数量。'}>
|
|
|
@@ -388,6 +397,62 @@ class Home extends Component {
|
|
388
|
397
|
</div>
|
|
389
|
398
|
</div>
|
|
390
|
399
|
</div>
|
|
|
400
|
+ <ul className="imgMsg">
|
|
|
401
|
+ {
|
|
|
402
|
+ toJS(imgMsgData).map((item, index) => {
|
|
|
403
|
+ if (!item) { return }
|
|
|
404
|
+ return (
|
|
|
405
|
+ <li style={{ ...item?.styles }} class={index != 4 ? "animate__animated animate__bounceInUp animate__slower" : "animate__animated animate__bounceInUp animate__slower lastLi"}>
|
|
|
406
|
+ {/* 矿产 */}
|
|
|
407
|
+ {
|
|
|
408
|
+ index != 4 && <div>
|
|
|
409
|
+ {
|
|
|
410
|
+ item.totalName && <p className="name">{item.totalName}</p>
|
|
|
411
|
+ }
|
|
|
412
|
+ {
|
|
|
413
|
+ item.totalName && !changGif && <span class="shu1 nums">{item.total}</span>
|
|
|
414
|
+ }
|
|
|
415
|
+ {
|
|
|
416
|
+ item.totalName && changGif && <span class="nums">{getThousandNum(item.total)}</span>
|
|
|
417
|
+ }
|
|
|
418
|
+ {
|
|
|
419
|
+ item.totalName && <span className="sma">t</span>
|
|
|
420
|
+ }
|
|
|
421
|
+
|
|
|
422
|
+ </div>
|
|
|
423
|
+ }
|
|
|
424
|
+ {
|
|
|
425
|
+ index == 4 && <span class="zhuan animate__animated animate__delay-1s animate__rotateIn animate__infinite animate__slower"></span>
|
|
|
426
|
+ }
|
|
|
427
|
+ {
|
|
|
428
|
+ index == 4 && <div>
|
|
|
429
|
+
|
|
|
430
|
+ {
|
|
|
431
|
+ item.total && !changGif && <span class="shu1 nums">{item.total}</span>
|
|
|
432
|
+ }
|
|
|
433
|
+ {
|
|
|
434
|
+ item.total && changGif && <span class="nums">{getThousandNum(item.total)}</span>
|
|
|
435
|
+ }
|
|
|
436
|
+ {
|
|
|
437
|
+ item.total && <span className="sma">t</span>
|
|
|
438
|
+ }
|
|
|
439
|
+ {
|
|
|
440
|
+ <p className="name">锂辉石库存总量</p>
|
|
|
441
|
+ }
|
|
|
442
|
+ {
|
|
|
443
|
+ <p className="name" style={{marginTop:'-0.5em'}}>Spodumene Inventory</p>
|
|
|
444
|
+ }
|
|
|
445
|
+
|
|
|
446
|
+ </div>
|
|
|
447
|
+ }
|
|
|
448
|
+
|
|
|
449
|
+
|
|
|
450
|
+ </li>
|
|
|
451
|
+ )
|
|
|
452
|
+ })
|
|
|
453
|
+ }
|
|
|
454
|
+ </ul>
|
|
|
455
|
+
|
|
391
|
456
|
|
|
392
|
457
|
</div>
|
|
393
|
458
|
|
|
|
@@ -396,21 +461,21 @@ class Home extends Component {
|
|
396
|
461
|
<div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
|
|
397
|
462
|
<div className="topMsg bigDivPd">
|
|
398
|
463
|
<Tooltip placement="bottom" title={' ● 近一年的百万工时损工率。'}>
|
|
399
|
|
- <p className="topMsg_title">计划完成率 <span className="topMsg_tips">/ Plan Completion Rate</span></p>
|
|
|
464
|
+ <p className="topMsg_title" style={{marginBottom:'8px'}}>计划完成率 <span className="topMsg_tips">/ Plan Completion Rate</span></p>
|
|
400
|
465
|
</Tooltip>
|
|
401
|
466
|
<div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
|
|
402
|
467
|
<div className="topMsg_box">
|
|
403
|
468
|
<p className="topMsg_number_p topMsg_number_p_big">年度产量计划完成率</p>
|
|
404
|
469
|
<p className="topMsg_number_p">Completion rate of</p>
|
|
405
|
|
- <p className="topMsg_number_p" style={{marginBottom:'0.05rem'}}>annual production plan</p>
|
|
406
|
|
- <span className="topMsg_number" class="shu1">{getThousandNum(annualPlan,true)}</span>
|
|
|
470
|
+ <p className="topMsg_number_p" style={{ marginBottom: '0.05rem' }}>annual production plan</p>
|
|
|
471
|
+ <span className="topMsg_number" class="shu1">{getThousandNum(annualPlan, true)}</span>
|
|
407
|
472
|
<span className="topMsg_number_2">%</span>
|
|
408
|
473
|
</div>
|
|
409
|
474
|
<div className="topMsg_box">
|
|
410
|
475
|
<p className="topMsg_number_p topMsg_number_p_big">年度锂辉石计划执行率</p>
|
|
411
|
476
|
<p className="topMsg_number_p">Annual lithium pyroxene</p>
|
|
412
|
|
- <p className="topMsg_number_p" style={{marginBottom:'0.05rem'}}>plan execution rate</p>
|
|
413
|
|
- <span className="topMsg_number" class="shu1">{getThousandNum(implementationOfThePlan,true)}</span>
|
|
|
477
|
+ <p className="topMsg_number_p" style={{ marginBottom: '0.05rem' }}>plan execution rate</p>
|
|
|
478
|
+ <span className="topMsg_number" class="shu1">{getThousandNum(implementationOfThePlan, true)}</span>
|
|
414
|
479
|
<span className="topMsg_number_2">%</span>
|
|
415
|
480
|
</div>
|
|
416
|
481
|
</div>
|