@dayan_hjm 2 gadi atpakaļ
vecāks
revīzija
7275748ce4
3 mainītis faili ar 32 papildinājumiem un 29 dzēšanām
  1. 2 1
      src/pages/gvc/style.less
  2. 28 26
      src/pages/gvc/view.jsx
  3. 2 2
      src/pages/tqcDataVHome/view.jsx

+ 2 - 1
src/pages/gvc/style.less

@@ -273,7 +273,8 @@
273 273
               align-items: center;
274 274
               justify-content: space-between;
275 275
               padding: 0 1em;
276
-              background: linear-gradient(0deg, #ffffff00 20%, #7a7a7a29 100%);
276
+              background:linear-gradient(0deg, #292929f2 0%, #25252540 100%); 
277
+              // linear-gradient(0deg, #ffffff00 20%, #7a7a7a29 100%);
277 278
               width: 100%;
278 279
               border-radius: 0.5em;
279 280
               box-sizing: border-box;

+ 28 - 26
src/pages/gvc/view.jsx

@@ -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: 2023-11-23 10:27:14
5
+ * @Last Modified time: 2023-11-27 17:16:02
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -83,12 +83,10 @@ class Gvc extends Component {
83 83
       this.setState({ changGif: true });
84 84
       $(".shu1").numScroll();
85 85
     }, 3000)
86
-    setTimeout(() => {
87
-      this.getUrl5()
88
-      setTimeout(() => {
89
-        this.getUrl6()
90
-      }, 500)
91
-    }, 2000)
86
+    // setTimeout(() => {
87
+    //   setTimeout(() => {
88
+    //   }, 500)
89
+    // }, 4000)
92 90
   }
93 91
   videoStart() {
94 92
     /*     Chrome 浏览器的视频自动播放策略
@@ -126,6 +124,7 @@ class Gvc extends Component {
126 124
     //第二种方法比较主流,类似的有网页版抖音以及B站
127 125
     function play() {
128 126
       video.muted = true;//设置视频为静音
127
+      video.playbackRate = 0.7;//设置视频为静音
129 128
       video.play();//调用播放方法
130 129
       const ctx = new AudioContext();
131 130
       const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
@@ -195,8 +194,8 @@ class Gvc extends Component {
195 194
   async getUrl4() {
196 195
     await smallShopService().then(({ data = [], resultCode }) => {
197 196
       if (+resultCode === 0) {
198
-        const style__ = [{}, { left: "88%", top: "28%" }, { left: "70%", top: "46%" }, { left: "52%", top: "59%" }, { left: "11%", top: "92%" }, { left: "29%", top: "76%" }]
199
-        data = data.map((x, i) => {
197
+        const style__ = [{}, { left: "88%", top: "28%" }, { left: "70%", top: "46%" }, { left: "52%", top: "59%" }, { left: "11%", top: "90%" }, { left: "29%", top: "76%" }]
198
+        data = data.map((x, i) => {0
200 199
           return {
201 200
             ...x,
202 201
             total: 0,
@@ -209,7 +208,7 @@ class Gvc extends Component {
209 208
         const d_1 = data.filter(x => { return x.factoryCode == 4 })[0];
210 209
         const d_2 = data.filter(x => { return x.factoryCode == 5 })[0];
211 210
         const d_3 = data.filter(x => { return x.factoryCode == 3 })[0];
212
-        const d_4 = data.filter(x=>{return x.factoryCode == 2})[0];
211
+        const d_4 = data.filter(x => { return x.factoryCode == 2 })[0];
213 212
         const d_5 = data.filter(x => { return x.factoryCode == 1 })[0];
214 213
         let old_imgMsgData = this.store.state.imgMsgData;
215 214
         old_imgMsgData[3] = d_1;
@@ -219,6 +218,7 @@ class Gvc extends Component {
219 218
         old_imgMsgData[7] = d_5;
220 219
         console.log(old_imgMsgData, "old_imgMsgData")
221 220
         this.store.saveState({ imgMsgData: old_imgMsgData });
221
+        this.getUrl5()
222 222
       }
223 223
     });
224 224
   }
@@ -249,6 +249,8 @@ class Gvc extends Component {
249 249
         old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
250 250
         console.log(old_imgMsgData, "1111old_imgMsgData")
251 251
         this.store.saveState({ imgMsgData: old_imgMsgData });
252
+        this.getUrl6()
253
+
252 254
       }
253 255
     });
254 256
   }
@@ -258,10 +260,10 @@ class Gvc extends Component {
258 260
       if (+resultCode === 0) {
259 261
         function getItems(num) {
260 262
           const datas = data.filter(x => { return x.factoryCode == num });
261
-          const rawMaterial = datas.map((item,index)=>{
263
+          const rawMaterial = datas.map((item, index) => {
262 264
             return {
263
-              prodCatgory:item.prodCatgory,
264
-              indexValue:item.indexValue,
265
+              prodCatgory: item.prodCatgory,
266
+              indexValue: item.indexValue,
265 267
             }
266 268
           })
267 269
           // const par = {
@@ -288,7 +290,7 @@ class Gvc extends Component {
288 290
           //     }
289 291
           //   ]
290 292
           // }
291
-          return {rawMaterial:rawMaterial}
293
+          return { rawMaterial: rawMaterial }
292 294
         }
293 295
 
294 296
         const d_1 = getItems(5);
@@ -384,7 +386,7 @@ class Gvc extends Component {
384 386
           <MapViewTwo></MapViewTwo>
385 387
           <div className={"video_box gvc_video"}>
386 388
             <div className="alls">
387
-            <video src={mpVideoGvc} autoplay="autoplay" loop="loop" class="video_box_2 center_box2 animate__animated animate__fadeIn animate__delay-2s">
389
+              <video src={mpVideoGvc} playbackRate={0.5} autoplay="autoplay" loop="loop" class="video_box_2 center_box2 animate__animated animate__fadeIn animate__delay-2s">
388 390
               </video>
389 391
             </div>
390 392
 
@@ -404,7 +406,7 @@ class Gvc extends Component {
404 406
               <ul className="imgMsg">
405 407
                 {
406 408
                   toJS(imgMsgData).map((item, index) => {
407
-                    if(!item){return}
409
+                    if (!item) { return }
408 410
                     return (
409 411
                       <li style={{ ...item?.styles }} class="animate__animated animate__bounceInUp animate__slower">
410 412
                         {/* 矿产 */}
