|
|
@@ -2,7 +2,7 @@
|
|
2
|
2
|
* @Author: dayan_hjm 产供销价值链
|
|
3
|
3
|
* @Date: 2023-11-10 10:19:34
|
|
4
|
4
|
* @Last Modified by: dayan_hjm
|
|
5
|
|
- * @Last Modified time: 2024-01-22 14:26:38
|
|
|
5
|
+ * @Last Modified time: 2024-07-21 18:00:14
|
|
6
|
6
|
*/
|
|
7
|
7
|
|
|
8
|
8
|
import React, { useState, useEffect, Component } from "react";
|
|
|
@@ -24,7 +24,7 @@ import {
|
|
24
|
24
|
} from "./api";
|
|
25
|
25
|
import MapViewTwo from "./component/mapView2.jsx";
|
|
26
|
26
|
import mpVideoGvc from "@assets/imgs/dataVimg/videoGvc2.mp4";
|
|
27
|
|
-import { getThousandNum,deleteCacheAndChangeUrl,timestampToTime,setWaterMark } from "@utils/util";
|
|
|
27
|
+import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
|
|
28
|
28
|
import 'animate.css';
|
|
29
|
29
|
import { get } from "lodash";
|
|
30
|
30
|
import $store from "@store/";
|
|
|
@@ -66,7 +66,7 @@ class Gvc extends Component {
|
|
66
|
66
|
$store.app.setMarkSrc(
|
|
67
|
67
|
setWaterMark({
|
|
68
|
68
|
toDataURL: true,
|
|
69
|
|
- waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"),timestampToTime()],
|
|
|
69
|
+ waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
|
|
70
|
70
|
})
|
|
71
|
71
|
);
|
|
72
|
72
|
} else {
|
|
|
@@ -127,10 +127,10 @@ class Gvc extends Component {
|
|
127
|
127
|
btn.removeEventListener('click', play);
|
|
128
|
128
|
// 如果他自动播放了就隐藏按钮,消除点击事件
|
|
129
|
129
|
} catch (err) {
|
|
130
|
|
- if(model){
|
|
131
|
|
- model.style.display = 'block';
|
|
132
|
|
- }
|
|
133
|
|
- if(btn){btn.addEventListener('click', play);}
|
|
|
130
|
+ if (model) {
|
|
|
131
|
+ model.style.display = 'block';
|
|
|
132
|
+ }
|
|
|
133
|
+ if (btn) { btn.addEventListener('click', play); }
|
|
134
|
134
|
// 如果Promise返回的是error就引导用户点击按钮,在调用play方法
|
|
135
|
135
|
}
|
|
136
|
136
|
}
|
|
|
@@ -151,11 +151,11 @@ class Gvc extends Component {
|
|
151
|
151
|
btn.removeEventListener('click', play);
|
|
152
|
152
|
}
|
|
153
|
153
|
else {
|
|
154
|
|
- if(model){
|
|
|
154
|
+ if (model) {
|
|
155
|
155
|
model.style.display = 'block';
|
|
156
|
156
|
}
|
|
157
|
|
- if(btn){btn.addEventListener('click', play);}
|
|
158
|
|
- }
|
|
|
157
|
+ if (btn) { btn.addEventListener('click', play); }
|
|
|
158
|
+ }
|
|
159
|
159
|
}
|
|
160
|
160
|
play()
|
|
161
|
161
|
|
|
|
@@ -177,6 +177,7 @@ class Gvc extends Component {
|
|
177
|
177
|
}
|
|
178
|
178
|
);
|
|
179
|
179
|
});
|
|
|
180
|
+ LeftHtml.unshift({ txt_name: '锂辉石(化学级)', num1: 40532.23, num2: '' })
|
|
180
|
181
|
this.setState({ LeftHtml });
|
|
181
|
182
|
}
|
|
182
|
183
|
});
|
|
|
@@ -184,7 +185,7 @@ class Gvc extends Component {
|
|
184
|
185
|
async getUrl2() {
|
|
185
|
186
|
await bigShopService().then(({ data = [], resultCode }) => {
|
|
186
|
187
|
if (+resultCode === 0) {
|
|
187
|
|
- const name_ = ["", "锂辉石库存量", "锂辉石库存量", "累计运输锂辉石"];
|
|
|
188
|
+ const name_ = ["", "锂辉石(化学级)库存量", "锂辉石(化学级)库存量", "累计运输锂辉石(化学级)"];
|
|
188
|
189
|
const style__ = [{}, { left: "34%", top: "30%" }, { left: "11%", top: "48%" }, { left: "0%", top: "22%" }]
|
|
189
|
190
|
data = data.map((x, i) => {
|
|
190
|
191
|
return {
|
|
|
@@ -237,9 +238,9 @@ class Gvc extends Component {
|
|
237
|
238
|
|
|
238
|
239
|
console.log(old_imgMsgData, "old_imgMsgData")
|
|
239
|
240
|
this.store.saveState({ imgMsgData: old_imgMsgData });
|
|
240
|
|
- setTimeout(()=>{
|
|
|
241
|
+ setTimeout(() => {
|
|
241
|
242
|
this.getUrl5()
|
|
242
|
|
- },500)
|
|
|
243
|
+ }, 500)
|
|
243
|
244
|
}
|
|
244
|
245
|
});
|
|
245
|
246
|
}
|
|
|
@@ -270,9 +271,9 @@ class Gvc extends Component {
|
|
270
|
271
|
old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
|
|
271
|
272
|
console.log(old_imgMsgData, "1111old_imgMsgData")
|
|
272
|
273
|
this.store.saveState({ imgMsgData: old_imgMsgData });
|
|
273
|
|
- setTimeout(()=>{
|
|
|
274
|
+ setTimeout(() => {
|
|
274
|
275
|
this.getUrl6()
|
|
275
|
|
- },1000)
|
|
|
276
|
+ }, 1000)
|
|
276
|
277
|
|
|
277
|
278
|
}
|
|
278
|
279
|
});
|
|
|
@@ -283,36 +284,17 @@ class Gvc extends Component {
|
|
283
|
284
|
if (+resultCode === 0) {
|
|
284
|
285
|
function getItems(num) {
|
|
285
|
286
|
const datas = data.filter(x => { return x.factoryCode == num });
|
|
286
|
|
- const rawMaterial = datas.map((item, index) => {
|
|
|
287
|
+ let rawMaterial = datas.map((item, index) => {
|
|
287
|
288
|
return {
|
|
288
|
289
|
prodCatgory: item.prodCatgory,
|
|
289
|
290
|
indexValue: getThousandNum(item.indexValue),
|
|
290
|
291
|
}
|
|
291
|
292
|
})
|
|
292
|
|
- // const par = {
|
|
293
|
|
- // rawMaterial: [
|
|
294
|
|
- // {
|
|
295
|
|
- // prodCatgory: "原料-鲤辉石",
|
|
296
|
|
- // indexValue: datas?.filter(x => { return x.prodCatgory == 1 })?.[0]?.indexValue || 0,
|
|
297
|
|
- // },
|
|
298
|
|
- // {
|
|
299
|
|
- // prodCatgory: "产品-碳酸锂",
|
|
300
|
|
- // indexValue: datas?.filter(x => { return x.prodCatgory == 2 })?.[0]?.indexValue || 0,
|
|
301
|
|
- // },
|
|
302
|
|
- // {
|
|
303
|
|
- // prodCatgory: "原料-氯化锂",
|
|
304
|
|
- // indexValue: datas?.filter(x => { return x.prodCatgory == 3 })?.[0]?.indexValue || 0,
|
|
305
|
|
- // },
|
|
306
|
|
- // {
|
|
307
|
|
- // prodCatgory: "产品-氢氧化锂",
|
|
308
|
|
- // indexValue: datas?.filter(x => { return x.prodCatgory == 4 })?.[0]?.indexValue || 0,
|
|
309
|
|
- // },
|
|
310
|
|
- // {
|
|
311
|
|
- // prodCatgory: "产品-金属锂",
|
|
312
|
|
- // indexValue: datas?.filter(x => { return x.prodCatgory == 5 })?.[0]?.indexValue || 0,
|
|
313
|
|
- // }
|
|
314
|
|
- // ]
|
|
315
|
|
- // }
|
|
|
293
|
+ // rawMaterial.push({prodCatgory:'锂辉石(化学级)-XXXXX仓',indexValue:33231.88})
|
|
|
294
|
+ // rawMaterial.push({prodCatgory:'锂辉石(化学级)-XXXXX仓',indexValue:33231.88})
|
|
|
295
|
+ // rawMaterial.push({prodCatgory:'锂辉石(化学级)-XXXXX仓',indexValue:33231.88})
|
|
|
296
|
+ // rawMaterial.push({prodCatgory:'锂辉石(化学级)-XXXXX仓',indexValue:33231.88})
|
|
|
297
|
+ // rawMaterial.push({prodCatgory:'锂辉石(化学级)-XXXXX仓',indexValue:33231.88})
|
|
316
|
298
|
return { rawMaterial: rawMaterial }
|
|
317
|
299
|
}
|
|
318
|
300
|
|
|
|
@@ -355,32 +337,37 @@ class Gvc extends Component {
|
|
355
|
337
|
<div className={"top_div"}>
|
|
356
|
338
|
<div class="animate__animated animate__pulse animate__slower animate__infinite">
|
|
357
|
339
|
{i === 0 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu1.png").default} alt="" />}
|
|
358
|
|
- {i === 1 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu2.png").default} alt="" />}
|
|
359
|
|
- {i === 2 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu3.png").default} alt="" />}
|
|
360
|
|
- {i === 3 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu4.png").default} alt="" />}
|
|
|
340
|
+ {i === 1 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu1.png").default} alt="" />}
|
|
|
341
|
+ {i === 2 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu2.png").default} alt="" />}
|
|
|
342
|
+ {i === 3 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu3.png").default} alt="" />}
|
|
|
343
|
+ {i === 4 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu4.png").default} alt="" />}
|
|
361
|
344
|
{i === 0 && <img src={require("@assets/imgs/gvc/qiuH1.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
362
|
|
- {i === 1 && <img src={require("@assets/imgs/gvc/qiuH2.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
363
|
|
- {i === 2 && <img src={require("@assets/imgs/gvc/qiuH3.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
364
|
|
- {i === 3 && <img src={require("@assets/imgs/gvc/qiuH4.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
|
345
|
+ {i === 1 && <img src={require("@assets/imgs/gvc/qiuH1.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
|
346
|
+ {i === 2 && <img src={require("@assets/imgs/gvc/qiuH2.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
|
347
|
+ {i === 3 && <img src={require("@assets/imgs/gvc/qiuH3.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
|
348
|
+ {i === 4 && <img src={require("@assets/imgs/gvc/qiuH4.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
|
|
365
|
349
|
<span>{x.txt_name}</span>
|
|
366
|
350
|
</div>
|
|
367
|
351
|
</div>
|
|
368
|
352
|
<div className="text">
|
|
369
|
353
|
<div>
|
|
370
|
|
- <p>累计产量</p>
|
|
|
354
|
+ <p>{i == 0 ? '库存' : '累计产量'}</p>
|
|
371
|
355
|
{
|
|
372
|
356
|
!changGif ? <span class="topMsg_number shu1">{x.num1}</span> : <span class="topMsg_number">{getThousandNum(x.num1)}</span>
|
|
373
|
357
|
}
|
|
374
|
358
|
|
|
375
|
359
|
<span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
|
|
376
|
360
|
</div>
|
|
377
|
|
- <div>
|
|
378
|
|
- <p>产品库存</p>
|
|
379
|
|
- {
|
|
380
|
|
- !changGif ? <span class="topMsg_number shu1">{x.num2}</span> : <span class="topMsg_number">{getThousandNum(x.num2)}</span>
|
|
381
|
|
- }
|
|
382
|
|
- <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
|
|
383
|
|
- </div>
|
|
|
361
|
+ {
|
|
|
362
|
+ i != 0 && <div>
|
|
|
363
|
+ <p>产品库存</p>
|
|
|
364
|
+ {
|
|
|
365
|
+ !changGif ? <span class="topMsg_number shu1">{x.num2}</span> : <span class="topMsg_number">{getThousandNum(x.num2)}</span>
|
|
|
366
|
+ }
|
|
|
367
|
+ <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
|
|
|
368
|
+ </div>
|
|
|
369
|
+
|
|
|
370
|
+ }
|
|
384
|
371
|
</div>
|
|
385
|
372
|
</li>
|
|
386
|
373
|
|
|
|
@@ -400,7 +387,7 @@ class Gvc extends Component {
|
|
400
|
387
|
{/* 右键切换大屏 */}
|
|
401
|
388
|
<Tooltip placement="bottom" title={"数据运营中心"}>
|
|
402
|
389
|
<img src={require("@assets/imgs/iconJpg/rightJ.png").default} alt="" className={"rightJ_png"} onClick={() => {
|
|
403
|
|
- deleteCacheAndChangeUrl("/home/operation",(url)=>{
|
|
|
390
|
+ deleteCacheAndChangeUrl("/home/operation", (url) => {
|
|
404
|
391
|
this.props.history.replace(url);
|
|
405
|
392
|
})
|
|
406
|
393
|
|
|
|
@@ -408,7 +395,7 @@ class Gvc extends Component {
|
|
408
|
395
|
</Tooltip>
|
|
409
|
396
|
<Tooltip placement="bottom" title={"数据运营中心"}>
|
|
410
|
397
|
<img src={require("@assets/imgs/iconJpg/rightJL.png").default} alt="" className={"rightJ_png rightJ_png_L"} onClick={() => {
|
|
411
|
|
- deleteCacheAndChangeUrl("/home/operation",(url)=>{
|
|
|
398
|
+ deleteCacheAndChangeUrl("/home/operation", (url) => {
|
|
412
|
399
|
this.props.history.replace(url);
|
|
413
|
400
|
})
|
|
414
|
401
|
}} />
|
|
|
@@ -494,7 +481,7 @@ class Gvc extends Component {
|
|
494
|
481
|
|
|
495
|
482
|
<span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
|
|
496
|
483
|
</div>
|
|
497
|
|
- <div style={{width:"60%"}}>
|
|
|
484
|
+ <div style={{ width: "60%" }}>
|
|
498
|
485
|
<p>产品库存</p>
|
|
499
|
486
|
{
|
|
500
|
487
|
!changGif ? <span class="nums shu1">{item.inventory}</span> : <span class="nums">{getThousandNum(item.inventory)}</span>
|