@dayan_hjm 1 anno fa
parent
commit
37585d3c60
3 ha cambiato i file con 80 aggiunte e 67 eliminazioni
  1. 8 1
      src/assets/css/styleTemplate.less
  2. 28 9
      src/pages/gvc/style.less
  3. 44 57
      src/pages/gvc/view.jsx

+ 8 - 1
src/assets/css/styleTemplate.less

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 茶百道主题样式
2
  * @Author: dayan_hjm 茶百道主题样式
3
  * @Date: 2022-10-27 10:56:37 
3
  * @Date: 2022-10-27 10:56:37 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-12-19 16:04:03
5
+ * @Last Modified time: 2024-07-21 17:58:15
6
  */
6
  */
7
 
7
 
8
 @import url("../../themes/themes.less");
8
 @import url("../../themes/themes.less");
@@ -377,6 +377,13 @@
377
         padding: 1% 0 0 10%;
377
         padding: 1% 0 0 10%;
378
       }
378
       }
379
     }
379
     }
380
+    @media (max-height: 900px) {
381
+      .video_box{
382
+        top: -2em;
383
+      }
384
+
385
+    }
386
+
380
 
387
 
381
   }
388
   }
382
 
389
 

+ 28 - 9
src/pages/gvc/style.less

@@ -64,7 +64,7 @@
64
           width: 17%;
64
           width: 17%;
65
           /* padding: 0 1em; */
65
           /* padding: 0 1em; */
66
           height: 70%;
66
           height: 70%;
67
-          margin-top: 5%;
67
+          margin-top: 4%;
68
           margin-left: 1%;
68
           margin-left: 1%;
69
           padding-right: 7%;
69
           padding-right: 7%;
70
 
70
 
@@ -76,21 +76,21 @@
76
             flex-wrap: wrap;
76
             flex-wrap: wrap;
77
 
77
 