@@ -422,7 +424,15 @@ class Gvc extends Component {
422 424
                           item.cumulativeProduction !== null && <div className="hoverR">
423 425
                             <div className="hoverDiv chanL">
424 426
                               {/* <div style={{ width: "62%","textAlign":'right' }}> */}
425
-                              <div style={{ width: "70%"}}>
427
+                              <div style={{ width: "38%" }}>
428
+                                <p className="title">
429
+                                  产量/吨
430
+                                </p>
431
+                                <span>日:{item.day}</span>
432
+                                <span>月:{item.mood}</span>
433
+                                <span>年:{item.year}</span>
434
+                              </div>
435
+                              <div style={{ width: "58%" }}>
426 436
                                 <p className="title">
427 437
                                   库存/吨
428 438
                                 </p>
@@ -432,14 +442,6 @@ class Gvc extends Component {
432 442
                                   })
433 443
                                 }
434 444
                               </div>
435
-                              <div style={{ width: "38%" }}>
436
-                                <p className="title">
437
-                                  产量/吨
438
-                                </p>
439
-                                <span>日:{item.day}</span>
440
-                                <span>月:{item.mood}</span>
441
-                                <span>年:{item.year}</span>
442
-                              </div>
443 445
                             </div>
444 446
                           </div>
445 447
                         }
@@ -476,7 +478,7 @@ class Gvc extends Component {
476 478
             </div>
477 479
             <div className="bottom_box">
478 480
               <p style={{ color: "#6a818d", lineHeight: '2px', width: '100%', textAlign: "center" }}>
479
-                更新时间 : {updateTime}
481
+                更新时间 : {updateTime?updateTime.split(" ")[0]:updateTime}
480 482
               </p>
481 483
             </div>
482 484
           </div>

+ 2 - 2
src/pages/tqcDataVHome/view.jsx

@@ -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-16 10:35:01
5
+ * @Last Modified time: 2023-11-27 17:16:04
6 6
  */
7 7
 /*
8 8
  * @Author: dayan_hjm 
@@ -370,7 +370,7 @@ class Home extends Component {
370 370
           </div>
371 371
           <div className="bottom_box">
372 372
             <p style={{ color: "#6a818d",lineHeight:'2px' }}>
373
-              更新时间 : {updateTime}
373
+            更新时间 : {updateTime?updateTime.split(" ")[0]:updateTime}
374 374
             </p>
375 375
           </div>
376 376