78
             >li {
78
             >li {
79
-              height: 20%;
79
+              height: 22%;
80
               width: 100%;
80
               width: 100%;
81
               color: #fff;
81
               color: #fff;
82
               display: block;
82
               display: block;
83
 
83
 
84
               .top_div {
84
               .top_div {
85
                 background: none;
85
                 background: none;
86
-                width: 100%;
86
+                width: 110%;
87
                 height: 60%;
87
                 height: 60%;
88
                 display: flex;
88
                 display: flex;
89
                 align-items: center;
89
                 align-items: center;
90
                 justify-content: center;
90
                 justify-content: center;
91
 
91
 
92
                 >div {
92
                 >div {
93
-                  width: 51%;
93
+                  width: 47%;
94
                   position: relative;
94
                   position: relative;
95
                   display: block;
95
                   display: block;
96
 
96
 
@@ -101,7 +101,7 @@
101
                   >span {
101
                   >span {
102
                     font-size: 0.9em;
102
                     font-size: 0.9em;
103
                     position: absolute;
103
                     position: absolute;
104
-                    width: 100%;
104
+                    width: 110%;
105
                     bottom: 15%;
105
                     bottom: 15%;
106
                     left: 63%;
106
                     left: 63%;
107
                     transform: skew(4deg, 334deg);
107
                     transform: skew(4deg, 334deg);
@@ -124,7 +124,7 @@
124
                 display: flex;
124
                 display: flex;
125
                 align-items: center;
125
                 align-items: center;
126
                 justify-content: space-between;
126
                 justify-content: space-between;
127
-                margin-top: 1em;
127
+                // margin-top: 1em;
128
                 font-weight: normal;
128
                 font-weight: normal;
129
                 font-size: 0.9em;
129
                 font-size: 0.9em;
130
                 color: #CDF1FF;
130
                 color: #CDF1FF;
@@ -144,12 +144,17 @@
144
         }
144
         }
145
 
145
 
146
         @media (max-height: 900px) {
146
         @media (max-height: 900px) {
147
+          .leftContent{
148
+            margin-top: 1%;
149
+            height: 75%;
150
+          }
147
           .leftContent li {
151
           .leftContent li {
148
-            height: 15% !important;
152
+            height: 23% !important;
149
 
153
 
150
             .text {
154
             .text {
151
               width: 107% !important;
155
               width: 107% !important;
152
-              margin-top: 1em !important;
156
+              margin-top: 0;
157
+              padding-top: 0.5em !important;
153
 
158
 
154
               .topMsg_number {
159
               .topMsg_number {
155
                 font-size: 1em !important;
160
                 font-size: 1em !important;
@@ -197,6 +202,7 @@
197
                 
202
                 
198
             }
203
             }
199
           }
204
           }
205
+
200
         }
206
         }
201
 
207
 
202
         @media (min-height: 900px) {
208
         @media (min-height: 900px) {
@@ -239,7 +245,8 @@
239
 
245
 
240
           li {
246
           li {
241
             position: absolute;
247
             position: absolute;
242
-            width: 19em;
248
+            width: 25em;
249
+            z-index: 10;
243
             height: 4em;
250
             height: 4em;
244
             opacity: 1;
251
             opacity: 1;
245
             background: linear-gradient(0deg, #ffffff26 0%, #ffffff00 100%);
252
             background: linear-gradient(0deg, #ffffff26 0%, #ffffff00 100%);
@@ -323,11 +330,23 @@
323
               }
330
               }
324
             }
331
             }
325
           }
332
           }
333
+          @media (max-height: 900px) {
334
+            li .hoverDiv{
335
+              background:linear-gradient(0deg, #292929 0%, #252525 100%)!important;
336
+            }
337
+  
338
+          }
339
+
326
 
340
 
327
           li:hover {
341
           li:hover {
328
             background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
342
             background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
329
           }
343
           }
330
         }
344
         }
345
+        @media (max-height: 900px) {
346
+          .imgMsg {
347
+            top: -1.5em;
348
+          }
349
+        }
331
 
350
 
332
         .rightContent {
351
         .rightContent {
333
           width: 15%;
352
           width: 15%;

+ 44 - 57
src/pages/gvc/view.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm  产供销价值链
2
  * @Author: dayan_hjm  产供销价值链
3
  * @Date: 2023-11-10 10:19:34 
3
  * @Date: 2023-11-10 10:19:34 
4
  * @Last Modified by: dayan_hjm
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
 import React, { useState, useEffect, Component } from "react";
8
 import React, { useState, useEffect, Component } from "react";
@@ -24,7 +24,7 @@ import {
24
 } from "./api";
24
 } from "./api";
25
 import MapViewTwo from "./component/mapView2.jsx";
25
 import MapViewTwo from "./component/mapView2.jsx";
26
 import mpVideoGvc from "@assets/imgs/dataVimg/videoGvc2.mp4";
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
 import 'animate.css';
28
 import 'animate.css';
29
 import { get } from "lodash";
29
 import { get } from "lodash";
30
 import $store from "@store/";
30
 import $store from "@store/";
@@ -66,7 +66,7 @@ class Gvc extends Component {
66
           $store.app.setMarkSrc(
66
           $store.app.setMarkSrc(
67
             setWaterMark({
67
             setWaterMark({
68
               toDataURL: true,
68
               toDataURL: true,
69
-              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"),timestampToTime()],
69
+              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
70
             })
70
             })
71
           );
71
           );
72
         } else {
72
         } else {
@@ -127,10 +127,10 @@ class Gvc extends Component {
127
         btn.removeEventListener('click', play);
127
         btn.removeEventListener('click', play);
128
         // 如果他自动播放了就隐藏按钮,消除点击事件
128
         // 如果他自动播放了就隐藏按钮,消除点击事件
129
       } catch (err) {
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
         // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
134
         // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
135
       }
135
       }
136
     }
136
     }
@@ -151,11 +151,11 @@ class Gvc extends Component {
151
         btn.removeEventListener('click', play);
151
         btn.removeEventListener('click', play);
152
       }
152
       }
153
       else {
153
       else {
154
-        if(model){
154
+        if (model) {
155
           model.style.display = 'block';
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
     play()
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
         this.setState({ LeftHtml });
181
         this.setState({ LeftHtml });
181
       }
182
       }
182
     });
183
     });
@@ -184,7 +185,7 @@ class Gvc extends Component {
184
   async getUrl2() {
185
   async getUrl2() {
185
     await bigShopService().then(({ data = [], resultCode }) => {
186
     await bigShopService().then(({ data = [], resultCode }) => {
186
       if (+resultCode === 0) {
187
       if (+resultCode === 0) {
187
-        const name_ = ["", "锂辉石库存量", "锂辉石库存量", "累计运输锂辉石"];
188
+        const name_ = ["", "锂辉石(化学级)库存量", "锂辉石(化学级)库存量", "累计运输锂辉石(化学级)"];
188
         const style__ = [{}, { left: "34%", top: "30%" }, { left: "11%", top: "48%" }, { left: "0%", top: "22%" }]
189
         const style__ = [{}, { left: "34%", top: "30%" }, { left: "11%", top: "48%" }, { left: "0%", top: "22%" }]
189
         data = data.map((x, i) => {
190
         data = data.map((x, i) => {
190
           return {
191
           return {
@@ -237,9 +238,9 @@ class Gvc extends Component {
237
 
238
 
238
         console.log(old_imgMsgData, "old_imgMsgData")
239
         console.log(old_imgMsgData, "old_imgMsgData")
239
         this.store.saveState({ imgMsgData: old_imgMsgData });
240
         this.store.saveState({ imgMsgData: old_imgMsgData });
240
-        setTimeout(()=>{
241
+        setTimeout(() => {
241
           this.getUrl5()
242
           this.getUrl5()
242
-        },500)
243
+        }, 500)
243
       }
244
       }
244
     });
245
     });
245
   }
246
   }
@@ -270,9 +271,9 @@ class Gvc extends Component {
270
         old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
271
         old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
271
         console.log(old_imgMsgData, "1111old_imgMsgData")
272
         console.log(old_imgMsgData, "1111old_imgMsgData")
272
         this.store.saveState({ imgMsgData: old_imgMsgData });
273
         this.store.saveState({ imgMsgData: old_imgMsgData });
273
-        setTimeout(()=>{
274
+        setTimeout(() => {
274
           this.getUrl6()
275
           this.getUrl6()
275
-        },1000)
276
+        }, 1000)
276
 
277
 
277
       }
278
       }
278
     });
279
     });
@@ -283,36 +284,17 @@ class Gvc extends Component {
283
       if (+resultCode === 0) {
284
       if (+resultCode === 0) {
284
         function getItems(num) {
285
         function getItems(num) {
285
           const datas = data.filter(x => { return x.factoryCode == num });
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
             return {
288
             return {
288
               prodCatgory: item.prodCatgory,
289
               prodCatgory: item.prodCatgory,
289
               indexValue: getThousandNum(item.indexValue),
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
           return { rawMaterial: rawMaterial }
298
           return { rawMaterial: rawMaterial }
317
         }
299
         }
318
 
300
 
@@ -355,32 +337,37 @@ class Gvc extends Component {
355
         <div className={"top_div"}>
337
         <div className={"top_div"}>
356
           <div class="animate__animated animate__pulse animate__slower animate__infinite">
338
           <div class="animate__animated animate__pulse animate__slower animate__infinite">
357
             {i === 0 && <img class="img1" src={require("@assets/imgs/dataVimg/qiu1.png").default} alt="" />}
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
             {i === 0 && <img src={require("@assets/imgs/gvc/qiuH1.png").default} alt="" class="img2 animate__animated animate__heartBeat animate__slower animate__infinite" />}
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
             <span>{x.txt_name}</span>
349
             <span>{x.txt_name}</span>
366
           </div>
350
           </div>
367
         </div>
351
         </div>
368
         <div className="text">
352
         <div className="text">
369
           <div>
353
           <div>
370
-            <p>累计产量</p>
354
+            <p>{i == 0 ? '库存' : '累计产量'}</p>
371
             {
355
             {
372
               !changGif ? <span class="topMsg_number shu1">{x.num1}</span> : <span class="topMsg_number">{getThousandNum(x.num1)}</span>
356
               !changGif ? <span class="topMsg_number shu1">{x.num1}</span> : <span class="topMsg_number">{getThousandNum(x.num1)}</span>
373
             }
357
             }
374
 
358
 
375
             <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
359
             <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
376
           </div>
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
         </div>
371
         </div>
385
       </li>
372
       </li>
386
 
373
 
@@ -400,7 +387,7 @@ class Gvc extends Component {
400
         {/* 右键切换大屏 */}
387
         {/* 右键切换大屏 */}
401
         <Tooltip placement="bottom" title={"数据运营中心"}>
388
         <Tooltip placement="bottom" title={"数据运营中心"}>
402
           <img src={require("@assets/imgs/iconJpg/rightJ.png").default} alt="" className={"rightJ_png"} onClick={() => {
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
               this.props.history.replace(url);
391
               this.props.history.replace(url);
405
             })
392
             })
406
 
393
 
@@ -408,7 +395,7 @@ class Gvc extends Component {
408
         </Tooltip>
395
         </Tooltip>
409
         <Tooltip placement="bottom" title={"数据运营中心"}>
396
         <Tooltip placement="bottom" title={"数据运营中心"}>
410
           <img src={require("@assets/imgs/iconJpg/rightJL.png").default} alt="" className={"rightJ_png rightJ_png_L"} onClick={() => {
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
               this.props.history.replace(url);
399
               this.props.history.replace(url);
413
             })
400
             })
414
           }} />
401
           }} />
@@ -494,7 +481,7 @@ class Gvc extends Component {
494
 
481
 
495
                               <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
482
                               <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
496
                             </div>
483
                             </div>
497
-                            <div style={{width:"60%"}}>
484
+                            <div style={{ width: "60%" }}>
498
                               <p>产品库存</p>
485
                               <p>产品库存</p>
499
                               {
486
                               {
500
                                 !changGif ? <span class="nums shu1">{item.inventory}</span> : <span class="nums">{getThousandNum(item.inventory)}</span>
487
                                 !changGif ? <span class="nums shu1">{item.inventory}</span> : <span class="nums">{getThousandNum(item.inventory)}</span>