4 Коммиты 02ecedacf9 ... b968a5e959

Автор SHA1 Сообщение Дата
  yuzipei b968a5e959 fix недель назад: 3
  yuzipei 81beef022c fix 1 месяц назад
  yuzipei 76dca44d12 硅铝微粉联调 1 месяц назад
  yuzipei c3e8a48a27 大屏改造 месяцев назад: 3
36 измененных файлов с 5121 добавлено и 551 удалено
  1. 4 3
      config/webpack.common.js
  2. 7 7
      config/webpack.dev.js
  3. 259 88
      src/assets/css/styleTemplate.less
  4. BIN
      src/assets/imgs/dataVImg/gvcVideo1.mp4
  5. BIN
      src/assets/imgs/dataVImg/gvcVideo2.mp4
  6. BIN
      src/assets/imgs/dataVImg/gvcbg.png
  7. BIN
      src/assets/imgs/dataVImg/sialBgDataV.png
  8. BIN
      src/assets/imgs/dataVImg/sial_video1.mp4
  9. BIN
      src/assets/imgs/dataVImg/sial_video2.mp4
  10. 18 18
      src/pages/frame/component/modelMsg/view.jsx
  11. 3 2
      src/pages/frame/view.jsx
  12. 230 0
      src/pages/gvc/api3.js
  13. 3 3
      src/pages/gvc/component/mapView2.jsx
  14. 10 10
      src/pages/gvc/component/rightBottomView.jsx
  15. 162 180
      src/pages/gvc/mod.js
  16. 302 173
      src/pages/gvc/style.less
  17. 69 48
      src/pages/gvc/view.jsx
  18. 362 0
      src/pages/sial/api.js
  19. 287 0
      src/pages/sial/component/bottomLineForSend.jsx
  20. 219 0
      src/pages/sial/component/dryBaseQualified.jsx
  21. 425 0
      src/pages/sial/component/leftMenoyView.jsx
  22. 112 0
      src/pages/sial/component/mapView.jsx
  23. 243 0
      src/pages/sial/component/moodProductionView.jsx
  24. 243 0
      src/pages/sial/component/moodSendView.jsx
  25. 214 0
      src/pages/sial/component/oneQualified.jsx
  26. 311 0
      src/pages/sial/component/rightBottomView.jsx
  27. 11 0
      src/pages/sial/index.jsx
  28. 72 0
      src/pages/sial/mod.js
  29. 634 0
      src/pages/sial/style.less
  30. 663 0
      src/pages/sial/view.jsx
  31. 1 1
      src/pages/tlk/api.js
  32. 1 1
      src/pages/tqcDataVHome/api.js
  33. 232 0
      src/pages/tqcDataVHome/api2.js
  34. 5 5
      src/pages/tqcDataVHome/view.jsx
  35. 14 7
      src/router/router.js
  36. 5 5
      src/utils/util.js

+ 4 - 3
config/webpack.common.js

@@ -24,8 +24,8 @@ const plugins = [
24 24
       charset: "utf-8",
25 25
     },
26 26
     rootEl: "<div id='app'></div>",
27
-    favicon: path.resolve(__dirname,"../public/favicon.ico"),
28
-    globalApi: path.resolve(__dirname,"../public/baseUrlConfig.js"),
27
+    favicon: path.resolve(__dirname, "../public/favicon.ico"),
28
+    globalApi: path.resolve(__dirname, "../public/baseUrlConfig.js"),
29 29
     publicPath: './'
30 30
   }),
31 31
   new HtmlWebpackPlugin({
@@ -118,7 +118,8 @@ module.exports = {
118 118
           },
119 119
         }],
120 120
       },
121
-      { test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/, 
121
+      {
122
+        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
122 123
         // use: 'file-loader' ,
123 124
         use: [{
124 125
           loader: 'file-loader',

+ 7 - 7
config/webpack.dev.js

@@ -133,20 +133,20 @@ module.exports = merge(common, {
133 133
     hot: true,
134 134
     proxy: {
135 135
       "/api": {
136
-        target: "http://10.9.9.182:9081",
136
+        //target: "http://10.9.9.182:9081",
137 137
         // target: "http://dataportal-test.agile.com.cn:8081"
138 138
         // target: "http://10.9.9.173:9081",
139
-        // target:"https://dms.dataportal.tianqilithium.com:9000",
140
-        changeOrigin:true,
139
+        target: "https://dms.dataportal.tianqilithium.com:9000",
140
+        changeOrigin: true,
141 141
 
142 142
       },
143 143
       "/dataengine-center-oneservice": {
144
-        target: "http://10.9.9.182:9081",
144
+        // target: "http://10.9.9.182:9081",
145 145
         // target: "http://10.9.9.173:9081",
146
-        // target:"https://dms.dataportal.tianqilithium.com:9000",
147
-        changeOrigin:true,
146
+        target: "https://dms.dataportal.tianqilithium.com:9000",
147
+        changeOrigin: true,
148 148
       },
149
-      "/mock":{
149
+      "/mock": {
150 150
         target: "http://172.24.81.106:9999",
151 151
         pathRewrite: { '^/mock': '/api' },
152 152
       }

+ 259 - 88
src/assets/css/styleTemplate.less

@@ -13,16 +13,23 @@
13 13
     font-family: 'DingTalkJinBuTi', "DingTalkSans";
14 14
   }
15 15
 
16
+  .mgb_box {
17
+    margin-bottom: 3% !important;
18
+  }
19
+
16 20
   #echarts7 {
17 21
     min-width: 400px;
18 22
     width: 95%;
19 23
     height: 90%;
20
-    >div{
24
+
25
+    >div {
21 26
       text-align: left;
22 27
     }
23 28
   }
24 29
 
25 30
 
31
+
32
+
26 33
   .hidetip {
27 34
     display: none;
28 35
   }
@@ -244,8 +251,9 @@
244 251
     background-color: #0a091e;
245 252
 
246 253
   }
254
+
247 255
   #app .tlkTop2 {
248
-    background: url(../imgs/dataVimg/topBg2.png) no-repeat 0 0 / 100% 100% #0a091e!important;
256
+    background: url(../imgs/dataVimg/topBg2.png) no-repeat 0 0 / 100% 100% #0a091e !important;
249 257
   }
250 258
 
251 259
   #app .top {
@@ -354,15 +362,17 @@
354 362
     width: 100%;
355 363
     height: 100%;
356 364
     background: url(../imgs/dataVimg/homeBgDataV.png) no-repeat 0 -10em / 100% 120% #041b40;
357
-    .rightJ_png{
365
+
366
+    .rightJ_png {
358 367
       position: absolute;
359
-        z-index: 99;
360
-        width: 2em;
361
-        right: 0.8em;
362
-        top: 44%;
363
-        opacity: .5;
368
+      z-index: 99;
369
+      width: 2em;
370
+      right: 0.8em;
371
+      top: 44%;
372
+      opacity: .5;
364 373
     }
365
-    .rightJ_png_L{
374
+
375
+    .rightJ_png_L {
366 376
       right: unset;
367 377
       left: 0.8em;
368 378
     }
@@ -390,13 +400,44 @@
390 400
         padding: 1% 0 0 10%;
391 401
       }
392 402
     }
393
-    @media (max-height: 900px) {
394
-      .video_box{
395
-        top: -2em;
396
-      }
397 403
 
404
+    .video_box3 {
405
+      position: absolute;
406
+      left: 0;
407
+      top: 0;
408
+      width: 98.5%;
409
+      // background: url(../imgs/dataVimg/homeBgDataV.png) no-repeat 0 -10em / 108% 120% #041b40;
410
+      height: 100%;
411
+      display: flex;
412
+      align-items: center;
413
+      justify-content: center;
414
+      flex-wrap: wrap;
415
+      pointer-events: none;
416
+      z-index: 1;
417
+
418
+      video {
419
+        width: 40%;
420
+        // height: 45%;
421
+        margin-top: -10%;
422
+        // padding: 1% 0 0 10%;
423
+      }
398 424
     }
399 425
 
426
+    // @media (max-height: 900px) {
427
+    //   .video_box3 {
428
+    //     top: -2em;
429
+    //   }
430
+
431
+    // }
432
+
433
+
434
+    // @media (max-height: 900px) {
435
+    //   .video_box {
436
+    //     top: -2em;
437
+    //   }
438
+
439
+    // }
440
+
400 441
 
401 442
   }
402 443
 
@@ -428,6 +469,117 @@
428 469
         font-family: "DingTalk JinBuTi";
429 470
       }
430 471
 
472
+      .topMsgCommond {
473
+        width: 100%;
474
+        height: 100%;
475
+
476
+        .topMsg_content {
477
+          height: calc(100% - 1em);
478
+          font-size: 2em;
479
+          color: #69FFDE;
480
+          background: url(../imgs/dataVimg/sunGong.gif) no-repeat 48% 0/86% 100%;
481
+          text-align: center;
482
+          display: flex;
483
+          align-items: center;
484
+          justify-content: center;
485
+
486
+          .topMsg_box {
487
+            width: 52%;
488
+
489
+            .topMsg_number_p {
490
+              font-size: 0.5em;
491
+              line-height: 0em;
492
+              color: #fff;
493
+              font-weight: 100;
494
+              margin-top: 0.8em;
495
+            }
496
+          }
497
+
498
+          .topMsg_number_2 {
499
+            font-size: 0.5em;
500
+          }
501
+        }
502
+
503
+        .changBg_topMsg_content {
504
+          background: url(../imgs/dataVimg/sunGong2.gif) no-repeat 48% 0/86% 100%;
505
+        }
506
+
507
+        .icon_c {
508
+          width: 100%;
509
+          display: flex;
510
+          align-items: flex-start;
511
+          justify-content: unset !important;
512
+          flex-wrap: wrap;
513
+          height: calc(100% - 40px);
514
+          overflow-y: scroll;
515
+
516
+          .icon_p {
517
+            width: 33%;
518
+            display: flex;
519
+            align-items: center;
520
+            justify-content: center;
521
+            flex-wrap: wrap;
522
+            padding: 2px 0;
523
+            cursor: pointer;
524
+            position: relative;
525
+
526
+            >i {
527
+              display: flex;
528
+              width: 54px;
529
+              height: 54px;
530
+              background: @dy-active;
531
+              color: #fff;
532
+              border-radius: 50%;
533
+              text-align: center;
534
+              justify-content: center;
535
+              line-height: 50px;
536
+              font-size: 23px;
537
+              font-style: normal;
538
+              font-weight: 700;
539
+            }
540
+
541
+            >span {
542
+              display: flex;
543
+              width: 100%;
544
+              justify-content: center;
545
+              margin-top: 5px;
546
+            }
547
+
548
+            .delectt {
549
+              display: none;
550
+              position: absolute;
551
+              background: #ff3737;
552
+              width: 20px;
553
+              height: 20px;
554
+              border-radius: 50%;
555
+              line-height: 13px;
556
+              font-size: 28px;
557
+              top: 0;
558
+              right: 14px;
559
+              color: #fff;
560
+            }
561
+          }
562
+
563
+          .icon_p:hover {
564
+            .delectt {
565
+              display: block;
566
+            }
567
+          }
568
+        }
569
+
570
+        .icon_c::-webkit-scrollbar {
571
+          display: none;
572
+          scrollbar-width: none;
573
+          -ms-overflow-style: none;
574
+        }
575
+
576
+        .icon_c:hover::-webkit-scrollbar {
577
+          display: unset;
578
+          scrollbar-width: unset;
579
+          -ms-overflow-style: unset;
580
+        }
581
+      }
582
+
431 583
       .leftContent {
432 584
         width: 28%;
433 585
         height: 88%;
@@ -523,20 +675,23 @@
523 675
                   font-size: 0.9em;
524 676
                 }
525 677
               }
678
+
526 679
               @media (min-height: 900px) {
527
-                .name_ul{
528
-                  top:1.5em
680
+                .name_ul {
681
+                  top: 1.5em
529 682
                 }
530 683
               }
531 684
 
532 685
 
533
-              #echarts4,#echarts41,
686
+              #echarts4,
687
+              #echarts41,
534 688
               #echarts6_box {
535 689
                 width: 45%;
536 690
                 height: 90%;
537 691
               }
538 692
 
539
-              #echarts4,#echarts41 {
693
+              #echarts4,
694
+              #echarts41 {
540 695
                 width: 55%;
541 696
               }
542 697
 
@@ -571,7 +726,8 @@
571 726
                   }
572 727
                 }
573 728
 
574
-                #echarts6,#echarts61 {
729
+                #echarts6,
730
+                #echarts61 {
575 731
                   width: 100%;
576 732
                   height: 100%;
577 733
                 }
@@ -607,7 +763,10 @@
607 763
             align-items: center;
608 764
             justify-content: center;
609 765
 
610
-            #chartmain,#chartmain2 {
766
+            #chartmain,
767
+            #chartSend,
768
+            #chartProduct,
769
+            #chartmain2 {
611 770
               min-width: 300px;
612 771
               width: 90%;
613 772
               height: 100%;
@@ -652,12 +811,15 @@
652 811
           display: flex;
653 812
           align-items: center;
654 813
 
655
-          #echarts5,#echarts51 {
814
+          #echarts5,
815
+          #echarts_drybase,
816
+          #echarts51 {
656 817
             min-width: 400px;
657 818
             width: 100%;
658 819
             height: 80%;
659 820
           }
660
-          #echarts51{
821
+
822
+          #echarts51 {
661 823
             height: 90%;
662 824
           }
663 825
         }
@@ -665,6 +827,7 @@
665 827
 
666 828
       .bigDivPd {}
667 829
 
830
+
668 831
       .titleDiv {
669 832
         width: 100%;
670 833
         display: flex;
@@ -702,79 +865,81 @@
702 865
         -ms-overflow-style: unset;
703 866
       }
704 867
 
868
+      .topMsg_2 .topMsg_content {
869
+        height: 80%;
870
+      }
705 871
 
706
-      .rightContent {
707
-        width: 28%;
708
-        height: 88%;
709
-        z-index: 9;
710
-        .bottomContent2{
711
-          width: 100%;
712
-          height: 28%;
713
-        }
714
-
715
-        .topMsg_2 .topMsg_content {
716
-          height: 80%;
717
-        }
718
-
719
-        .topMsg_22 {
720
-          width: 100%;
721
-          height: 28%;
722
-        }
723
-
724
-        .topMsg_33 {
725
-          width: 100%;
726
-          height: 22%;
727
-          margin-bottom: 2%;
728
-        }
872
+      .topMsg_22 {
873
+        width: 100%;
874
+        height: 28%;
875
+      }
729 876
 
730
-        .topMsg_2,
731
-        .topMsg_3 {
732
-          width: 100%;
733
-          height: 100%;
734
-        }
877
+      .topMsg_33 {
878
+        width: 100%;
879
+        height: 22%;
880
+        margin-bottom: 2%;
881
+      }
735 882
 
736
-        .topMsg_4 {
737
-          width: 100%;
738
-          height: 22%;
739
-        }
740 883
 
741
-        .topMsg_3 {
742
-          .topMsg_content {
743
-            height: calc(100% - 1em);
744
-            line-height: 2.8em;
745
-            font-size: 1.8em;
746
-            color: #69FFDE;
747
-            background: url(../imgs/dataVimg/wanchanglv.gif) no-repeat center center/ 71% 99%;
748
-            display: flex;
749
-            align-items: center;
750
-            justify-content: center;
884
+      .topMsg_2,
885
+      .topMsg_3 {
886
+        width: 100%;
887
+        height: 100%;
888
+      }
751 889
 
752
-            .topMsg_number_2 {
753
-              font-size: 0.5em;
754
-            }
890
+      .topMsg_4 {
891
+        width: 100%;
892
+        height: 22%;
893
+      }
755 894
 
756
-            .topMsg_number_p {
757
-              font-size: 0.5em;
758
-              line-height: 0em;
759
-              color: #fff;
760
-              font-weight: 100;
761
-              margin-top: -1.5em;
762
-            }
895
+      .topMsg_3 {
896
+        .topMsg_content {
897
+          height: calc(100% - 1em);
898
+          line-height: 2.8em;
899
+          font-size: 1.8em;
900
+          color: #69FFDE;
901
+          background: url(../imgs/dataVimg/wanchanglv.gif) no-repeat center center/ 71% 99%;
902
+          display: flex;
903
+          align-items: center;
904
+          justify-content: center;
763 905
 
906
+          .topMsg_number_2 {
907
+            font-size: 0.5em;
764 908
           }
765 909
 
766
-          .changBg_topMsg_content {
767
-            background: url(../imgs/dataVimg/wanchanglv2.gif) no-repeat center center / 84% 98%;
910
+          .topMsg_number_p {
911
+            font-size: 0.5em;
912
+            line-height: 0em;
913
+            color: #fff;
914
+            font-weight: 100;
915
+            margin-top: -1.5em;
768 916
           }
769 917
 
770 918
         }
771 919
 
772
-        .topMsg2 {
920
+        .changBg_topMsg_content {
921
+          background: url(../imgs/dataVimg/wanchanglv2.gif) no-repeat center center / 84% 98%;
922
+        }
923
+
924
+      }
925
+
926
+      .topMsg2 {
927
+        width: 100%;
928
+        height: 20%;
929
+        margin-bottom: 3%;
930
+      }
931
+
932
+      .rightContent {
933
+        width: 28%;
934
+        height: 88%;
935
+        z-index: 9;
936
+
937
+        .bottomContent2 {
773 938
           width: 100%;
774
-          height: 20%;
775
-          margin-bottom: 3%;
939
+          height: 28%;
776 940
         }
777 941
 
942
+
778 943
         .topMsg {
779 944
           width: 100%;
780 945
           height: 100%;
@@ -934,11 +1099,13 @@
934 1099
               justify-content: center;
935 1100
             }
936 1101
 
937
-            #echarts2,#echarts21 {
1102
+            #echarts2,
1103
+            #echarts21 {
938 1104
               min-width: 600px;
939 1105
               width: 95%;
940 1106
               height: 90%;
941
-              >div{
1107
+
1108
+              >div {
942 1109
                 text-align: left;
943 1110
               }
944 1111
             }
@@ -950,8 +1117,9 @@
950 1117
           background: url(../imgs/dataVimg/toplineB.png) no-repeat 0 bottom / 100% 11%;
951 1118
           height: 78%;
952 1119
         }
1120
+
953 1121
         @media (min-height: 900px) {
954
-          .center_li{
1122
+          .center_li {
955 1123
             height: 60%;
956 1124
           }
957 1125
         }
@@ -1194,7 +1362,7 @@
1194 1362
   .cbRightBottomView {
1195 1363
     flex-wrap: wrap;
1196 1364
     position: relative;
1197
-    
1365
+
1198 1366
     .right_b_tip2 {
1199 1367
       width: 46%;
1200 1368
       display: block;
@@ -1215,13 +1383,16 @@
1215 1383
       text-align: right;
1216 1384
     }
1217 1385
   }
1218
-.slider_item_box{
1219
-  justify-content: left;
1220
-  .slick-slider{
1221
-    width: 90%;
1222
-    color: #fff;
1386
+
1387
+  .slider_item_box {
1388
+    justify-content: left;
1389
+
1390
+    .slick-slider {
1391
+      width: 90%;
1392
+      color: #fff;
1393
+    }
1223 1394
   }
1224
-}
1395
+
1225 1396
   .testDiv {
1226 1397
     width: 4em;
1227 1398
     display: flex;

BIN
src/assets/imgs/dataVImg/gvcVideo1.mp4


BIN
src/assets/imgs/dataVImg/gvcVideo2.mp4


BIN
src/assets/imgs/dataVImg/gvcbg.png


BIN
src/assets/imgs/dataVImg/sialBgDataV.png


BIN
src/assets/imgs/dataVImg/sial_video1.mp4


BIN
src/assets/imgs/dataVImg/sial_video2.mp4


+ 18 - 18
src/pages/frame/component/modelMsg/view.jsx

@@ -19,7 +19,7 @@ import { registerDataMsgSocket, getUnionId } from "@apis/work";
19 19
 import { getUnReadMessageNum } from "@apis/personal";
20 20
 import { Tooltip } from 'antd';
21 21
 import { getSheetToken } from "@apis/common";
22
-import { tipsLockStatus,isTimes } from "@utils/util";
22
+import { tipsLockStatus, isTimes } from "@utils/util";
23 23
 import ModelBox from "@components/modelBox/view.jsx";
24 24
 
25 25
 @withRouter
@@ -53,7 +53,7 @@ export default class extends Component {
53 53
     this.pcLogin();
54 54
     this.props.history.listen((route, data) => {
55 55
       // 大屏切换地址改名称
56
-      this.props.changeName(route["pathname"].indexOf("gvc") > -1 ? "产供销价值链" : (route["pathname"].indexOf("tlk") > -1 ? "TLK运营数据中心 / TLK Plant Dashboard" : "运营数据中心"))
56
+      this.props.changeName(route["pathname"].indexOf("gvc") > -1 ? "产供销价值链" : (route["pathname"].indexOf("tlk") > -1 ? "TLK运营数据中心 / TLK Plant Dashboard" : route["pathname"].indexOf("sial") > -1 ? "硅铝微粉数据中心" : "运营数据中心"))
57 57
       this.setState({ showTips: false });
58 58
       let activeTree = utils.findNodeTree([...$store.sysMenu.norList, ...$store.sysMenu.menuList], route.pathname, "resourceUrl");
59 59
       //调取当前栏目的通知 
@@ -216,7 +216,7 @@ export default class extends Component {
216 216
         pageNum: 1,
217 217
         effectStatus: 1,
218 218
         displayArea: id,
219
-        sysUpdateMsgFuncType:'maintain'
219
+        sysUpdateMsgFuncType: 'maintain'
220 220
         // sysUpdateMsgType:'maintain'
221 221
       }).then((res) => {
222 222
         if (res?.data && res?.data?.records) {
@@ -224,27 +224,27 @@ export default class extends Component {
224 224
           // if (name == '首页') {
225 225
           //   $store.app.setShowTips(res.data);
226 226
           // } else {
227
-            if (res?.data?.records[0]) {
228
-              for (let index = 0; index < 2; index++) {
229
-                const element = res?.data?.records[index];
230
-                if (isTimes('', element.effectStartTime, element.effectEndTime)) {
231
-                  this.ModelBox.setState({ showContactModalVisible: true, activeItem: element });
232
-                  break
233
-                }
227
+          if (res?.data?.records[0]) {
228
+            for (let index = 0; index < 2; index++) {
229
+              const element = res?.data?.records[index];
230
+              if (isTimes('', element.effectStartTime, element.effectEndTime)) {
231
+                this.ModelBox.setState({ showContactModalVisible: true, activeItem: element });
232
+                break
234 233
               }
235 234
             }
235
+          }
236 236
 
237
-            //this.setState({ showTips: true, tips_detail: res?.data?.records[0] })
238
-            // setTimeout(() => {
239
-            //   this.setState({ showTips: false });
240
-            // }, 3000)
237
+          //this.setState({ showTips: true, tips_detail: res?.data?.records[0] })
238
+          // setTimeout(() => {
239
+          //   this.setState({ showTips: false });
240
+          // }, 3000)
241 241
           // }
242 242
         }
243 243
       })
244
-    } 
245
-    if(activeTree && (activeTree.resourceType == 'yonghong' || activeTree.resourceType == 'fine_bi'|| activeTree.resourceType == 'dmpReport' || activeTree.resourceType == 'report')){
244
+    }
245
+    if (activeTree && (activeTree.resourceType == 'yonghong' || activeTree.resourceType == 'fine_bi' || activeTree.resourceType == 'dmpReport' || activeTree.resourceType == 'report')) {
246 246
       this.props.getTips()
247
-    }else{
247
+    } else {
248 248
       this.props.cleatTips()
249 249
     }
250 250
     if (activeTree) {
@@ -305,4 +305,4 @@ export default class extends Component {
305 305
       // </div>
306 306
     );
307 307
   }
308
-}
308
+}

+ 3 - 2
src/pages/frame/view.jsx

@@ -146,11 +146,12 @@ export default observer(function Frame(props) {
146 146
   const history = useHistory();
147 147
   const [curKey, setKey] = useState("1");
148 148
   const moveBar = useRef();
149
-  const [isMove,setisMove] = useState(false);
149
+  const [isMove, setisMove] = useState(false);
150 150
   const name_arr = {
151 151
     "#/home/gvc": "产供销价值链",
152 152
     "#/home/operation": "运营数据中心",
153 153
     "#/home/tlk": "TLK运营数据中心 / TLK Plant Dashboard",
154
+    "#/home/sial": "硅铝微粉数据中心",
154 155
   }
155 156
   const [titleName, setTitleName] = useState(name_arr[window.location.hash]);
156 157
 
@@ -249,7 +250,7 @@ export default observer(function Frame(props) {
249 250
 
250 251
   return (
251 252
     <div className={styles.frame}>
252
-      <Top names={titleName}/>
253
+      <Top names={titleName} />
253 254
       <ModelMsg onRef={onRef} getTips={getTips} cleatTips={cleatTips} changeName={(name) => {
254 255
         setTitleName(name);
255 256
       }} />

+ 230 - 0
src/pages/gvc/api3.js

@@ -0,0 +1,230 @@
1
+import request from "@utils/request";
2
+
3
+/**登录*/
4
+export function checkToken(params) {
5
+  return request({
6
+    url: `/api/yonghong/checkToken?token=${params}`,
7
+    method: "GEt",
8
+  });
9
+}
10
+
11
+/**各基地库存明细 */
12
+export function smallMaterialService(params) {
13
+  return request({
14
+    url: "/dataengine-center-oneservice/list/1431155205925726276",
15
+    method: "POST",
16
+    data: {
17
+      "apiId": "1431155205925726276",
18
+      "appKey": "200000135",
19
+      "env": "PROD",
20
+      "reqProtocol": 1,
21
+      "returnFields": [
22
+        "factoryCode",
23
+        "factoryName",
24
+        "prodCatgoryCode",
25
+        "prodCatgory",
26
+        "indexValue",
27
+      ],
28
+      "pageNum": 1,
29
+      "pageSize": 100,
30
+      "useResultCache": false
31
+    },
32
+    headers: {
33
+      sign: '5de9f29632bf379f46b1a0d1c5a85112',
34
+      account: 'yunxi_fuxue',
35
+      'Cache-Control': 'no-cache',
36
+      apiId: '1431155205925726276',
37
+      appKey: '200000135',
38
+      execType: '3',
39
+      env: 'PROD',
40
+    }
41
+  });
42
+}
43
+
44
+
45
+/**各基地日,月累计,年累计产量 */
46
+export function smallDayService(params) {
47
+  return request({
48
+    url: "/dataengine-center-oneservice/list/1431155399122708561",
49
+    method: "POST",
50
+    data: {
51
+      "apiId": "1431155399122708561",
52
+      "appKey": "200000135",
53
+      "env": "PROD",
54
+      "reqProtocol": 1,
55
+      "returnFields": [
56
+        "factoryCode",
57
+        "factoryNameCode",
58
+        "dateType",
59
+        "indexValue"
60
+      ],
61
+      "pageNum": 1,
62
+      "pageSize": 20,
63
+      "useResultCache": false
64
+    },
65
+    headers: {
66
+      sign: 'df5c9e31ae6544ae9561c2d2a9f89702',
67
+      account: 'yunxi_fuxue',
68
+      'Cache-Control': 'no-cache',
69
+      apiId: '1431155399122708561',
70
+      appKey: '200000135',
71
+      execType: '3',
72
+      env: 'PROD',
73
+    }
74
+  });
75
+}
76
+
77
+
78
+/**左侧数据*/
79
+export function leftService(params) {
80
+  return request({
81
+    url: "/dataengine-center-oneservice/list/1431155462568896598",
82
+    method: "POST",
83
+    data: {
84
+      "apiId": "1431155462568896598",
85
+      "appKey": "200000135",
86
+      "env": "PROD",
87
+      "reqProtocol": 1,
88
+      "returnFields": [
89
+        "prodCode",
90
+        "production",
91
+        "inventory"
92
+      ],
93
+      "pageNum": 1,
94
+      "pageSize": 10,
95
+      "useResultCache": false
96
+    },
97
+    headers: {
98
+      sign: 'a1288953bd76d9f0b202280c84062f60',
99
+      account: 'yunxi_fuxue',
100
+      'Cache-Control': 'no-cache',
101
+      apiId: '1431155462568896598',
102
+      appKey: '200000135',
103
+      execType: '3',
104
+      env: 'PROD',
105
+    }
106
+  });
107
+}
108
+
109
+/**累计销量客户*/
110
+export function rollService(params) {
111
+  return request({
112
+    url: "/dataengine-center-oneservice/list/1431155512914176090",
113
+    method: "POST",
114
+    data: {
115
+      "apiId": "1431155512914176090",
116
+      "appKey": "200000135",
117
+      "env": "PROD",
118
+      "reqProtocol": 1,
119
+      "returnFields": [
120
+        "customerName",
121
+        "salesQty"
122
+      ],
123
+      "pageNum": 1,
124
+      "pageSize": 10,
125
+      "useResultCache": false
126
+    },
127
+    headers: {
128
+      sign: '7e13e57d4d3b4430dad7eedaaf5fe668',
129
+      account: 'yunxi_fuxue',
130
+      'Cache-Control': 'no-cache',
131
+      apiId: '1431155512914176090',
132
+      appKey: '200000135',
133
+      execType: '3',
134
+      env: 'PROD',
135
+    }
136
+  });
137
+}
138
+
139
+
140
+/**锂辉石库存*/
141
+export function bigShopService(params) {
142
+  return request({
143
+    url: "/dataengine-center-oneservice/list/1431155276398422090",
144
+    method: "POST",
145
+    data: {
146
+      "apiId": "1431155276398422090",
147
+      "appKey": "200000135",
148
+      "env": "PROD",
149
+      "reqProtocol": 1,
150
+      "returnFields": [
151
+        "warehouseNameCode",
152
+        "indexValue",
153
+      ],
154
+      "pageNum": 1,
155
+      "pageSize": 10,
156
+      "useResultCache": false
157
+    },
158
+    headers: {
159
+      sign: '253c1c9594881b0724b3403e9ea78527',
160
+      account: 'yunxi_fuxue',
161
+      'Cache-Control': 'no-cache',
162
+      apiId: '1431155276398422090',
163
+      appKey: '200000135',
164
+      execType: '3',
165
+      env: 'PROD',
166
+    }
167
+  });
168
+}
169
+
170
+/**个基地年累计产量,库存*/
171
+export function smallShopService(params) {
172
+  return request({
173
+    url: "/dataengine-center-oneservice/list/1431155337148721229",
174
+    method: "POST",
175
+    data: {
176
+      "apiId": "1431155337148721229",
177
+      "appKey": "200000135",
178
+      "env": "PROD",
179
+      "reqProtocol": 1,
180
+      "returnFields": [
181
+        "factoryCode",
182
+        "production",
183
+        "inventory",
184
+      ],
185
+      "pageNum": 1,
186
+      "pageSize": 10,
187
+      "useResultCache": false
188
+    },
189
+    headers: {
190
+      sign: 'ae68ccba4a6c70600cd9c75be6eb8264',
191
+      account: 'yunxi_fuxue',
192
+      'Cache-Control': 'no-cache',
193
+      apiId: '1431155337148721229',
194
+      appKey: '200000135',
195
+      execType: '3',
196
+      env: 'PROD',
197
+    }
198
+  });
199
+}
200
+
201
+/**更新日期*/
202
+export function updateTimeService(params) {
203
+  return request({
204
+    url: "/dataengine-center-oneservice/list/1356778817327502618",
205
+    method: "POST",
206
+    data: {
207
+      "apiId": "1356778817327502618",
208
+      "appKey": "200000134",
209
+      "env": "PROD",
210
+      "reqProtocol": 1,
211
+      "returnFields": [
212
+        "etlTime"
213
+      ],
214
+      "pageNum": 1,
215
+      "pageSize": 10,
216
+      "useResultCache": false
217
+    },
218
+    headers: {
219
+      sign: '4365b6564b25c852fcf0228188f48114',
220
+      account: 'yunxi_fuxue',
221
+      'Cache-Control': 'no-cache',
222
+      apiId: '1356778817327502618',
223
+      appKey: '200000134',
224
+      execType: '3',
225
+      env: 'PROD',
226
+    }
227
+  });
228
+}
229
+
230
+

+ 3 - 3
src/pages/gvc/component/mapView2.jsx

@@ -89,10 +89,10 @@ class MapViewTwo extends Component {
89 89
         btn.removeEventListener('click', play);
90 90
       }
91 91
       else {
92
-        if(model){
92
+        if (model) {
93 93
           model.style.display = 'block';
94 94
         }
95
-        if(btn){btn.addEventListener('click', play);}
95
+        if (btn) { btn.addEventListener('click', play); }
96 96
       }
97 97
     }
98 98
     play()
@@ -104,7 +104,7 @@ class MapViewTwo extends Component {
104 104
     return (
105 105
       <div class="video_box video_box_hide gvc_video animate__animated animate__fadeOut animate__delay-2s animate__slower">
106 106
         <div className="alls">
107
-        <video src={require("@assets/imgs/dataVimg/videoGvc.mp4").default} autoplay="autoplay" class="videoBoxViem"></video>
107
+          <video src={require("@assets/imgs/dataVimg/gvcVideo1.mp4").default} autoplay="autoplay" class="videoBoxViem"></video>
108 108
         </div>
109 109
       </div>
110 110
     )

+ 10 - 10
src/pages/gvc/component/rightBottomView.jsx

@@ -13,7 +13,7 @@ import Slider from "react-slick";
13 13
 import "slick-carousel/slick/slick.css";
14 14
 import "slick-carousel/slick/slick-theme.css";
15 15
 import { Progress } from 'antd';
16
-import { getArrMax,sortby } from "@utils/util";
16
+import { getArrMax, sortby } from "@utils/util";
17 17
 import {
18 18
   rollService,
19 19
 } from "../api";
@@ -37,19 +37,19 @@ class RightBottomView extends Component {
37 37
   }
38 38
 
39 39
   async getUrl() {
40
-    await rollService().then(({ data=[], resultCode }) => {
40
+    await rollService().then(({ data = [], resultCode }) => {
41 41
       if (+resultCode === 0) {
42 42
         let data_item = [];
43
-        const max1 = data.sort(sortby('salesQty',false));
43
+        const max1 = data.sort(sortby('salesQty', false));
44 44
         const max2 = max1?.[0]?.salesQty / 0.95 || 0;
45
-        data.map((x,i)=>{  
45
+        data.map((x, i) => {
46 46
           data_item.push({
47 47
             name: x.customerName,
48 48
             num: x.salesQty,
49
-            percent:Number(x.salesQty / max2).toFixed(2) * 100
49
+            percent: Number(x.salesQty / max2).toFixed(2) * 100
50 50
           })
51 51
         });
52
-        this.setState({data_item});
52
+        this.setState({ data_item });
53 53
       }
54 54
     });
55 55
 
@@ -59,7 +59,7 @@ class RightBottomView extends Component {
59 59
     const { data_item } = this.state;
60 60
     const settings = {
61 61
       dots: false,
62
-      arrows:false,
62
+      arrows: false,
63 63
       infinite: true,
64 64
       autoplay: true,
65 65
       speed: 4000,
@@ -72,14 +72,14 @@ class RightBottomView extends Component {
72 72
       vertical: true,
73 73
       verticalSwiping: true,
74 74
       beforeChange: function (currentSlide, nextSlide) {
75
-        console.log("before change", currentSlide, nextSlide);
75
+        // console.log("before change", currentSlide, nextSlide);
76 76
       },
77 77
       afterChange: function (currentSlide) {
78
-        console.log("after change", currentSlide);
78
+        //console.log("after change", currentSlide);
79 79
       }
80 80
     };
81 81
     return (
82
-      <div className={["eacharView cbRightBottomView slider_item_box"]} style={{height: data_item.length > 8 ? 'auto' : "100%"}}>
82
+      <div className={["eacharView cbRightBottomView slider_item_box"]} style={{ height: data_item.length > 8 ? 'auto' : "100%" }}>
83 83
         <p className="title_">累计发货量客户/吨</p>
84 84
         <Slider {...settings}>
85 85
           {

+ 162 - 180
src/pages/gvc/mod.js

@@ -16,206 +16,188 @@ import { message } from 'antd';
16 16
 const defaultState = {
17 17
   imgMsgData: [
18 18
     {
19
-      total: 4500,
20
-      totalName: "累计运输锂辉石",
21
-      styles: { left: "0%", top: "19%" },
22
-      cumulativeProduction: null,
23
-      inventory: 0,
19
+      "warehouseNameCode": "3",
20
+      "indexValue": 0,
21
+      "total": 0,
22
+      "totalName": "累计运输锂辉石(化学级)",
23
+      "styles": {
24
+        "left": "5%",
25
+        "top": "27%",
26
+        "width": "12em"
27
+      },
28
+      "cumulativeProduction": null,
29
+      "inventory": 0,
30
+      "showDetail": false
24 31
     },
25 32
     {
26
-      total: 3233,
27
-      totalName: "锂辉石库存量",
28
-      styles: { left: "11%", top: "45%" },
29
-      cumulativeProduction: null,
30
-      inventory: 0,
33
+      "warehouseNameCode": "2",
34
+      "indexValue": 0,
35
+      "total": 0,
36
+      "totalName": "锂辉石(化学级)库存量",
37
+      "styles": {
38
+        "left": "13%",
39
+        "top": "53%",
40
+        "width": "12em"
41
+      },
42
+      "cumulativeProduction": null,
43
+      "inventory": 0,
44
+      "showDetail": false
31 45
     },
32 46
     {
33
-      total: 3578,
34
-      totalName: "锂辉石库存量",
35
-      styles: { left: "34%", top: "27%" },
36
-      cumulativeProduction: null,
37
-      inventory: 0,
47
+      "warehouseNameCode": "1",
48
+      "indexValue": 0,
49
+      "total": 0,
50
+      "totalName": "锂辉石(化学级)库存量",
51
+      "styles": {
52
+        "left": "32%",
53
+        "top": "38%",
54
+        "width": "12em"
55
+      },
56
+      "cumulativeProduction": null,
57
+      "inventory": 0,
58
+      "showDetail": false
38 59
     },
39 60
     {
40
-      total: 0,
41
-      totalName: "",
42
-      styles: { left: "11%", top: "88%" },
43
-      cumulativeProduction: 1222,
44
-      inventory: 1000,
45
-      day:222,
46
-      mood:333,
47
-      year:444,
48
-      rawMaterial:[
49
-        {
50
-          prodCatgory:"原料-鲤辉石",
51
-          indexValue:22,
52
-        },
53
-        {
54
-          prodCatgory:"产品-碳酸锂",
55
-          indexValue:33,
56
-        },
57
-        {
58
-          prodCatgory:"原料-氯化锂",
59
-          indexValue:44,
60
-        },
61
-        {
62
-          prodCatgory:"产品-氢氧化锂",
63
-          indexValue:66,
64
-        },
65
-        {
66
-          prodCatgory:"产品-金属锂",
67
-          indexValue:88,
68
-        },
69
-        {
70
-          prodCatgory:"产品-98K",
71
-          indexValue:1000,
72
-        },
61
+      "factoryCode": 5,
62
+      "production": 0,
63
+      "inventory": 0,
64
+      "total": 0,
65
+      "totalName": "",
66
+      "styles": {
67
+        "left": "21%",
68
+        "top": "76%"
69
+      },
70
+      "cumulativeProduction": 0,
71
+      "day": 0,
72
+      "mood": "0",
73
+      "year": "0",
74
+      "rawMaterial": [
75
+
73 76
       ]
74 77
     },
75 78
     {
76
-      total: 0,
77
-      totalName: "",
78
-      styles: { left: "30%", top: "73%" },
79
-      cumulativeProduction: 1222,
80
-      inventory: 1000,
81
-      day:222,
82
-      mood:333,
83
-      year:444,
84
-      rawMaterial:[
85
-        {
86
-          prodCatgory:"原料-鲤辉石",
87
-          indexValue:22,
88
-        },
89
-        {
90
-          prodCatgory:"产品-碳酸锂",
91
-          indexValue:33,
92
-        },
93
-        {
94
-          prodCatgory:"原料-氯化锂",
95
-          indexValue:44,
96
-        },
97
-        {
98
-          prodCatgory:"产品-氢氧化锂",
99
-          indexValue:66,
100
-        },
101
-        {
102
-          prodCatgory:"产品-金属锂",
103
-          indexValue:88,
104
-        },
105
-        {
106
-          prodCatgory:"产品-98K",
107
-          indexValue:1000,
108
-        },
79
+      "factoryCode": 4,
80
+      "production": 0,
81
+      "inventory": 0,
82
+      "total": 0,
83
+      "totalName": "",
84
+      "styles": {
85
+        "left": "65%",
86
+        "top": "41%"
87
+      },
88
+      "cumulativeProduction": 0,
89
+      "day": "0",
90
+      "mood": "0",
91
+      "year": "0",
92
+      "rawMaterial": [
93
+
109 94
       ]
110 95
     },
111 96
     {
112
-      total: 0,
113
-      totalName: "",
114
-      styles: { left: "52%", top: "56%" },
115
-      cumulativeProduction: 1222,
116
-      inventory: 1000,
117
-      day:222,
118
-      mood:333,
119
-      year:444,
120
-      rawMaterial:[
121
-        {
122
-          prodCatgory:"原料-鲤辉石",
123
-          indexValue:22,
124
-        },
125
-        {
126
-          prodCatgory:"产品-碳酸锂",
127
-          indexValue:33,
128
-        },
129
-        {
130
-          prodCatgory:"原料-氯化锂",
131
-          indexValue:44,
132
-        },
133
-        {
134
-          prodCatgory:"产品-氢氧化锂",
135
-          indexValue:66,
136
-        },
137
-        {
138
-          prodCatgory:"产品-金属锂",
139
-          indexValue:88,
140
-        },
141
-        {
142
-          prodCatgory:"产品-98K",
143
-          indexValue:1000,
144
-        },
97
+      "factoryCode": 3,
98
+      "production": 0,
99
+      "inventory": 0,
100
+      "total": 0,
101
+      "totalName": "",
102
+      "styles": {
103
+        "left": "52%",
104
+        "top": "52%"
105
+      },
106
+      "cumulativeProduction": 0,
107
+      "day": "74.52",
108
+      "mood": "787.84",
109
+      "year": "8,510.82",
110
+      "rawMaterial": [
111
+
112
+      ]
113
+    },
114
+    {
115
+      "factoryCode": 2,
116
+      "production": 0,
117
+      "inventory": 0,
118
+      "total": 0,
119
+      "totalName": "",
120
+      "styles": {
121
+        "left": "36%",
122
+        "top": "64%"
123
+      },
124
+      "cumulativeProduction": 0,
125
+      "day": 0,
126
+      "mood": "108.00",
127
+      "year": "6,260.16",
128
+      "rawMaterial": [
129
+
145 130
       ]
146 131
     },
147 132
     {
148
-      total: 0,
149
-      totalName: "",
150
-      styles: { left: "70%", top: "42%" },
151
-      cumulativeProduction: 1222,
152
-      inventory: 1000,
153
-      day:222,
154
-      mood:333,
155
-      year:444,
156
-      rawMaterial:[
157
-        {
158
-          prodCatgory:"原料-鲤辉石",
159
-          indexValue:22,
160
-        },
161
-        {
162
-          prodCatgory:"产品-碳酸锂",
163
-          indexValue:33,
164
-        },
165
-        {
166
-          prodCatgory:"原料-氯化锂",
167
-          indexValue:44,
168
-        },
169
-        {
170
-          prodCatgory:"产品-氢氧化锂",
171
-          indexValue:66,
172
-        },
173
-        {
174
-          prodCatgory:"产品-金属锂",
175
-          indexValue:88,
176
-        },
177
-        {
178
-          prodCatgory:"产品-98K",
179
-          indexValue:1000,
180
-        },
133
+      "factoryCode": 1,
134
+      "production": 0,
135
+      "inventory": 0,
136
+      "total": 0,
137
+      "totalName": "",
138
+      "styles": {
139
+        "left": "47%",
140
+        "top": "23%"
141
+      },
142
+      "cumulativeProduction": 0,
143
+      "day": 0,
144
+      "mood": 0,
145
+      "year": 0,
146
+      "rawMaterial": [
147
+
181 148
       ]
182 149
     },
183 150
     {
184
-      total: 0,
185
-      totalName: "",
186
-      styles: { left: "88%", top: "28%" },
187
-      cumulativeProduction: 1222,
188
-      inventory: 1000,
189
-      day:222,
190
-      mood:333,
191
-      year:444,
192
-      rawMaterial:[
193
-        {
194
-          prodCatgory:"原料-鲤辉石",
195
-          indexValue:22,
196
-        },
197
-        {
198
-          prodCatgory:"产品-碳酸锂",
199
-          indexValue:33,
200
-        },
201
-        {
202
-          prodCatgory:"原料-氯化锂",
203
-          indexValue:44,
204
-        },
205
-        {
206
-          prodCatgory:"产品-氢氧化锂",
207
-          indexValue:66,
208
-        },
209
-        {
210
-          prodCatgory:"产品-金属锂",
211
-          indexValue:88,
212
-        },
213
-        {
214
-          prodCatgory:"产品-98K",
215
-          indexValue:1000,
216
-        },
151
+      "factoryCode": 6,
152
+      "production": 0,
153
+      "inventory": 0,
154
+      "total": 0,
155
+      "totalName": "",
156
+      "styles": {
157
+        "left": "7%",
158
+        "top": "89%"
159
+      },
160
+      "cumulativeProduction": 0,
161
+      "day": "0",
162
+      "mood": "0",
163
+      "year": "0",
164
+      "rawMaterial": [
165
+
217 166
       ]
218 167
     },
168
+    {
169
+      "factoryCode": 7,
170
+      "production": 0,
171
+      "inventory": 0,
172
+      "total": 0,
173
+      "totalName": "",
174
+      "styles": {
175
+        "left": "80%",
176
+        "top": "28%"
177
+      },
178
+      "cumulativeProduction": 0,
179
+      "day": 0,
180
+      "mood": 0,
181
+      "year": 0,
182
+      "rawMaterial": []
183
+    },
184
+    {
185
+      "warehouseNameCode": "5",
186
+      "indexValue": 0,
187
+      "total": 0,
188
+      "totalName": "锂辉石(化学级)在途库存",
189
+      "styles": {
190
+        "left": "20%",
191
+        "top": "25%",
192
+        "width": "12em"
193
+      },
194
+      "cumulativeProduction": null,
195
+      "inventory": 0,
196
+      "showDetail": true,
197
+      "rawMaterial": [
198
+
199
+      ]
200
+    }
219 201
   ],
220 202
 }
221 203
 

+ 302 - 173
src/pages/gvc/style.less

@@ -20,37 +20,259 @@
20 20
       .gvc_video {
21 21
         background: url(../../assets/imgs/dataVimg/gvcBgDataV.png) no-repeat 0 -10em / 100% 120% #041b40 !important;
22 22
         align-items: flex-start;
23
-        // background: #000;
23
+        justify-content: center;
24
+        box-sizing: border-box;
25
+        overflow: visible;
24 26
 
25 27
         video {
28
+          display: block;
29
+          width: 100%;
30
+          height: auto;
31
+          max-height: min(96vh, 100dvh);
32
+          padding: 0;
33
+          object-fit: contain;
34
+          pointer-events: none;
35
+        }
36
+
37
+        img {
26 38
           width: 100%;
27 39
           height: unset;
28 40
           padding: 0;
29 41
         }
30 42
 
31
-        .alls {
32 43
 
33
-          width: 64%;
44
+        .alls {
45
+          width: 80%;
34 46
           height: unset;
35
-          padding: 2% 0 0 0;
47
+          padding: 0% 0% 0% 2%;
36 48
           position: relative;
49
+          box-sizing: border-box;
50
+          z-index: 1;
51
+          overflow: visible;
37 52
         }
38 53
 
39
-        @media (min-height: 800px) {
54
+        // 仅主视频接收点击;片头 MapViewTwo 同带 .gvc_video 且 z-index:12,否则会盖住下层热点
55
+        &:not(.video_box_hide) .alls {
56
+          pointer-events: auto;
57
+        }
58
+
59
+        &.video_box_hide,
60
+        &.video_box_hide * {
61
+          pointer-events: none !important;
62
+        }
63
+
64
+        // 热点与视频同层:百分比相对视频显示区域,缩屏时与画面一起变
65
+        .imgMsg {
66
+          list-style: none;
67
+          margin: 0;
68
+          padding: 0;
69
+          width: 100%;
70
+          position: absolute;
71
+          left: 0;
72
+          top: 0;
73
+          height: 100%;
74
+          color: #fff;
75
+          pointer-events: none;
76
+          z-index: 2;
77
+          overflow: visible;
78
+
79
+          li {
80
+            position: absolute;
81
+            width: 20em;
82
+            z-index: 10;
83
+            height: 4em;
84
+            opacity: 1;
85
+            overflow: visible;
86
+            background: linear-gradient(0deg, #ffffff26 0%, #ffffff00 100%);
87
+            border-radius: 0.5em;
88
+            padding: 0.5em;
89
+            box-sizing: border-box;
90
+            font-size: 0.9em;
91
+            color: #CDF1FF;
92
+            pointer-events: auto;
93
+
94
+            .nums {
95
+              font-size: 1.3em;
96
+              color: #69FFDE;
97
+              display: inline-block !important;
98
+            }
99
+
100
+            .topMsg_number_2 {
101
+              display: inline-block !important;
102
+            }
103
+
104
+            .sma {
105
+              font-size: 0.7em;
106
+              color: #CDF1FF;
107
+              display: inline-block;
108
+              margin-left: 0.2em;
109
+            }
110
+
111
+            .chanL {
112
+              background: unset;
113
+              font-size: 0.9em;
114
+              color: #CDF1FF;
115
+              // height: 4em;
116
+              box-sizing: border-box;
117
+              padding: 0 0.5em;
118
+              display: flex;
119
+              justify-content: space-between;
120
+
121
+              >div {
122
+                width: 50%;
123
+              }
124
+            }
125
+
126
+            .hoverR {
127
+              width: 100%;
128
+              height: 12em;
129
+              position: absolute;
130
+              left: 0;
131
+              top: -7em;
132
+              padding-top: 11em;
133
+              overflow: visible;
134
+
135
+
136
+              .hoverDiv {
137
+                display: none;
138
+              }
139
+            }
140
+
141
+            .hoverDiv {
142
+              display: flex;
143
+              align-items: center;
144
+              justify-content: space-between;
145
+              padding: 0 1em;
146
+              background: linear-gradient(0deg, #292929f2 0%, #25252540 100%);
147
+              width: 100%;
148
+              border-radius: 0.5em;
149
+              box-sizing: border-box;
150
+              margin-top: 0.1em;
151
+              font-size: 0.8em;
152
+              padding: 0.2em 0em 0 1em;
153
+              color: #d7d7d7;
154
+              align-items: flex-start;
155
+              height: auto;
156
+
157
+              >div>span {
158
+                display: block;
159
+              }
160
+            }
161
+
162
+            // 必须压过 .hoverR .hoverDiv{display:none} 的单条选择器优先级
163
+            &:hover .hoverR .hoverDiv {
164
+              display: flex !important;
165
+            }
166
+          }
167
+
168
+          @media (max-height: 900px) {
169
+            li .hoverDiv {
170
+              background: linear-gradient(0deg, #292929 0%, #252525 100%) !important;
171
+            }
172
+          }
173
+
174
+          li:hover {
175
+            background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
176
+          }
177
+        }
178
+
179
+        @media (max-height: 1000px) {
180
+          video {
181
+            max-height: min(82vh, 100dvh);
182
+          }
183
+
40 184
           .alls {
41
-            width: 73%;
185
+            width: 74%;
42 186
           }
187
+
188
+
43 189
         }
44 190
 
45
-        @media (min-height: 900px) {
191
+
192
+        @media (max-height: 1050px) {
193
+          video {
194
+            max-height: min(82vh, 100dvh);
195
+          }
196
+
46 197
           .alls {
47
-            width: 64%;
198
+            width: 77%;
199
+            padding: 1.1% 0 0 1.1%;
200
+          }
201
+
202
+          .imgMsg {
203
+            top: -1em;
204
+          }
205
+
206
+          .imgMsg li {
207
+            font-size: 0.82em;
208
+            width: 21em;
209
+            height: 3.75em;
210
+            padding: 0.4em;
211
+
212
+            .chanL {
213
+              // height: 3.75em;
214
+              font-size: 0.85em;
215
+            }
48 216
           }
49 217
         }
50 218
 
51
-        @media (min-height: 1000PX) {
219
+        @media (min-width: 2560px) {
52 220
           .alls {
53
-            width: 70%;
221
+            width: 77%;
222
+          }
223
+
224
+          video {
225
+            max-height: min(88vh, 100dvh);
226
+          }
227
+        }
228
+
229
+        @media (min-width: 2240px) and (max-width: 2559px) {
230
+          .alls {
231
+            width: 77%;
232
+          }
233
+
234
+          video {
235
+            max-height: min(90vh, 100dvh);
236
+          }
237
+        }
238
+
239
+        @media (min-width: 1760px) and (max-width: 2239px) {
240
+          .alls {
241
+            width: 77%;
242
+          }
243
+
244
+          video {
245
+            max-height: min(92vh, 100dvh);
246
+          }
247
+        }
248
+
249
+        @media (min-width: 1441px) and (max-width: 1759px) {
250
+          .alls {
251
+            width: 77%;
252
+          }
253
+
254
+          video {
255
+            max-height: min(93vh, 100dvh);
256
+          }
257
+        }
258
+
259
+        @media (max-width: 1440px) {
260
+          .alls {
261
+            width: 77%;
262
+          }
263
+
264
+          video {
265
+            max-height: min(94vh, 100dvh);
266
+          }
267
+        }
268
+
269
+        @media (max-width: 1280px) {
270
+          .alls {
271
+            width: 76%;
272
+          }
273
+
274
+          video {
275
+            max-height: min(90vh, 100dvh);
54 276
           }
55 277
         }
56 278
 
@@ -59,6 +281,14 @@
59 281
       .gvcHome {
60 282
         height: 100%;
61 283
         justify-content: flex-start;
284
+        // 中间区域需穿透到下层视频热点;否则 hoverR 向上伸出 centerCon 后无法触发 hover
285
+        pointer-events: none;
286
+
287
+        .leftContent,
288
+        .rightContent,
289
+        .bottom_box {
290
+          pointer-events: auto;
291
+        }
62 292
 
63 293
         .leftContent {
64 294
           width: 17%;
@@ -144,10 +374,11 @@
144 374
         }
145 375
 
146 376
         @media (max-height: 900px) {
147
-          .leftContent{
377
+          .leftContent {
148 378
             margin-top: 1%;
149 379
             height: 75%;
150 380
           }
381
+
151 382
           .leftContent li {
152 383
             height: 23% !important;
153 384
 
@@ -165,11 +396,12 @@
165 396
 
166 397
 
167 398
         .centerCon {
168
-          width: 62%;
169
-          height: 80%;
399
+          width: 63%;
400
+          height: 75%;
170 401
           padding: 0;
171 402
           position: relative;
172 403
           margin: 0% 0 0 -1%;
404
+          pointer-events: none;
173 405
 
174 406
           .rightCar {
175 407
             width: 4.5em;
@@ -177,8 +409,10 @@
177 409
             position: absolute;
178 410
             left: 53%;
179 411
             top: 36%;
180
-            -webkit-animation: antSpinMove 8s linear infinite;;
181
-            animation: antSpinMove 8s linear infinite;;
412
+            -webkit-animation: antSpinMove 8s linear infinite;
413
+            ;
414
+            animation: antSpinMove 8s linear infinite;
415
+            ;
182 416
 
183 417
             >img {
184 418
               width: 100%;
@@ -187,166 +421,61 @@
187 421
 
188 422
         }
189 423
 
190
-        
191
-
192
-        @media (min-height: 800px) {
193
-          .centerCon {
194
-            width: 65%;
195
-            height: 78%;
196
-            padding: 0;
197
-            position: relative;
198
-            margin: 0% 0 0 -3%;
199
-            .rightCar {
200
-              -webkit-animation: antSpinMove900 8s linear infinite;;
201
-              animation: antSpinMove900 8s linear infinite;;
202
-                
203
-            }
204
-          }
205
-
206
-        }
207
-
208
-        @media (min-height: 900px) {
209
-          .centerCon {
210
-            width: 62%;
211
-            height: 80%;
212
-            padding: 0;
213
-            position: relative;
214
-            margin: 0% 0 0 -1%;
215
-            .rightCar {
216
-              -webkit-animation: antSpinMove 8s linear infinite;;
217
-              animation: antSpinMove 8s linear infinite;;
218
-            }
219
-          }
220
-        }
221
-
222
-        @media (min-height: 1000PX) {
223
-          .centerCon {
224
-            width: 63%;
225
-            height: 75%;
226
-            padding: 0;
227
-            position: relative;
228
-            margin: 0% 0 0 -3%;
229
-            .rightCar {
230
-              -webkit-animation: antSpinMove1100 8s linear infinite;;
231
-              animation: antSpinMove1100 8s linear infinite;;
232
-                
233
-            }
234
-          }
235
-        }
236
-
237
-
238
-        .imgMsg {
239
-          width: 100%;
240
-          position: absolute;
241
-          left: 0;
242
-          top: 0;
243
-          height: 100%;
244
-          color: #fff;
245
-
246
-          li {
247
-            position: absolute;
248
-            width: 25em;
249
-            z-index: 10;
250
-            height: 4em;
251
-            opacity: 1;
252
-            background: linear-gradient(0deg, #ffffff26 0%, #ffffff00 100%);
253
-            border-radius: 0.5em;
254
-            padding: 0.5em;
255
-            box-sizing: border-box;
256
-            font-size: 0.9em;
257
-            color: #CDF1FF;
258
-
259
-            .nums {
260
-              font-size: 1.3em;
261
-              color: #69FFDE;
262
-              display: inline-block !important;
263
-            }
264
-
265
-            .topMsg_number_2 {
266
-              display: inline-block !important;
267
-            }
268
-
269
-            .sma {
270
-              font-size: 0.7em;
271
-              color: #CDF1FF;
272
-              display: inline-block;
273
-              margin-left: 0.2em;
274
-            }
275
-
276
-            .chanL {
277
-              background: unset;
278
-              font-size: 0.9em;
279
-              color: #CDF1FF;
280
-              height: 4em;
281
-              box-sizing: border-box;
282
-              padding: 0 0.5em;
283
-              display: flex;
284
-              justify-content: space-between;
285
-
286
-              >div {
287
-                width: 50%;
288
-              }
289
-            }
290
-
291
-            .hoverR {
292
-              width: 100%;
293
-              height: 12em;
294
-              position: absolute;
295
-              left: 0;
296
-              top: -7em;
297
-              padding-top: 11em;
298
-
299
-
300
-              .hoverDiv {
301
-                display: none;
302
-              }
303
-            }
304
-
305
-            .hoverR:hover {
306
-              .hoverDiv {
307
-                display: flex;
308
-              }
309
-            }
310
-
311
-            .hoverDiv {
312
-              display: flex;
313
-              align-items: center;
314
-              justify-content: space-between;
315
-              padding: 0 1em;
316
-              background: linear-gradient(0deg, #292929f2 0%, #25252540 100%);
317
-              // linear-gradient(0deg, #ffffff00 20%, #7a7a7a29 100%);
318
-              width: 100%;
319
-              border-radius: 0.5em;
320
-              box-sizing: border-box;
321
-              margin-top: 0.1em;
322
-              font-size: 0.8em;
323
-              padding: 0.2em 0em 0 1em;
324
-              color: #d7d7d7;
325
-              align-items: flex-start;
326
-              height: auto;
327
-
328
-              >div>span {
329
-                display: block;
330
-              }
331
-            }
332
-          }
333
-          @media (max-height: 900px) {
334
-            li .hoverDiv{
335
-              background:linear-gradient(0deg, #292929 0%, #252525 100%)!important;
336
-            }
337
-  
338
-          }
339 424
 
340 425
 
341
-          li:hover {
342
-            background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
343
-          }
344
-        }
345
-        @media (max-height: 900px) {
346
-          .imgMsg {
347
-            top: -1.5em;
348
-          }
349
-        }
426
+        // @media (min-height: 800px) {
427
+        //   .centerCon {
428
+        //     width: 65%;
429
+        //     height: 78%;
430
+        //     padding: 0;
431
+        //     position: relative;
432
+        //     margin: 0% 0 0 -3%;
433
+
434
+        //     .rightCar {
435
+        //       -webkit-animation: antSpinMove900 8s linear infinite;
436
+        //       ;
437
+        //       animation: antSpinMove900 8s linear infinite;
438
+        //       ;
439
+
440
+        //     }
441
+        //   }
442
+
443
+        // }
444
+
445
+        // @media (min-height: 900px) {
446
+        //   .centerCon {
447
+        //     width: 62%;
448
+        //     height: 80%;
449
+        //     padding: 0;
450
+        //     position: relative;
451
+        //     margin: 0% 0 0 -1%;
452
+
453
+        //     .rightCar {
454
+        //       -webkit-animation: antSpinMove 8s linear infinite;
455
+        //       ;
456
+        //       animation: antSpinMove 8s linear infinite;
457
+        //       ;
458
+        //     }
459
+        //   }
460
+        // }
461
+
462
+        // @media (min-height: 1000PX) {
463
+        //   .centerCon {
464
+        //     width: 63%;
465
+        //     height: 75%;
466
+        //     padding: 0;
467
+        //     position: relative;
468
+        //     margin: 0% 0 0 -3%;
469
+
470
+        //     .rightCar {
471
+        //       -webkit-animation: antSpinMove1100 8s linear infinite;
472
+        //       ;
473
+        //       animation: antSpinMove1100 8s linear infinite;
474
+        //       ;
475
+
476
+        //     }
477
+        //   }
478
+        // }
350 479
 
351 480
         .rightContent {
352 481
           width: 15%;

+ 69 - 48
src/pages/gvc/view.jsx

@@ -23,7 +23,9 @@ import {
23 23
   updateTimeService
24 24
 } from "./api";
25 25
 import MapViewTwo from "./component/mapView2.jsx";
26
-import mpVideoGvc from "@assets/imgs/dataVimg/videoGvc2.mp4";
26
+import mpVideoGvc from "@assets/imgs/dataVimg/gvcVideo2.mp4";
27
+import gvcbg from "@assets/imgs/dataVimg/gvcbg.png";
28
+
27 29
 import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
28 30
 import 'animate.css';
29 31
 import { get } from "lodash";
@@ -47,8 +49,8 @@ class Gvc extends Component {
47 49
       manHourData: [
48 50
       ],
49 51
       manHourNum: 1,
50
-      leftName:deleteCacheAndChangeUrl("left",false,true),
51
-      rightName:deleteCacheAndChangeUrl("right",false,true),
52
+      leftName: deleteCacheAndChangeUrl("left", false, true),
53
+      rightName: deleteCacheAndChangeUrl("right", false, true),
52 54
     };
53 55
     this.timer = null //定时器,用于检测同步状态
54 56
   }
@@ -187,8 +189,9 @@ class Gvc extends Component {
187 189
   async getUrl2() {
188 190
     await bigShopService().then(({ data = [], resultCode }) => {
189 191
       if (+resultCode === 0) {
190
-        const name_ = ["", "锂辉石(化学级)库存量", "锂辉石(化学级)库存量", "累计运输锂辉石(化学级)"];
191
-        const style__ = [{}, { left: "34%", top: "30%" }, { left: "11%", top: "48%" }, { left: "0%", top: "22%" }]
192
+        console.log('getUrl2', data)
193
+        const name_ = ["", "锂辉石(化学级)库存量", "锂辉石(化学级)库存量", "累计运输锂辉石(化学级)", "", "锂辉石(化学级)在途库存"];
194
+        const style__ = [{}, { left: "32%", top: "38%", width: '12em' }, { left: "13%", top: "53%", width: '12em' }, { left: "5%", top: "27%", width: '12em' }, "", { left: "20%", top: "25%", width: '12em' }]
192 195
         data = data.map((x, i) => {
193 196
           return {
194 197
             ...x,
@@ -197,18 +200,22 @@ class Gvc extends Component {
197 200
             styles: style__[x.warehouseNameCode],
198 201
             cumulativeProduction: null,
199 202
             inventory: 0,
203
+            showDetail: x.warehouseNameCode == 5 //在途显示明细
200 204
           }
201 205
         });
202 206
         const d_1 = data.filter(x => { return x.warehouseNameCode == 3 })[0];
203 207
         const d_2 = data.filter(x => { return x.warehouseNameCode == 2 })[0];
204 208
         const d_3 = data.filter(x => { return x.warehouseNameCode == 1 })[0];
205 209
         const d_4 = data.filter(x => { return x.warehouseNameCode == 4 })[0];
210
+        const d_10 = data.filter(x => { return x.warehouseNameCode == 5 })[0];
206 211
         let old_imgMsgData = this.store.state.imgMsgData;
207 212
         old_imgMsgData[0] = d_1;
208 213
         old_imgMsgData[1] = d_2;
209 214
         old_imgMsgData[2] = d_3;
215
+        old_imgMsgData[10] = d_10;
216
+
210 217
 
211
-        this.setState({ LeftHtml:[...[{txt_name:'锂辉石(化学级)',num1:d_4?.indexValue}],...this.state.LeftHtml] });
218
+        this.setState({ LeftHtml: [...[{ txt_name: '锂辉石(化学级)', num1: d_4?.indexValue }], ...this.state.LeftHtml] });
212 219
         this.store.saveState({ imgMsgData: old_imgMsgData });
213 220
       }
214 221
     });
@@ -216,7 +223,8 @@ class Gvc extends Component {
216 223
   async getUrl4() {
217 224
     await smallShopService().then(({ data = [], resultCode }) => {
218 225
       if (+resultCode === 0) {
219
-        const style__ = [{}, { left: "87%", top: "28%" }, { left: "69%", top: "46%" }, { left: "52%", top: "59%" }, { left: "29%", top: "76%" }, { left: "11%", top: "89%" }]
226
+        console.log('getUrl4', data)
227
+        const style__ = [{}, { left: "47%", top: "23%" }, { left: "36%", top: "64%" }, { left: "52%", top: "52%" }, { left: "65%", top: "41%" }, { left: "21%", top: "76%" }, { left: "7%", top: "89%" }, { left: "80%", top: "28%" }]
220 228
         data = data.map((x, i) => {
221 229
           return {
222 230
             ...x,
@@ -227,17 +235,21 @@ class Gvc extends Component {
227 235
             inventory: x.inventory,
228 236
           }
229 237
         });
230
-        const d_1 = data.filter(x => { return x.factoryCode == 5 })[0];
231
-        const d_2 = data.filter(x => { return x.factoryCode == 4 })[0];
232
-        const d_3 = data.filter(x => { return x.factoryCode == 3 })[0];
233
-        const d_4 = data.filter(x => { return x.factoryCode == 2 })[0];
234
-        const d_5 = data.filter(x => { return x.factoryCode == 1 })[0];
238
+        const d_1 = data.filter(x => { return x.factoryCode == 5 })[0];//江苏
239
+        const d_2 = data.filter(x => { return x.factoryCode == 4 })[0];//重庆
240
+        const d_3 = data.filter(x => { return x.factoryCode == 3 })[0];//射洪
241
+        const d_4 = data.filter(x => { return x.factoryCode == 2 })[0];//安居
242
+        const d_5 = data.filter(x => { return x.factoryCode == 1 })[0];//外加工厂
243
+        const d_6 = data.filter(x => { return x.factoryCode == 6 })[0];//苏州
244
+        const d_7 = data.filter(x => { return x.factoryCode == 7 })[0];//重庆锂电
235 245
         let old_imgMsgData = this.store.state.imgMsgData;
236 246
         old_imgMsgData[3] = d_1;
237 247
         old_imgMsgData[4] = d_2;
238 248
         old_imgMsgData[5] = d_3;
239 249
         old_imgMsgData[6] = d_4;
240 250
         old_imgMsgData[7] = d_5;
251
+        old_imgMsgData[8] = d_6;
252
+        old_imgMsgData[9] = d_7;
241 253
 
242 254
 
243 255
         console.log(old_imgMsgData, "old_imgMsgData")
@@ -251,6 +263,7 @@ class Gvc extends Component {
251 263
   async getUrl5() {
252 264
     await smallDayService().then(({ data = [], resultCode }) => {
253 265
       if (+resultCode === 0) {
266
+        console.log('getUrl5', data)
254 267
         function getItems(num) {
255 268
           const datas = data.filter(x => { return x.factoryCode == num });
256 269
           const par = {
@@ -267,12 +280,16 @@ class Gvc extends Component {
267 280
         // const d_4 = data.filter(x=>{return x.factoryCode == 2})[0];
268 281
         const d_4 = getItems(2);
269 282
         const d_5 = getItems(1);
283
+        const d_6 = getItems(6);
284
+        const d_7 = getItems(7);
270 285
         let old_imgMsgData = this.store.state.imgMsgData;
271 286
         old_imgMsgData[3] = { ...old_imgMsgData[3], ...d_1 };
272 287
         old_imgMsgData[4] = { ...old_imgMsgData[4], ...d_2 };
273 288
         old_imgMsgData[5] = { ...old_imgMsgData[5], ...d_3 };
274 289
         old_imgMsgData[6] = { ...old_imgMsgData[6], ...d_4 };
275 290
         old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
291
+        old_imgMsgData[8] = { ...old_imgMsgData[8], ...d_6 };
292
+        old_imgMsgData[9] = { ...old_imgMsgData[9], ...d_7 };
276 293
         console.log(old_imgMsgData, "1111old_imgMsgData")
277 294
         this.store.saveState({ imgMsgData: old_imgMsgData });
278 295
         setTimeout(() => {
@@ -286,6 +303,7 @@ class Gvc extends Component {
286 303
   async getUrl6() {
287 304
     await smallMaterialService().then(({ data = [], resultCode }) => {
288 305
       if (+resultCode === 0) {
306
+        console.log('getUrl6', data)
289 307
         function getItems(num) {
290 308
           const datas = data.filter(x => { return x.factoryCode == num });
291 309
           let rawMaterial = datas.map((item, index) => {
@@ -307,7 +325,9 @@ class Gvc extends Component {
307 325
         const d_3 = getItems(3);
308 326
         const d_4 = getItems(2);
309 327
         const d_5 = getItems(1);
310
-
328
+        const d_6 = getItems(6);
329
+        const d_7 = getItems(7);
330
+        const d_8 = getItems(8);//锂辉石在途库存
311 331
 
312 332
         let old_imgMsgData = this.store.state.imgMsgData;
313 333
         old_imgMsgData[3] = { ...old_imgMsgData[3], ...d_1 };
@@ -315,6 +335,9 @@ class Gvc extends Component {
315 335
         old_imgMsgData[5] = { ...old_imgMsgData[5], ...d_3 };
316 336
         old_imgMsgData[6] = { ...old_imgMsgData[6], ...d_4 };
317 337
         old_imgMsgData[7] = { ...old_imgMsgData[7], ...d_5 };
338
+        old_imgMsgData[8] = { ...old_imgMsgData[8], ...d_6 };
339
+        old_imgMsgData[9] = { ...old_imgMsgData[9], ...d_7 };
340
+        old_imgMsgData[10] = { ...old_imgMsgData[10], ...d_8 };
318 341
         console.log(old_imgMsgData, "1111old_imgMsgData")
319 342
         this.store.saveState({ imgMsgData: old_imgMsgData });
320 343
       }
@@ -381,7 +404,8 @@ class Gvc extends Component {
381 404
   render() {
382 405
     const stores = this.store.state;
383 406
     let { totalValue, yearDecline, yearSend, imgMsgData } = this.store.state;
384
-    let { LeftHtml, updateTime, changGif,leftName,rightName } = this.state;
407
+    console.log('imgMsgData', toJS(imgMsgData))
408
+    let { LeftHtml, updateTime, changGif, leftName, rightName } = this.state;
385 409
     return (
386 410
       <div className={[styles.gvc_home + ' home_box ']}>
387 411
         {/* 水印 */}
@@ -411,33 +435,15 @@ class Gvc extends Component {
411 435
           <MapViewTwo></MapViewTwo>
412 436
           <div className={"video_box gvc_video"}>
413 437
             <div className="alls">
414
-              <video src={mpVideoGvc} playbackRate={0.5} autoplay="autoplay" loop="loop" class="video_box_2 center_box2 animate__animated animate__fadeIn animate__delay-2s">
438
+              <video src={mpVideoGvc} playbackRate={0.5} autoplay="autoplay" loop="loop" class="video_box_2 animate__animated animate__fadeIn animate__delay-2s">
415 439
               </video>
416
-            </div>
417
-
418
-          </div>
419
-          <div className={"gvcHome home cbHome"}>
420
-            <div className="leftContent">
421
-              <ul>
422
-                {
423
-                  LeftHtml.map((x, i) => {
424
-                    return this.getLeftHtml(x, i)
425
-                  })
426
-                }
427
-              </ul>
428
-            </div>
429
-
430
-            <div className="centerCon">
431
-              <p className="rightCar">
432
-                <img src={require("@assets/imgs/gvc/car.png").default} alt="" />
433
-              </p>
434 440
               <ul className="imgMsg">
435 441
                 {
436 442
                   toJS(imgMsgData).map((item, index) => {
437
-                    if (!item) { return }
443
+                    if (!item) { return null }
438 444
                     return (
439 445
                       <li style={{ ...item?.styles }} class="animate__animated animate__bounceInUp animate__slower">
440
-                        {/* 矿产 */}
446
+
441 447
                         {
442 448
                           item.totalName && <p className="name">{item.totalName}</p>
443 449
                         }
@@ -450,26 +456,27 @@ class Gvc extends Component {
450 456
                         {
451 457
                           item.totalName && <span className="sma">吨</span>
452 458
                         }
453
-                        {/* 基地 */}
454 459
                         {
455
-                          item.cumulativeProduction !== null && <div className="hoverR">
456
-                            <div className="hoverDiv chanL">
457
-                              {/* <div style={{ width: "62%","textAlign":'right' }}> */}
458
-                              <div style={{ width: "38%" }}>
459
-                                <p className="title">
460
-                                  产量/吨
461
-                                </p>
462
-                                <span>日:{item.day}</span>
463
-                                <span>月:{item.mood}</span>
464
-                                <span>年:{item.year}</span>
465
-                              </div>
460
+                          (item.cumulativeProduction !== null || item.showDetail) && <div className="hoverR">
461
+                            <div className="hoverDiv chanL" >
462
+                              {
463
+                                item.cumulativeProduction !== null && <div style={{ width: "38%" }}>
464
+                                  <p className="title">
465
+                                    产量/吨
466
+                                  </p>
467
+                                  <span>日:{item.day}</span>
468
+                                  <span>月:{item.mood}</span>
469
+                                  <span>年:{item.year}</span>
470
+                                </div>
471
+                              }
472
+
466 473
                               <div style={{ width: index == 5 ? "58%" : "57%" }}>
467 474
                                 <p className="title">
468 475
                                   库存/吨
469 476
                                 </p>
470 477
                                 {
471 478
                                   get(item, "rawMaterial", []).map((ra, rai) => {
472
-                                    return <span>{ra.prodCatgory}:{ra.indexValue}</span>
479
+                                    return <span key={rai}>{ra.prodCatgory}:{ra.indexValue}</span>
473 480
                                   })
474 481
                                 }
475 482
                               </div>
@@ -503,6 +510,20 @@ class Gvc extends Component {
503 510
               </ul>
504 511
             </div>
505 512
 
513
+          </div>
514
+          <div className={"gvcHome home cbHome"}>
515
+            <div className="leftContent">
516
+              <ul>
517
+                {
518
+                  LeftHtml.map((x, i) => {
519
+                    return this.getLeftHtml(x, i)
520
+                  })
521
+                }
522
+              </ul>
523
+            </div>
524
+
525
+            <div className="centerCon" />
526
+
506 527
             {/* 右侧信息栏 */}
507 528
             <div className="rightContent">
508 529
 

+ 362 - 0
src/pages/sial/api.js

@@ -0,0 +1,362 @@
1
+import request from "@utils/request";
2
+
3
+/**登录*/
4
+export function checkToken(params) {
5
+  return request({
6
+    url: `/api/yonghong/checkToken?token=${params}`,
7
+    method: "GEt",
8
+  });
9
+}
10
+
11
+/**碳排放 */
12
+export function dataengineCenterOneservice(params) {
13
+  return request({
14
+    url: "/dataengine-center-oneservice/list/1356250396177503367",
15
+    method: "POST",
16
+    data: {
17
+      "apiId": "1356250396177503367",
18
+      "appKey": "200000134",
19
+      "env": "PROD",
20
+      "reqProtocol": 1,
21
+      "returnFields": [
22
+        "byear",
23
+        "missionsIntensity",
24
+        "missionsTotal",
25
+        "biz_id"
26
+      ],
27
+      "pageNum": 1,
28
+      "pageSize": 10,
29
+      "useResultCache": false
30
+    },
31
+    headers: {
32
+      sign: '19c3cdb58b80e44f2490b8eba3b7f938',
33
+      account: 'yunxi_fuxue',
34
+      'Cache-Control': 'no-cache',
35
+      apiId: '1356250396177503367',
36
+      appKey: '200000134',
37
+      execType: '3',
38
+      env: 'PROD',
39
+    }
40
+  });
41
+}
42
+
43
+
44
+/**库存金额 */
45
+export function momeyService(params) {
46
+  return request({
47
+    url: "/dataengine-center-oneservice/list/1356776817075459329",
48
+    method: "POST",
49
+    data: {
50
+      "apiId": "1356776817075459329",
51
+      "appKey": "200000134",
52
+      "env": "PROD",
53
+      "reqProtocol": 1,
54
+      "returnFields": [
55
+        "indexName",
56
+        "prodCatgory",
57
+        "indexValue"
58
+      ],
59
+      "pageNum": 1,
60
+      "pageSize": 10,
61
+      "useResultCache": false
62
+    },
63
+    headers: {
64
+      sign: 'd58de970856e583f126d186662251024',
65
+      account: 'yunxi_fuxue',
66
+      'Cache-Control': 'no-cache',
67
+      apiId: '1356776817075459329',
68
+      appKey: '200000134',
69
+      execType: '3',
70
+      env: 'PROD',
71
+    }
72
+  });
73
+}
74
+
75
+
76
+/** 产量计划完成率*/
77
+export function timeService(params) {
78
+  return request({
79
+    url: "/dataengine-center-oneservice/list/1435868883211217227",
80
+    method: "POST",
81
+    data: {
82
+      "apiId": "1435868883211217227",
83
+      "appKey": "200000138",
84
+      "env": "PROD",
85
+      "reqProtocol": 1,
86
+      "returnFields": [
87
+        "indexName",
88
+        "factoryName",
89
+        "indexValue",
90
+        "factoryCode"
91
+      ],
92
+      "pageNum": 1,
93
+      "pageSize": 999,
94
+      "useResultCache": false
95
+    },
96
+    headers: {
97
+      sign: '897e941a533a75ae9bf82305f2d6df34',
98
+      account: 'yunxi_fuxue',
99
+      'Cache-Control': 'no-cache',
100
+      apiId: '1435868883211217227',
101
+      appKey: '200000138',
102
+      execType: '3',
103
+      env: 'PROD',
104
+    }
105
+  });
106
+}
107
+
108
+/**产值+发货量+产量+库存*/
109
+export function numberService(params) {
110
+  return request({
111
+    url: "/dataengine-center-oneservice/list/1435869479216572764",
112
+    method: "POST",
113
+    data: {
114
+      "apiId": "1435869479216572764",
115
+      "appKey": "200000138",
116
+      "env": "PROD",
117
+      "reqProtocol": 1,
118
+      "returnFields": [
119
+        "indexName",
120
+        "indexValue"
121
+      ],
122
+      "pageNum": 1,
123
+      "pageSize": 10,
124
+      "useResultCache": false
125
+    },
126
+    headers: {
127
+      sign: 'e764fa1aae81091bde971cd28a709dfa',
128
+      account: 'yunxi_fuxue',
129
+      'Cache-Control': 'no-cache',
130
+      apiId: '1435869479216572764',
131
+      appKey: '200000138',
132
+      execType: '3',
133
+      env: 'PROD',
134
+    }
135
+  });
136
+}
137
+
138
+
139
+/**近30天产量*/
140
+export function mondService(params) {
141
+  return request({
142
+    url: "/dataengine-center-oneservice/list/1435868691592341823",
143
+    method: "POST",
144
+    data: {
145
+      "apiId": "1435868691592341823",
146
+      "appKey": "200000138",
147
+      "env": "PROD",
148
+      "reqProtocol": 1,
149
+      "returnFields": [
150
+        "indexName",
151
+        "indexDate",
152
+        "indexValue",
153
+        "factoryProdcution",
154
+        "totalValue"
155
+      ],
156
+      "pageNum": 1,
157
+      "pageSize": 30,
158
+      "useResultCache": false
159
+    },
160
+    headers: {
161
+      sign: '419a4e9f3c7ed4b18c42b211e4d209fc',
162
+      account: 'yunxi_fuxue',
163
+      'Cache-Control': 'no-cache',
164
+      apiId: '1435868691592341823',
165
+      appKey: '200000138',
166
+      execType: '3',
167
+      env: 'PROD',
168
+    }
169
+  });
170
+}
171
+
172
+/**月度产量/发货量+一次合格率*/
173
+export function twoService(params) {
174
+  return request({
175
+    url: "/dataengine-center-oneservice/list/1435869411763775830",
176
+    method: "POST",
177
+    data: {
178
+      "apiId": "1435869411763775830",
179
+      "appKey": "200000138",
180
+      "env": "PROD",
181
+      "reqProtocol": 1,
182
+      "returnFields": [
183
+        "bMonth",
184
+        "proQty",
185
+        "deliveryQty",
186
+        "qcRate",
187
+        "targeRate",
188
+        "budgetProdQty",
189
+        "budgetSalesQty"
190
+      ],
191
+      "pageNum": 1,
192
+      "pageSize": 10,
193
+      "useResultCache": false
194
+    },
195
+    headers: {
196
+      sign: 'c1a4f54cc466dbc636391987832361f3',
197
+      account: 'yunxi_fuxue',
198
+      'Cache-Control': 'no-cache',
199
+      apiId: '1435869411763775830',
200
+      appKey: '200000138',
201
+      execType: '3',
202
+      env: 'PROD',
203
+    }
204
+  });
205
+}
206
+/**干基产率*/
207
+export function dryBaseData(params) {
208
+  return request({
209
+    url: "/dataengine-center-oneservice/list/1435869551190829407",
210
+    method: "POST",
211
+    data: {
212
+      "apiId": "1435869551190829407",
213
+      "appKey": "200000138",
214
+      "env": "PROD",
215
+      "reqProtocol": 1,
216
+      "returnFields": [
217
+        "bMonth",
218
+        "factoryName",
219
+        "indexValue",
220
+      ],
221
+      "pageNum": 1,
222
+      "pageSize": 100,
223
+      "useResultCache": false
224
+    },
225
+    headers: {
226
+      sign: 'd220845f9b15022fe9cd97aab13935f9',
227
+      account: 'yunxi_fuxue',
228
+      'Cache-Control': 'no-cache',
229
+      apiId: '1435869551190829407',
230
+      appKey: '200000138',
231
+      execType: '3',
232
+      env: 'PROD',
233
+    }
234
+  });
235
+}
236
+
237
+/**更新日期*/
238
+export function updateTimeService(params) {
239
+  return request({
240
+    url: "/dataengine-center-oneservice/list/1435869869019457910",
241
+    method: "POST",
242
+    data: {
243
+      "apiId": "1435869869019457910",
244
+      "appKey": "200000138",
245
+      "env": "PROD",
246
+      "reqProtocol": 1,
247
+      "returnFields": [
248
+        "etlTime"
249
+      ],
250
+      "pageNum": 1,
251
+      "pageSize": 10,
252
+      "useResultCache": false
253
+    },
254
+    headers: {
255
+      sign: '5646c212a5cc864e43c14c2e7e4414b8',
256
+      account: 'yunxi_fuxue',
257
+      'Cache-Control': 'no-cache',
258
+      apiId: '1435869869019457910',
259
+      appKey: '200000138',
260
+      execType: '3',
261
+      env: 'PROD',
262
+    }
263
+  });
264
+}
265
+
266
+/**基地数据*/
267
+export function getBaseData(params) {
268
+  return request({
269
+    url: "/dataengine-center-oneservice/list/1436949456311773653",
270
+    method: "POST",
271
+    data: {
272
+      "apiId": "1436949456311773653",
273
+      "appKey": "200000138",
274
+      "env": "PROD",
275
+      "reqProtocol": 1,
276
+      "returnFields": [
277
+        "factoryCode",
278
+        "production",
279
+        "inventory",
280
+      ],
281
+      "pageNum": 1,
282
+      "pageSize": 10,
283
+      "useResultCache": false
284
+    },
285
+    headers: {
286
+      sign: '47afe9770e467bba26fdbdcdc5a0a1cf',
287
+      account: 'yunxi_fuxue',
288
+      'Cache-Control': 'no-cache',
289
+      apiId: '1436949456311773653',
290
+      appKey: '200000138',
291
+      execType: '3',
292
+      env: 'PROD',
293
+    }
294
+  });
295
+}
296
+
297
+/**基地年月日数据*/
298
+export function getBaseYMDData(params) {
299
+  return request({
300
+    url: "/dataengine-center-oneservice/list/1436949376672426448",
301
+    method: "POST",
302
+    data: {
303
+      "apiId": "1436949376672426448",
304
+      "appKey": "200000138",
305
+      "env": "PROD",
306
+      "reqProtocol": 1,
307
+      "returnFields": [
308
+        "factoryCode",
309
+        "factoryNameCode",
310
+        "dateType",
311
+        "indexValue"
312
+      ],
313
+      "pageNum": 1,
314
+      "pageSize": 10,
315
+      "useResultCache": false
316
+    },
317
+    headers: {
318
+      sign: '36a12893781aeabbc03e62a3b8e1f493',
319
+      account: 'yunxi_fuxue',
320
+      'Cache-Control': 'no-cache',
321
+      apiId: '1436949376672426448',
322
+      appKey: '200000138',
323
+      execType: '3',
324
+      env: 'PROD',
325
+    }
326
+  });
327
+}
328
+
329
+/**基地年月日数据*/
330
+export function getBaseDetailData(params) {
331
+  return request({
332
+    url: "/dataengine-center-oneservice/list/1436949284175440330",
333
+    method: "POST",
334
+    data: {
335
+      "apiId": "1436949284175440330",
336
+      "appKey": "200000138",
337
+      "env": "PROD",
338
+      "reqProtocol": 1,
339
+      "returnFields": [
340
+        "factoryCode",
341
+        "factoryName",
342
+        "prodCatgoryCode",
343
+        "prodCatgory",
344
+        "indexValue",
345
+      ],
346
+      "pageNum": 1,
347
+      "pageSize": 10,
348
+      "useResultCache": false
349
+    },
350
+    headers: {
351
+      sign: 'c7e043fed27eeb6c524a6e5158035329',
352
+      account: 'yunxi_fuxue',
353
+      'Cache-Control': 'no-cache',
354
+      apiId: '1436949284175440330',
355
+      appKey: '200000138',
356
+      execType: '3',
357
+      env: 'PROD',
358
+    }
359
+  });
360
+}
361
+
362
+

+ 287 - 0
src/pages/sial/component/bottomLineForSend.jsx

@@ -0,0 +1,287 @@
1
+/*
2
+ * @Author: dayan_hjm 近30天产量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-01-03 14:13:59
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import {
14
+  mondService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class BottomLineForSend extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      total_arr: [],
26
+      year: [],
27
+      yanting_arr: [],
28
+      jiangsu_arr: [],
29
+    };
30
+  }
31
+
32
+  componentDidMount() {
33
+    this.getUrl()
34
+  }
35
+  async getUrl() {
36
+    await mondService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], total_arr = [], yanting_arr = [], jiangsu_arr = [];
39
+        data.map((x, i) => {
40
+          const name_ = x.indexDate.split('-')[1] + '-' + x.indexDate.split('-')[2];
41
+          year.push(name_);
42
+          total_arr.push(x.totalValue)
43
+          yanting_arr.push(x.factoryProdcution)
44
+          jiangsu_arr.push(x.indexValue)
45
+        });
46
+        this.setState({ year, total_arr, yanting_arr, jiangsu_arr });
47
+        this.setData();
48
+      }
49
+    });
50
+
51
+  }
52
+
53
+  setData() {
54
+    setTimeout(() => {
55
+      // 基于准备好的dom,初始化echarts实例
56
+      var myChart = echarts.init(document.getElementById('echarts2'));
57
+
58
+      var option = {
59
+        tooltip: {
60
+          trigger: 'axis',
61
+          axisPointer: { type: 'shadow' },
62
+          borderColor: "rgba(105, 255, 222, 0.5)",
63
+          borderWidth: 2,
64
+          padding: 5,
65
+          className: 'dyLeft',
66
+          textStyle: {
67
+            fontSize: 12,
68
+            textAlign: "left",
69
+            color: "#ededed"
70
+          },
71
+          backgroundColor: "#0000008a",
72
+        },
73
+        formatter: `日期: {b0}<br />{a0}: {c0}吨<br />{a1}: {c1}吨<br />{a2}: {c2}吨`,
74
+        grid: {
75
+          left: '5%',
76
+          top: '10%',
77
+          right: '4%',
78
+          bottom: '15%',
79
+          containLabel: true
80
+        },
81
+
82
+
83
+        // legend: {
84
+        //   data: ['字段1', '字段2'],
85
+        //   right: 'center',
86
+        //   top: 0,
87
+        //   textStyle: {
88
+        //     color: "#fff"
89
+        //   },
90
+        //   itemWidth: 12,
91
+        //   itemHeight: 10,
92
+        //   // itemGap: 35
93
+        // },
94
+
95
+        xAxis: [{
96
+          type: 'category',
97
+          // boundaryGap: ['20%', '20%'],
98
+          axisLabel: {
99
+            interval: 0,
100
+            rotate: -60,
101
+            textStyle: {
102
+              color: '#7d7d7d',
103
+              fontSize: 11,
104
+            },
105
+            showMaxLabel: true,//关键部分,显示最后一个label
106
+          },
107
+          axisLine: {
108
+            lineStyle: {
109
+              color: 'rgba(255,255,255,.1)',
110
+              type: 'dashed',
111
+
112
+            }
113
+          },
114
+          splitLine: {
115
+            show: true,
116
+            lineStyle: {
117
+              color: '#3b3b3b',
118
+              type: 'dashed',
119
+            }
120
+          },
121
+          data: this.state.year
122
+        }, {
123
+
124
+          axisPointer: { show: false },
125
+          axisLine: { show: false },
126
+          position: 'bottom',
127
+          offset: 20,
128
+
129
+
130
+
131
+        }],
132
+
133
+        yAxis: [{
134
+          type: 'value',
135
+          axisTick: { show: false },
136
+          // splitNumber: 6,
137
+          axisLine: {
138
+            lineStyle: {
139
+              color: 'rgba(255,255,255,.1)'
140
+            },
141
+          },
142
+          axisLabel: {
143
+            formatter: "{value} 吨",
144
+            textStyle: {
145
+              color: '#7d7d7d',
146
+              fontSize: 13
147
+            },
148
+          },
149
+
150
+          splitLine: {
151
+            lineStyle: {
152
+              color: 'rgba(255,255,255,.1)'
153
+            }
154
+          }
155
+        }],
156
+        series: [
157
+          {
158
+            name: '总产量',
159
+            type: 'line',
160
+            smooth: true,
161
+            symbol: 'circle',
162
+            symbolSize: 5,
163
+            showSymbol: false,
164
+            lineStyle: {
165
+              normal: {
166
+                color: '#69FFDE',
167
+                width: 2
168
+              }
169
+            },
170
+            areaStyle: {
171
+              normal: {
172
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
173
+                  offset: 0,
174
+                  color: 'rgba(0, 255, 182, 0.5)'
175
+                }, {
176
+                  offset: 1,
177
+                  color: 'rgba(0, 255, 182, 0)'
178
+                }], false),
179
+                shadowColor: 'rgba(0, 0, 0, 0.1)',
180
+              }
181
+            },
182
+            itemStyle: {
183
+              normal: {
184
+                color: 'rgba(0, 255, 182, 0.3)',
185
+                borderWidth: 12
186
+              }
187
+            },
188
+            data: this.state.total_arr,
189
+            "smooth": true
190
+          },
191
+          {
192
+            name: '江苏(产量)',
193
+            type: 'line',
194
+            smooth: true,
195
+            symbol: 'circle',
196
+            symbolSize: 0,
197
+            showSymbol: false,
198
+            itemStyle: {
199
+              color: '#FFCE00'
200
+            },
201
+            lineStyle: {
202
+              normal: {
203
+                color: '#FFCE00',
204
+                width: 2
205
+              }
206
+            },
207
+            data: this.state.jiangsu_arr,
208
+            "smooth": true
209
+          },
210
+          {
211
+            name: '盐亭(产量)',
212
+            type: 'line',
213
+            smooth: true,
214
+            symbol: 'circle',
215
+            symbolSize: 0,
216
+            showSymbol: false,
217
+            lineStyle: {
218
+              normal: {
219
+                color: '#8D93FF',
220
+                width: 2
221
+              }
222
+            },
223
+            itemStyle: {
224
+              normal: {
225
+                color: '#8D93FF',
226
+                borderColor: '#8D93FF',
227
+                borderWidth: 2
228
+              }
229
+            },
230
+            data: this.state.yanting_arr,
231
+            "smooth": true
232
+          },
233
+          // {
234
+          //   name: '字段2',
235
+          //   type: 'line',
236
+          //   smooth: true,
237
+          //   symbol: 'circle',
238
+          //   symbolSize: 5,
239
+          //   showSymbol: false,
240
+          //   lineStyle: {
241
+
242
+          //     normal: {
243
+          //       color: 'rgba(255, 128, 128, 1)',
244
+          //       width: 2
245
+          //     }
246
+          //   },
247
+          //   areaStyle: {
248
+          //     normal: {
249
+          //       color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
250
+          //         offset: 0,
251
+          //         color: 'rgba(255, 128, 128,.2)'
252
+          //       }, {
253
+          //         offset: 1,
254
+          //         color: 'rgba(255, 128, 128, 0)'
255
+          //       }], false),
256
+          //       shadowColor: 'rgba(0, 0, 0, 0.1)',
257
+          //     }
258
+          //   },
259
+          //   itemStyle: {
260
+          //     normal: {
261
+          //       color: 'rgba(255, 128, 128, 1)',
262
+          //       borderColor: 'rgba(255, 128, 128, .1)',
263
+          //       borderWidth: 12
264
+          //     }
265
+          //   },
266
+          //   data: [-6.4, 0.1, 6.6, 11.2, 42.1, 26.0, 20.2, 18.31, 21.59, 24.42, 34.03, 32.9]
267
+          // },
268
+        ]
269
+      };
270
+      // 使用刚指定的配置项和数据显示图表。
271
+      myChart.setOption(option);
272
+      window.addEventListener("resize", function () {
273
+        myChart.resize();
274
+      });
275
+    }, 3000)
276
+  }
277
+
278
+  render() {
279
+
280
+    return (
281
+      <div className={["eacharView cbBottomLineForSend"]}>
282
+        <div id="echarts2"></div>
283
+      </div>
284
+    )
285
+  }
286
+}
287
+export default BottomLineForSend;

+ 219 - 0
src/pages/sial/component/dryBaseQualified.jsx

@@ -0,0 +1,219 @@
1
+/*
2
+ * @Author: dayan_hjm 一次合格率
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-12-19 16:02:23
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import {
14
+  dryBaseData,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class BottomLineForSend extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      yantingRate: [],
26
+      year: [],
27
+      jiangsuRate: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+
35
+  async getUrl() {
36
+    await dryBaseData().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], jiangsuRate = [], yantingRate = [];
39
+        data.map((x, i) => {
40
+          if (!year.includes(x.bMonth)) {
41
+            year.push(x.bMonth);
42
+          }
43
+          if (x.factoryName == '天齐盐亭') {
44
+            yantingRate.push(x.indexValue)
45
+          } else if (x.factoryName == '天齐江苏') {
46
+            jiangsuRate.push(x.indexValue)
47
+          }
48
+        });
49
+        this.setState({ year, yantingRate, jiangsuRate });
50
+        this.setData();
51
+      }
52
+    });
53
+  }
54
+  roundFun(value = 0) {
55
+    value = value * 100;
56
+    var str = parseFloat(value).toFixed(10);
57
+    var num = str.substring(0, str.lastIndexOf('.') + 3);
58
+    return num
59
+  }
60
+
61
+
62
+  setData() {
63
+    setTimeout(() => {
64
+      // 基于准备好的dom,初始化echarts实例
65
+      var myChart = echarts.init(document.getElementById('echarts_drybase'));
66
+
67
+      var option = {
68
+        tooltip: {
69
+          trigger: 'axis',
70
+          axisPointer: { type: 'shadow' },
71
+          borderColor: "rgba(105, 255, 222, 0.5)",
72
+          borderWidth: 2,
73
+          padding: 2,
74
+          textStyle: {
75
+            fontSize: 12,
76
+            color: "#ededed"
77
+          },
78
+          formatter: (param) => {
79
+            return (param[0] && param[0].seriesName ? param[0].seriesName + ":" : "") + (param[0] && param[0].value ? this.roundFun(param[0].value) + "%<br />" : "") + (param[1] && param[1].seriesName ? param[1].seriesName + ":" : "") + (param[1] && param[1].value ? this.roundFun(param[1].value) + "%" : "")
80
+            // return (
81
+            //   <div>
82
+            //     <p>
83
+            //       <span>{param[0] && param[0].seriesName ? param[0].seriesName + ":" : ""}</span>
84
+            //       <span>{param[0] && param[0].value ? param[0].value.toFixed(2) + "%<br />" : ""}</span>
85
+            //     </p>
86
+            //     <p>
87
+            //       <span>{param[1] && param[1].seriesName ? param[1].seriesName + ":" : ""}</span>
88
+            //       <span>{param[1] && param[1].value ? param[1].value.toFixed(2) + "%" : ""}</span>
89
+            //     </p>
90
+            //   </div>
91
+            // )
92
+          },
93
+          //  `{a0}: {c0}<br />{a1}: {c1}`,
94
+          backgroundColor: "#0000008a"
95
+        }, "grid": {
96
+          "top": "20%",
97
+          "right": "5%",
98
+          "bottom": "20",
99
+          "left": "10%",
100
+        },
101
+        legend: {
102
+          data: ['盐亭', '江苏'],
103
+          right: 'center',
104
+          padding: [10, 0, 0, 5],
105
+          top: 0,
106
+          textStyle: {
107
+            color: "#fff",
108
+            fontSize: 10,
109
+          },
110
+          itemWidth: 12,
111
+          itemHeight: 5,
112
+        },
113
+        "xAxis": [
114
+          {
115
+            "type": "category",
116
+            data: this.state.year,
117
+            axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
118
+            axisLabel: {
119
+              textStyle: { color: "'#7d7d7d'", fontSize: '12', },
120
+            },
121
+            splitLine: {
122
+              show: true,
123
+              lineStyle: {
124
+                color: '#3b3b3b',
125
+                type: 'dashed',
126
+
127
+              }
128
+            }
129
+
130
+          },
131
+        ],
132
+        "yAxis": [
133
+          {
134
+            type: 'value',
135
+            axisLine: {
136
+              lineStyle: {
137
+                color: '#7d7d7d',
138
+                type: 'dashed',
139
+              },
140
+            },
141
+            min: 0,
142
+            max: 1,
143
+            // splitNumber: 5,
144
+            axisTick: { show: false },
145
+            axisLabel: {
146
+              formatter: (value) => {
147
+                return value * 100 + '%'
148
+              },
149
+              textStyle: {
150
+                color: '#7d7d7d',
151
+                fontSize: 12
152
+              }
153
+            },
154
+            splitLine: {
155
+              show: true,
156
+              lineStyle: {
157
+                color: '#3b3b3b',
158
+                type: 'dashed',
159
+
160
+              }
161
+            }
162
+          },
163
+        ],
164
+        "series": [
165
+          {
166
+            "name": "盐亭",
167
+            "type": "line",
168
+            data: this.state.yantingRate,
169
+            lineStyle: {
170
+              normal: {
171
+                width: 2
172
+              },
173
+            },
174
+            "itemStyle": {
175
+              "normal": {
176
+                "color": "#69FFDE",
177
+
178
+              }
179
+            },
180
+            "smooth": true
181
+          },
182
+          {
183
+            "name": "江苏",
184
+            "type": "line",
185
+            data: this.state.jiangsuRate,
186
+            lineStyle: {
187
+              normal: {
188
+                width: 2
189
+              },
190
+            },
191
+            "itemStyle": {
192
+              "normal": {
193
+                "color": "#FFCE00",
194
+
195
+              }
196
+            },
197
+            "smooth": true
198
+          }
199
+        ]
200
+      };
201
+      // 使用刚指定的配置项和数据显示图表。
202
+      myChart.setOption(option);
203
+      window.addEventListener("resize", function () {
204
+        myChart.resize();
205
+      });
206
+
207
+    }, 3000)
208
+  }
209
+
210
+  render() {
211
+
212
+    return (
213
+      <div className={["eacharView cbBottomLineForSend"]}>
214
+        <div id="echarts_drybase"></div>
215
+      </div>
216
+    )
217
+  }
218
+}
219
+export default BottomLineForSend;

+ 425 - 0
src/pages/sial/component/leftMenoyView.jsx

@@ -0,0 +1,425 @@
1
+/*
2
+ * @Author: dayan_hjm 库存金额
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-22 15:07:37
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import { getArrMax } from "@utils/util";
14
+import { getThousandNum } from "@utils/util";
15
+import {
16
+  momeyService,
17
+} from "../api";
18
+
19
+@withRouter
20
+
21
+class LeftMenoyView extends Component {
22
+  // 构造函数,组件的实例创建时,最先执行
23
+  constructor(props, context) {
24
+    super(props, context);
25
+    this.store = mod;
26
+    this.state = {
27
+      max1:[],
28
+      year:["碳酸锂","氧化纳",'金属锂',"氢氧化锂"],
29
+      missionsIntensity_arr:[
30
+        {value:0,name:"碳酸锂"},
31
+        {value:0,name:"氧化纳"},
32
+        {value:0,name:'金属锂'},
33
+        {value:0,name:"氢氧化锂"},
34
+      ],
35
+    };
36
+  }
37
+
38
+  componentDidMount() {
39
+    this.getUrl()
40
+  }
41
+
42
+  async getUrl() {
43
+    let data_style= [{
44
+            value: 25, name: '', itemStyle: {
45
+              normal: {
46
+                // barBorderRadius: 15,
47
+                // borderColor: "rgba(141, 147, 255, 1)",
48
+                // borderWidth: 1,
49
+                color: {
50
+                  // 完成的圆环的颜色
51
+                  colorStops: [
52
+                    {
53
+                      offset: 0,
54
+                      color: 'rgba(141, 147, 255, 0.3)', // 0% 处的颜色
55
+                    },
56
+                    {
57
+                      offset: 1,
58
+                      color: 'rgba(141, 147, 255, 1)', // 100% 处的颜色
59
+                    },
60
+                  ],
61
+                },
62
+              },
63
+            },
64
+
65
+          }, {
66
+            value: 33, name: '', itemStyle: {
67
+              normal: {
68
+                // barBorderRadius: 15,
69
+                // borderColor: "rgba(105, 255, 222, 1)",
70
+                // borderWidth: 1,
71
+
72
+                color: {
73
+                  // 完成的圆环的颜色
74
+                  colorStops: [
75
+                    {
76
+                      offset: 0,
77
+                      color: 'rgba(105, 255, 222, 0.3)', // 0% 处的颜色
78
+                    },
79
+                    {
80
+                      offset: 1,
81
+                      color: 'rgba(105, 255, 222, 1)', // 100% 处的颜色
82
+                    },
83
+                  ],
84
+                },
85
+              },
86
+            },
87
+
88
+          }, {
89
+            value: 35, name: '', itemStyle: {
90
+              normal: {
91
+                // barBorderRadius: 15,
92
+                // borderColor: "rgba(47, 210, 255, 1)",
93
+                // borderWidth: 1,
94
+
95
+                color: {
96
+                  // 完成的圆环的颜色
97
+                  colorStops: [
98
+                    {
99
+                      offset: 0,
100
+                      color: 'rgba(47, 210, 255, 0.3)', // 0% 处的颜色
101
+                    },
102
+                    {
103
+                      offset: 1,
104
+                      color: 'rgba(47, 210, 255, 1)', // 100% 处的颜色
105
+                    },
106
+                  ],
107
+                },
108
+              },
109
+            },
110
+
111
+          }, {
112
+            value: 40, name: '', itemStyle: {
113
+              normal: {
114
+                // barBorderRadius: 15,
115
+                // borderColor: "rgba(255, 206, 0, 1)",
116
+                // borderWidth: 1,
117
+
118
+                color: {
119
+                  // 完成的圆环的颜色
120
+                  colorStops: [
121
+                    {
122
+                      offset: 0,
123
+                      color: 'rgba(255, 206, 0, 0.3)', // 0% 处的颜色
124
+                    },
125
+                    {
126
+                      offset: 1,
127
+                      color: 'rgba(255, 206, 0, 1)', // 100% 处的颜色
128
+                    },
129
+                  ],
130
+                },
131
+              },
132
+            },
133
+
134
+          }]
135
+    await momeyService().then(({ data = [], resultCode }) => {
136
+      
137
+      if (+resultCode === 0) {
138
+        let year = [], missionsIntensity_arr = [],max1=[],num=[];
139
+        data.map((x, i) => {
140
+          num.push(x.indexValue)
141
+          year.unshift(x.prodCatgory);
142
+          data_style[i].value = x.indexValue;
143
+          data_style[i].name = x.prodCatgory;
144
+          missionsIntensity_arr.push(data_style[i])
145
+        });
146
+        const max_1 = getArrMax(num);
147
+        for (let index = 0; index < data.length; index++) {
148
+          max1.unshift(max_1/0.7)
149
+        }
150
+        console.log("year, missionsIntensity_arr,max1",year, missionsIntensity_arr,max1)
151
+        this.setState({ year, missionsIntensity_arr,max1 });
152
+        this.setData();
153
+        this.setData2();
154
+      }
155
+    });
156
+
157
+  }
158
+
159
+
160
+  setData() {
161
+    setTimeout(() => {
162
+      // 基于准备好的dom,初始化echarts实例
163
+      var myChart = echarts.init(document.getElementById('echarts4'));
164
+      var option = {
165
+
166
+        grid: {
167
+          left: '0%',
168
+          top: '4%',
169
+          right: '5%',
170
+          bottom: '0%',
171
+          containLabel: true
172
+        },
173
+        xAxis: [{
174
+          show: false,
175
+        }],
176
+        yAxis: [{
177
+          axisTick: 'none',
178
+          axisLine: 'none',
179
+          offset: '7',
180
+          axisLabel: {
181
+            textStyle: {
182
+              color: 'rgba(255,255,255,.9)',
183
+              fontSize: '0',
184
+            }
185
+          },
186
+          data: this.state.year
187
+        },
188
+        {
189
+          name: '单位:件',
190
+          nameGap: '50',
191
+          nameTextStyle: {
192
+            color: 'rgba(255,255,255,.6)',
193
+            fontSize: '16',
194
+          },
195
+          axisLine: {
196
+            lineStyle: {
197
+              color: 'rgba(0,0,0,0)'
198
+            }
199
+          },
200
+          data: [],
201
+        }],
202
+        series: [{
203
+          name: '条',
204
+          type: 'bar',
205
+          yAxisIndex: 0,
206
+          data: this.state.missionsIntensity_arr,
207
+          label: {
208
+            normal: {
209
+              show: true,
210
+              position: 'right',
211
+              formatter: function (param) {
212
+                return getThousandNum(param.value) + '万元';
213
+                // return param.name+":"+param.value + '万元';
214
+
215
+              },
216
+              textStyle: {
217
+                color: 'rgba(255,255,255,1)',
218
+                fontSize: '10',
219
+              }
220
+            }
221
+          },
222
+          barWidth: 15,
223
+          itemStyle: {
224
+            normal: {
225
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
226
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
227
+                { offset: 0.7, color: '#ffd01d94' },
228
+                { offset: 1, color: '#ffd01d94' },
229
+              ]),
230
+              barBorderRadius: 15,
231
+              // borderColor: "rgba(255, 206, 0, 1)",
232
+              // borderWidth: 1
233
+            }
234
+          },
235
+          labelLine: {
236
+            length: 10,
237
+            length2: 50,
238
+          },
239
+          // labelLayout: {
240
+          //   x: "20%",
241
+          //   y: "20%",
242
+          //   verticalAlign: "bottom",
243
+          //   dy: -10,
244
+          // },
245
+          z: 2
246
+        }, {
247
+          name: '白框',
248
+          type: 'bar',
249
+          yAxisIndex: 1,
250
+          barGap: '-100%',
251
+          data: this.state.max1,
252
+          barWidth: 15,
253
+          itemStyle: {
254
+            normal: {
255
+              color: '#ffffff24',
256
+              barBorderRadius: 15,
257
+
258
+            }
259
+          },
260
+          z: 1
261
+        }]
262
+      };
263
+
264
+
265
+      // 使用刚指定的配置项和数据显示图表。
266
+      myChart.setOption(option);
267
+      window.addEventListener("resize", function () {
268
+        myChart.resize();
269
+      });
270
+    }, 3000)
271
+  }
272
+
273
+  setData2() {
274
+    setTimeout(() => {
275
+      // 基于准备好的dom,初始化echarts实例
276
+      var myChart = echarts.init(document.getElementById('echarts6'));
277
+      let index = 0;
278
+      function fun() {
279
+        var timer = setInterval(function () {
280
+          myChart.dispatchAction({
281
+            type: 'hideTip',
282
+            seriesIndex: 0,
283
+            dataIndex: index,
284
+          });
285
+          // 显示提示框
286
+          myChart.dispatchAction({
287
+            type: 'showTip',
288
+            seriesIndex: 0,
289
+            dataIndex: index,
290
+          });
291
+          // 取消高亮指定的数据图形
292
+          myChart.dispatchAction({
293
+            type: 'downplay',
294
+            seriesIndex: 0,
295
+            dataIndex: index == 0 ? 3 : index - 1,
296
+          });
297
+          myChart.dispatchAction({
298
+            type: 'highlight',
299
+            seriesIndex: 0,
300
+            dataIndex: index,
301
+          });
302
+          index++;
303
+          if (index >= 4) {
304
+            index = 0;
305
+          }
306
+        }, 2000);
307
+      }
308
+      fun();
309
+      setTimeout(function () {
310
+        fun();
311
+      }, 3000);
312
+      var option = {
313
+        // //标题
314
+        // title: {
315
+        //   text: '16%',
316
+        //   subtext: '氢氧化锂',
317
+        //   x: 'center',
318
+        //   y: '40%',
319
+        //   textStyle: {
320
+        //     color: '#fff',
321
+        //     fontSize: 20,
322
+        //     lineHeight: 10,
323
+        //   },
324
+        //   subtextStyle: {
325
+        //     color: 'rgba(205, 241, 255, 1)',
326
+        //     fontSize: 14,
327
+        //     lineHeight: 10,
328
+        //     marginTop: 15,
329
+        //   },
330
+        // },
331
+
332
+        //图例组件
333
+
334
+        tooltip: {
335
+          trigger: 'item',
336
+          position: ['50%', '50%'],
337
+          formatter: function (params, ticket, callback) {
338
+            // $.get('detail?name=' + params.name, function (content) {
339
+            //   callback(ticket, toHTML(content));
340
+            // });
341
+            return `<div class="testDiv"><p class="p1">
342
+              ${params.percent ? params.percent.toFixed() : 0}<spanp class="p3">%</span>
343
+            </p>
344
+            <p class="p2">${params.name}</p>
345
+            </div>`;
346
+          },
347
+          backgroundColor: 'rgba(0,0,0,0)',
348
+
349
+          textStyle: {
350
+            color: '#fff',
351
+            fontSize: 20,
352
+            lineHeight: 10,
353
+          },
354
+        },
355
+        series: [
356
+          {
357
+            type: 'pie',
358
+            radius: ['50%', '65%'],
359
+            center: ['50%', '50%'],
360
+            roseType: 'area',
361
+            //标题与数字一行显示
362
+            label: {
363
+              show: false,
364
+
365
+            },
366
+
367
+            //标题与数字分二行显示
368
+            // label: {
369
+            //     alignTo: 'edge',
370
+            //     formatter: '{name|{b}}\n{time|{d}%}',
371
+            //     minMargin: 5,
372
+            //     edgeDistance: 10,
373
+            //     lineHeight: 30,
374
+            //     rich: {
375
+            //         time: {
376
+            //             fontSize: 10,
377
+            //             color: 'auto'
378
+            //         }
379
+            //     }
380
+            // },
381
+            labelLine: {
382
+              show: false
383
+            },
384
+            data: this.state.missionsIntensity_arr,
385
+          },
386
+        ],
387
+      };
388
+
389
+
390
+
391
+      // 使用刚指定的配置项和数据显示图表。
392
+      myChart.setOption(option);
393
+      window.addEventListener("resize", function () {
394
+        myChart.resize();
395
+      });
396
+
397
+    }, 3000)
398
+  }
399
+
400
+  render() {
401
+
402
+    return (
403
+      <div className={["eacharView cbLeftMenoyView"]}>
404
+        <div id="echarts6_box">
405
+          <img
406
+            src={require("@assets/imgs/dataVimg/guanghuan.png").default}
407
+            alt=""
408
+            class="guanghuan animate__animated animate__pulse animate__infinite animate__slower"
409
+          />
410
+
411
+          <div id="echarts6"></div>
412
+        </div>
413
+        <ul className={"name_ul"}>
414
+          {
415
+            this.state.year.map(x=>{
416
+              return <li>{x}</li>
417
+            })
418
+          }
419
+        </ul>
420
+        <div id="echarts4"></div>
421
+      </div>
422
+    )
423
+  }
424
+}
425
+export default LeftMenoyView;

+ 112 - 0
src/pages/sial/component/mapView.jsx

@@ -0,0 +1,112 @@
1
+/*
2
+ * @Author: dayan_hjm 中部地图 第一段
3
+ * @Date: 2023-10-25 10:32:44 
4
+ * @Last Modified by: dayan_hjm
5
+ * controls 属性 : 值为 controls , 启用控制按钮 , 由于在不同的浏览器中表现不同 , 一般情况下 , 不显示控制按钮 ;
6
+        autoplay 属性 : 值为 autoplay , 在 Chrome 浏览器中 禁用自动播放 , 其它浏览器不禁用自动播放 ;
7
+        如果为视频设置静音播放 , 则可以在 Chrom 浏览器中 设置 autoplay 实现自动播放 ;
8
+        muted 属性 : 值为 muted , 将视频设置为静音播放 ;
9
+        如果为视频设置静音播放 , 则可以在 Chrom 浏览器中 设置 autoplay 实现自动播放 ;
10
+        width 属性 : 值为像素值 , 设置播放器宽度 ; 播放器的宽高建议只设置一个 , 避免失真 ;
11
+        height 属性 : 值为像素值 , 设置播放器高度 ; 播放器的宽高建议只设置一个 , 避免失真 ;
12
+        loop 属性 : 值为 loop , 设置播放器循环播放 ;
13
+        poster 属性 : 值为 图片 url 路径 , 设置视频位置等待加载时的图片 ;
14
+        preload 属性 :
15
+        设置 auto , 表示 预先加载视频 ;
16
+        设置 none , 表示 不预先加载视频 ;
17
+ * @Last Modified time: 2023-11-01 15:54:40
18
+ */
19
+import React, { useState, useEffect, Component } from "react";
20
+import { useHistory, useLocation, withRouter } from "react-router-dom";
21
+import mod from '../mod';
22
+import 'animate.css';
23
+@withRouter
24
+
25
+class MapView extends Component {
26
+  // 构造函数,组件的实例创建时,最先执行
27
+  constructor(props, context) {
28
+    super(props, context);
29
+    this.store = mod;
30
+    this.state = {
31
+      changGif: false,
32
+    };
33
+  }
34
+
35
+  componentDidMount() {
36
+    setTimeout(() => {
37
+      //替换gif
38
+      this.setState({ changGif: true });
39
+      this.videoStart();
40
+    }, 200)
41
+    // setTimeout(() => {
42
+    //   $(".video_box_hide").hide();
43
+    // }, 4000)
44
+  }
45
+  videoStart() {
46
+    /*     Chrome 浏览器的视频自动播放策略
47
+        1.始终允许静音模式下自动播放
48
+        2.在以下的情况中,带声音播放会被允许:
49
+          ①用户已经与当前的域进行了交互(也就是click,tap事件)。
50
+          ②在桌面设备上,用户的媒体参与度指数阈值已经超过,这意味着用户之前播放过有声视频。
51
+          ③用户已经将网站添加到移动设备上的主屏幕或允在桌面上安装了PWA。
52
+        3.顶部帧可以将自动播放权限委派给其iframe,来允许自动播放声音
53
+        
54
+        媒体参与度(Media Engagement)是指用户与媒体内容进行互动的程度,可以通过多个指标来衡量。这些指标主要包括观看时间、观看率、转化率、交互行为等。
55
+        可以通过:chrome://media-engagement/ 查看
56
+     */
57
+    const video = document.querySelector('.videoBoxViem');
58
+    console.log(video.play());
59
+
60
+    const model = document.querySelector('.model')
61
+    const btn = document.querySelector('button')
62
+    // 第一种方法 引导用户去与页面交互实现播放
63
+    async function play() {
64
+      try {
65
+        await video.play();
66
+        //使用await的原因是因为video.play()方法返回的是一个Promise,所以在这里我们可以对他进行一些处理
67
+        // model.style.display = 'none';
68
+        btn.removeEventListener('click', play);
69
+        // 如果他自动播放了就隐藏按钮,消除点击事件
70
+      } catch (err) {
71
+        // model.style.display = 'block';
72
+        btn.addEventListener('click', play);
73
+        // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
74
+      }
75
+    }
76
+    play();
77
+
78
+    //第二种方法比较主流,类似的有网页版抖音以及B站
79
+    function play() {
80
+      video.muted = true;//设置视频为静音
81
+      video.play();//调用播放方法
82
+      const ctx = new AudioContext();
83
+      const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
84
+      // 如果是不能播放我们就执行下面的逻辑,其实就是类似于第一种方法,让用户与其交互
85
+      ctx.close();
86
+      if (canAutoPlay) {
87
+        video.muted = false;
88
+        model.style.display = 'none';
89
+        btn.removeEventListener('click', play);
90
+      }
91
+      else {
92
+        model.style.display = 'block';
93
+        btn.addEventListener('click', play);
94
+      }
95
+    }
96
+    play()
97
+
98
+  }
99
+
100
+  render() {
101
+    const { changGif } = this.state;
102
+    return (
103
+      <div class="video_box_hide sial_video animate__animated animate__fadeOut animate__delay-2s animate__slower">
104
+        <div className="alls">
105
+          <video src={require("@assets/imgs/dataVimg/sial_video1.mp4").default} autoplay="autoplay" class="videoBoxViem"></video>
106
+        </div>
107
+
108
+      </div>
109
+    )
110
+  }
111
+}
112
+export default MapView;

+ 243 - 0
src/pages/sial/component/moodProductionView.jsx

@@ -0,0 +1,243 @@
1
+/*
2
+ * @Author: dayan_hjm 月度产量/发货量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-11-08 15:24:45
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class MoodSendView extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      budgetSalesQty: [],
26
+      year: [],
27
+      budgetProdQty: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+
35
+  async getUrl() {
36
+    await twoService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], budgetSalesQty = [], budgetProdQty = [];
39
+        data.map((x, i) => {
40
+          year.push(x.bMonth);
41
+          budgetSalesQty.push(x.budgetSalesQty || 0)
42
+          budgetProdQty.push(x.budgetProdQty || 0)
43
+        });
44
+        this.setState({ year, budgetProdQty, budgetSalesQty });
45
+        this.setData();
46
+      }
47
+    });
48
+
49
+  }
50
+
51
+
52
+  setData() {
53
+    setTimeout(() => {
54
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
55
+      var yMax = 500;
56
+      var dataShadow = [];
57
+      for (var i = 0; i < data.length; i++) {
58
+        dataShadow.push(yMax);
59
+      }
60
+      var option = {
61
+        grid: {
62
+          left: '2%',
63
+          top: '18%',
64
+          right: '0%',
65
+          bottom: '8%',
66
+          containLabel: true
67
+        },
68
+
69
+        tooltip: {
70
+          trigger: 'axis',
71
+          axisPointer: {
72
+            type: 'shadow'
73
+          },
74
+          borderColor: "rgba(105, 255, 222, 0.5)",
75
+          borderWidth: 2,
76
+          padding: 5,
77
+          textStyle: {
78
+            fontSize: 10,
79
+            color: "#ededed"
80
+          },
81
+          backgroundColor: "#0000008a"
82
+        },
83
+        legend: {
84
+          data: ['计划产量', '实际产量'],
85
+          fontFamily: 'DingTalkJinBuTi',
86
+          padding: [25, 0, 0, 10],
87
+          textStyle: {
88
+            color: "#fff"
89
+          },
90
+          itemWidth: 11,
91
+          itemHeight: 11,
92
+        },
93
+        // toolbox: {
94
+        //   show: true,
95
+        //   orient: 'vertical',
96
+        //   left: 'right',
97
+        //   top: 'center',
98
+        //   feature: {
99
+        //     mark: { show: true },
100
+        //     dataView: { show: true, readOnly: false },
101
+        //     magicType: { show: true, type: ['line', 'bar', 'stack'] },
102
+        //     restore: { show: true },
103
+        //     saveAsImage: { show: true }
104
+        //   }
105
+        // },
106
+        //   xAxis: {
107
+        //     data: dataAxis,
108
+        //     axisTick: {
109
+        //       show: false,
110
+        //     },
111
+        //     axisLine: {
112
+        //       show: true,
113
+        //       symbol: ['none', 'arrow'],
114
+        //       symbolOffset: 12,
115
+        //       lineStyle: {
116
+        //         color: '#fff',
117
+        //       }
118
+        //     },
119
+        //     z: 10
120
+        //   },
121
+
122
+        xAxis: [
123
+          {
124
+            type: 'category',
125
+            axisTick: { show: false },
126
+            data: this.state.year,
127
+            axisLabel: {
128
+              /*inside: true,*/
129
+              color: "rgba(255,255,255,.6)",
130
+              interval: 0,
131
+              textStyle: {
132
+                color: '#7d7d7d',
133
+                fontSize: 10
134
+
135
+              },
136
+            },
137
+            axisLine: {
138
+              lineStyle: {
139
+                color: 'rgba(255,255,255,.1)',
140
+                type: 'dashed',
141
+              }
142
+            },
143
+            splitLine: {
144
+              show: true,
145
+              lineStyle: {
146
+                color: '#3b3b3b',
147
+                type: 'dashed',
148
+              }
149
+            }
150
+          }
151
+        ],
152
+        yAxis: [
153
+          {
154
+            type: 'value',
155
+            axisLine: {
156
+              lineStyle: {
157
+                color: '#7d7d7d',
158
+                type: 'dashed',
159
+              },
160
+            },
161
+            axisTick: { show: false },
162
+            axisLabel: {
163
+              formatter: "{value}吨",
164
+              textStyle: {
165
+                color: '#7d7d7d',
166
+                fontSize: 12
167
+              }
168
+            },
169
+            splitLine: {
170
+              show: true,
171
+              lineStyle: {
172
+                color: '#3b3b3b',
173
+                type: 'dashed',
174
+
175
+              }
176
+            }
177
+          }
178
+        ],
179
+        series: [
180
+          {
181
+            name: '计划产量',
182
+            type: 'bar',
183
+            animation: true,
184
+            animationDuration: 3000,
185
+            "smooth": true,
186
+
187
+            emphasis: {
188
+              focus: 'series'
189
+            },
190
+            barWidth: 10,
191
+
192
+            itemStyle: {
193
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
194
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
195
+                { offset: 0.7, color: 'rgba(255, 206, 0, 1)' },
196
+                { offset: 1, color: 'rgba(255, 206, 0, 0.3)' },
197
+              ])
198
+            },
199
+
200
+            data: this.state.budgetSalesQty
201
+          },
202
+          {
203
+            name: '实际产量',
204
+            type: 'bar',
205
+            animation: true,
206
+            animationDuration: 3000,
207
+            "smooth": true,
208
+
209
+            barGap: 0,
210
+            barWidth: 10,
211
+            emphasis: {
212
+              focus: 'series'
213
+            },
214
+            itemStyle: {
215
+              labelLine: {
216
+                show: false
217
+              },
218
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
219
+                { offset: 0, color: 'rgba(105, 255, 222, 1)' },
220
+                { offset: 0.7, color: 'rgba(105, 255, 222, 1)' },
221
+                { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
222
+              ])
223
+            },
224
+            data: this.state.budgetProdQty
225
+          }
226
+        ]
227
+      }
228
+      var myChart = echarts.init(document.getElementById('chartProduct'));
229
+      // 使用刚指定的配置项和数据显示图表。
230
+      myChart.setOption(option);
231
+    }, 3000)
232
+  }
233
+
234
+  render() {
235
+
236
+    return (
237
+      <div className={["eacharView cbMoodSendView"]}>
238
+        <div id="chartProduct"></div>
239
+      </div>
240
+    )
241
+  }
242
+}
243
+export default MoodSendView;

+ 243 - 0
src/pages/sial/component/moodSendView.jsx

@@ -0,0 +1,243 @@
1
+/*
2
+ * @Author: dayan_hjm 月度产量/发货量
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-11-08 15:24:45
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class MoodSendView extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      proQty: [],
26
+      year: [],
27
+      deliveryQty: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+
35
+  async getUrl() {
36
+    await twoService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], proQty = [], deliveryQty = [];
39
+        data.map((x, i) => {
40
+          year.push(x.bMonth);
41
+          proQty.push(x.proQty)
42
+          deliveryQty.push(x.deliveryQty)
43
+        });
44
+        this.setState({ year, deliveryQty, proQty });
45
+        this.setData();
46
+      }
47
+    });
48
+
49
+  }
50
+
51
+
52
+  setData() {
53
+    setTimeout(() => {
54
+      var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149, 210, 122, 200];
55
+      var yMax = 500;
56
+      var dataShadow = [];
57
+      for (var i = 0; i < data.length; i++) {
58
+        dataShadow.push(yMax);
59
+      }
60
+      var option = {
61
+        grid: {
62
+          left: '2%',
63
+          top: '18%',
64
+          right: '0%',
65
+          bottom: '8%',
66
+          containLabel: true
67
+        },
68
+
69
+        tooltip: {
70
+          trigger: 'axis',
71
+          axisPointer: {
72
+            type: 'shadow'
73
+          },
74
+          borderColor: "rgba(105, 255, 222, 0.5)",
75
+          borderWidth: 2,
76
+          padding: 5,
77
+          textStyle: {
78
+            fontSize: 10,
79
+            color: "#ededed"
80
+          },
81
+          backgroundColor: "#0000008a"
82
+        },
83
+        legend: {
84
+          data: ['计划销售', '实际发货量'],
85
+          fontFamily: 'DingTalkJinBuTi',
86
+          padding: [25, 0, 0, 10],
87
+          textStyle: {
88
+            color: "#fff"
89
+          },
90
+          itemWidth: 11,
91
+          itemHeight: 11,
92
+        },
93
+        // toolbox: {
94
+        //   show: true,
95
+        //   orient: 'vertical',
96
+        //   left: 'right',
97
+        //   top: 'center',
98
+        //   feature: {
99
+        //     mark: { show: true },
100
+        //     dataView: { show: true, readOnly: false },
101
+        //     magicType: { show: true, type: ['line', 'bar', 'stack'] },
102
+        //     restore: { show: true },
103
+        //     saveAsImage: { show: true }
104
+        //   }
105
+        // },
106
+        //   xAxis: {
107
+        //     data: dataAxis,
108
+        //     axisTick: {
109
+        //       show: false,
110
+        //     },
111
+        //     axisLine: {
112
+        //       show: true,
113
+        //       symbol: ['none', 'arrow'],
114
+        //       symbolOffset: 12,
115
+        //       lineStyle: {
116
+        //         color: '#fff',
117
+        //       }
118
+        //     },
119
+        //     z: 10
120
+        //   },
121
+
122
+        xAxis: [
123
+          {
124
+            type: 'category',
125
+            axisTick: { show: false },
126
+            data: this.state.year,
127
+            axisLabel: {
128
+              /*inside: true,*/
129
+              color: "rgba(255,255,255,.6)",
130
+              interval: 0,
131
+              textStyle: {
132
+                color: '#7d7d7d',
133
+                fontSize: 10
134
+
135
+              },
136
+            },
137
+            axisLine: {
138
+              lineStyle: {
139
+                color: 'rgba(255,255,255,.1)',
140
+                type: 'dashed',
141
+              }
142
+            },
143
+            splitLine: {
144
+              show: true,
145
+              lineStyle: {
146
+                color: '#3b3b3b',
147
+                type: 'dashed',
148
+              }
149
+            }
150
+          }
151
+        ],
152
+        yAxis: [
153
+          {
154
+            type: 'value',
155
+            axisLine: {
156
+              lineStyle: {
157
+                color: '#7d7d7d',
158
+                type: 'dashed',
159
+              },
160
+            },
161
+            axisTick: { show: false },
162
+            axisLabel: {
163
+              formatter: "{value}吨",
164
+              textStyle: {
165
+                color: '#7d7d7d',
166
+                fontSize: 12
167
+              }
168
+            },
169
+            splitLine: {
170
+              show: true,
171
+              lineStyle: {
172
+                color: '#3b3b3b',
173
+                type: 'dashed',
174
+
175
+              }
176
+            }
177
+          }
178
+        ],
179
+        series: [
180
+          {
181
+            name: '计划销售',
182
+            type: 'bar',
183
+            animation: true,
184
+            animationDuration: 3000,
185
+            "smooth": true,
186
+
187
+            emphasis: {
188
+              focus: 'series'
189
+            },
190
+            barWidth: 10,
191
+
192
+            itemStyle: {
193
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
194
+                { offset: 0, color: 'rgba(255, 206, 0, 1)' },
195
+                { offset: 0.7, color: 'rgba(255, 206, 0, 1)' },
196
+                { offset: 1, color: 'rgba(255, 206, 0, 0.3)' },
197
+              ])
198
+            },
199
+
200
+            data: this.state.proQty
201
+          },
202
+          {
203
+            name: '实际发货量',
204
+            type: 'bar',
205
+            animation: true,
206
+            animationDuration: 3000,
207
+            "smooth": true,
208
+
209
+            barGap: 0,
210
+            barWidth: 10,
211
+            emphasis: {
212
+              focus: 'series'
213
+            },
214
+            itemStyle: {
215
+              labelLine: {
216
+                show: false
217
+              },
218
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
219
+                { offset: 0, color: 'rgba(105, 255, 222, 1)' },
220
+                { offset: 0.7, color: 'rgba(105, 255, 222, 1)' },
221
+                { offset: 1, color: 'rgba(105, 255, 222, 0.3)' },
222
+              ])
223
+            },
224
+            data: this.state.deliveryQty
225
+          }
226
+        ]
227
+      }
228
+      var myChart = echarts.init(document.getElementById('chartSend'));
229
+      // 使用刚指定的配置项和数据显示图表。
230
+      myChart.setOption(option);
231
+    }, 3000)
232
+  }
233
+
234
+  render() {
235
+
236
+    return (
237
+      <div className={["eacharView cbMoodSendView"]}>
238
+        <div id="chartSend"></div>
239
+      </div>
240
+    )
241
+  }
242
+}
243
+export default MoodSendView;

+ 214 - 0
src/pages/sial/component/oneQualified.jsx

@@ -0,0 +1,214 @@
1
+/*
2
+ * @Author: dayan_hjm 一次合格率
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2023-12-19 16:02:23
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+import {
14
+  twoService,
15
+} from "../api";
16
+
17
+@withRouter
18
+
19
+class BottomLineForSend extends Component {
20
+  // 构造函数,组件的实例创建时,最先执行
21
+  constructor(props, context) {
22
+    super(props, context);
23
+    this.store = mod;
24
+    this.state = {
25
+      targeRate: [],
26
+      year: [],
27
+      qcRate: [],
28
+    };
29
+  }
30
+
31
+  componentDidMount() {
32
+    this.getUrl()
33
+  }
34
+
35
+  async getUrl() {
36
+    await twoService().then(({ data = [], resultCode }) => {
37
+      if (+resultCode === 0) {
38
+        let year = [], qcRate = [], targeRate = [];
39
+        data.map((x, i) => {
40
+          year.push(x.bMonth);
41
+          qcRate.push(x.qcRate)
42
+          targeRate.push(x.targeRate)
43
+        });
44
+        this.setState({ year, targeRate, qcRate });
45
+        this.setData();
46
+      }
47
+    });
48
+  }
49
+  roundFun(value = 0) {
50
+    value = value * 100;
51
+    var str = parseFloat(value).toFixed(10);
52
+    var num = str.substring(0, str.lastIndexOf('.') + 3);
53
+    return num
54
+  }
55
+
56
+
57
+  setData() {
58
+    setTimeout(() => {
59
+      // 基于准备好的dom,初始化echarts实例
60
+      var myChart = echarts.init(document.getElementById('echarts5'));
61
+
62
+      var option = {
63
+        tooltip: {
64
+          trigger: 'axis',
65
+          axisPointer: { type: 'shadow' },
66
+          borderColor: "rgba(105, 255, 222, 0.5)",
67
+          borderWidth: 2,
68
+          padding: 2,
69
+          textStyle: {
70
+            fontSize: 12,
71
+            color: "#ededed"
72
+          },
73
+          formatter: (param) => {
74
+            return (param[0] && param[0].seriesName ? param[0].seriesName + ":" : "") + (param[0] && param[0].value ? this.roundFun(param[0].value) + "%<br />" : "") + (param[1] && param[1].seriesName ? param[1].seriesName + ":" : "") + (param[1] && param[1].value ? this.roundFun(param[1].value) + "%" : "")
75
+            // return (
76
+            //   <div>
77
+            //     <p>
78
+            //       <span>{param[0] && param[0].seriesName ? param[0].seriesName + ":" : ""}</span>
79
+            //       <span>{param[0] && param[0].value ? param[0].value.toFixed(2) + "%<br />" : ""}</span>
80
+            //     </p>
81
+            //     <p>
82
+            //       <span>{param[1] && param[1].seriesName ? param[1].seriesName + ":" : ""}</span>
83
+            //       <span>{param[1] && param[1].value ? param[1].value.toFixed(2) + "%" : ""}</span>
84
+            //     </p>
85
+            //   </div>
86
+            // )
87
+          },
88
+          //  `{a0}: {c0}<br />{a1}: {c1}`,
89
+          backgroundColor: "#0000008a"
90
+        }, "grid": {
91
+          "top": "20%",
92
+          "right": "5%",
93
+          "bottom": "20",
94
+          "left": "10%",
95
+        },
96
+        legend: {
97
+          data: ['目标一次合格率', '实际一次合格率'],
98
+          right: 'center',
99
+          padding: [10, 0, 0, 5],
100
+          top: 0,
101
+          textStyle: {
102
+            color: "#fff",
103
+            fontSize: 10,
104
+          },
105
+          itemWidth: 12,
106
+          itemHeight: 5,
107
+        },
108
+        "xAxis": [
109
+          {
110
+            "type": "category",
111
+            data: this.state.year,
112
+            axisLine: { lineStyle: { color: "rgba(255,255,255,.1)" } },
113
+            axisLabel: {
114
+              textStyle: { color: "'#7d7d7d'", fontSize: '12', },
115
+            },
116
+            splitLine: {
117
+              show: true,
118
+              lineStyle: {
119
+                color: '#3b3b3b',
120
+                type: 'dashed',
121
+
122
+              }
123
+            }
124
+
125
+          },
126
+        ],
127
+        "yAxis": [
128
+          {
129
+            type: 'value',
130
+            axisLine: {
131
+              lineStyle: {
132
+                color: '#7d7d7d',
133
+                type: 'dashed',
134
+              },
135
+            },
136
+            min: 0.9,
137
+            max: 1,
138
+            splitNumber: 5,
139
+            axisTick: { show: false },
140
+            axisLabel: {
141
+              formatter: (value) => {
142
+                return value * 100 + '%'
143
+              },
144
+              textStyle: {
145
+                color: '#7d7d7d',
146
+                fontSize: 12
147
+              }
148
+            },
149
+            splitLine: {
150
+              show: true,
151
+              lineStyle: {
152
+                color: '#3b3b3b',
153
+                type: 'dashed',
154
+
155
+              }
156
+            }
157
+          },
158
+        ],
159
+        "series": [
160
+          {
161
+            "name": "目标一次合格率",
162
+            "type": "line",
163
+            data: this.state.targeRate,
164
+            lineStyle: {
165
+              normal: {
166
+                width: 2
167
+              },
168
+            },
169
+            "itemStyle": {
170
+              "normal": {
171
+                "color": "#69FFDE",
172
+
173
+              }
174
+            },
175
+            "smooth": true
176
+          },
177
+          {
178
+            "name": "实际一次合格率",
179
+            "type": "line",
180
+            data: this.state.qcRate,
181
+            lineStyle: {
182
+              normal: {
183
+                width: 2
184
+              },
185
+            },
186
+            "itemStyle": {
187
+              "normal": {
188
+                "color": "#FFCE00",
189
+
190
+              }
191
+            },
192
+            "smooth": true
193
+          }
194
+        ]
195
+      };
196
+      // 使用刚指定的配置项和数据显示图表。
197
+      myChart.setOption(option);
198
+      window.addEventListener("resize", function () {
199
+        myChart.resize();
200
+      });
201
+
202
+    }, 3000)
203
+  }
204
+
205
+  render() {
206
+
207
+    return (
208
+      <div className={["eacharView cbBottomLineForSend"]}>
209
+        <div id="echarts5"></div>
210
+      </div>
211
+    )
212
+  }
213
+}
214
+export default BottomLineForSend;

+ 311 - 0
src/pages/sial/component/rightBottomView.jsx

@@ -0,0 +1,311 @@
1
+/*
2
+ * @Author: dayan_hjm 碳排放
3
+ * @Date: 2023-10-23 09:32:12 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-10-22 15:17:20
6
+ */
7
+
8
+
9
+import React, { useState, useEffect, Component } from "react";
10
+import styles from "../style.less";
11
+import { useHistory, useLocation, withRouter } from "react-router-dom";
12
+import mod from '../mod';
13
+
14
+import { getArrMax } from "@utils/util";
15
+import {
16
+  dataengineCenterOneservice,
17
+} from "../api";
18
+import { get, } from "lodash";
19
+
20
+@withRouter
21
+
22
+class RightBottomView extends Component {
23
+  // 构造函数,组件的实例创建时,最先执行
24
+  constructor(props, context) {
25
+    super(props, context);
26
+    this.store = mod;
27
+    this.state = {
28
+      missionsTotal_arr:[],
29
+      year:[],
30
+      missionsIntensity_arr:[],
31
+      max1:0,
32
+      max2:0,
33
+    };
34
+  }
35
+
36
+  componentDidMount() {
37
+    this.getUrl()
38
+  }
39
+
40
+  async getUrl(){
41
+    await dataengineCenterOneservice().then(({ data=[], resultCode }) => {
42
+      if (+resultCode === 0) {
43
+        let year = [],missionsIntensity_arr = [],missionsTotal_arr = [],max1=[],max2=[],arr_1=[],arr_2=[];
44
+        data.map((x,i)=>{
45
+          year.unshift(x.byear)
46
+          missionsIntensity_arr.unshift(x.missionsIntensity);
47
+          arr_1.unshift(x.missionsIntensity);
48
+          missionsTotal_arr.unshift(x.missionsTotal);
49
+          arr_2.unshift(x.missionsTotal);
50
+        });
51
+        const max_1 = getArrMax(arr_1);
52
+        const max_2 = getArrMax(arr_2);
53
+        for (let index = 0; index < data.length; index++) {
54
+          max1.unshift(max_1/0.8)
55
+          max2.unshift(max_2/0.8)
56
+        }
57
+        this.setState({year,missionsIntensity_arr,missionsTotal_arr,max1,max2});
58
+          this.setData();
59
+          this.setData2();    
60
+      }
61
+    });
62
+
63
+  }
64
+
65
+  setData() {
66
+    setTimeout(() => {
67
+      // 基于准备好的dom,初始化echarts实例
68
+      var myChart = echarts.init(document.getElementById('echarts8'));
69
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
70
+      var option = {
71
+
72
+        grid: {
73
+          left: '16%',
74
+          top: '15%',
75
+          right: '5%',
76
+          bottom: '0%',
77
+          containLabel: true
78
+        },
79
+        xAxis: [{
80
+          show: false,
81
+        }],
82
+        yAxis: [{
83
+          axisTick: 'none',
84
+          axisLine: 'none',
85
+          axisLabel: {
86
+            padding:[0,22,0,0],
87
+            textStyle: {
88
+              color: '#69FFDE',
89
+              fontSize: '16',
90
+              fontWeight: 700,
91
+              fontFamily: 'DingTalkJinBuTi',
92
+            }
93
+          },
94
+          data: this.state.year
95
+
96
+        },
97
+        {
98
+          name: '单位:件',
99
+          nameGap: '50',
100
+          nameTextStyle: {
101
+            color: 'rgba(255,255,255,.6)',
102
+            fontSize: '16',
103
+          },
104
+          axisLine: {
105
+            lineStyle: {
106
+              color: 'rgba(0,0,0,0)'
107
+            }
108
+          },
109
+          data: [],
110
+        }],
111
+        legend: {
112
+          data: '碳排放强度',
113
+          // right: 'center',
114
+          // top: 0,
115
+          textStyle: {
116
+            color: "#fff",
117
+            fontSize: 12
118
+          },
119
+          itemWidth: 12,
120
+          itemHeight: 10,
121
+        },
122
+        series: [{
123
+          name: '条',
124
+          type: 'bar',
125
+          yAxisIndex: 0,
126
+          data: this.state.missionsTotal_arr,
127
+          label: {
128
+            normal: {
129
+              show: true,
130
+              position: 'insideLeft',
131
+              formatter: function (param) {
132
+                return param.value;
133
+              },
134
+              textStyle: {
135
+                color: 'rgba(255,255,255,1)',
136
+                fontSize: '15',
137
+                padding:[5,5,0,5]
138
+              }
139
+            }
140
+          },
141
+          barWidth: 24,
142
+          itemStyle: {
143
+            normal: {
144
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
145
+                { offset: 0, color: 'rgb(255 242 72)' },
146
+                { offset: 0.7, color: '#ffe06a99' },
147
+                { offset: 1, color: '#ffe06a99' },
148
+              ]),
149
+              barBorderRadius: 15,
150
+              borderColor: "rgb(255 242 72)",
151
+              borderWidth: 1
152
+
153
+            },
154
+          },
155
+          z: 2
156
+        }, {
157
+          name: '白框',
158
+          type: 'bar',
159
+          yAxisIndex: 1,
160
+          barGap: '-100%',
161
+          data: this.state.max2,
162
+          barWidth: 24,
163
+          itemStyle: {
164
+            normal: {
165
+              color: '#ffffff24',
166
+              barBorderRadius: 15,
167
+
168
+            }
169
+          },
170
+          z: 1
171
+        }]
172
+      };
173
+
174
+
175
+      // 使用刚指定的配置项和数据显示图表。
176
+      myChart.setOption(option);
177
+      window.addEventListener("resize", function () {
178
+        myChart.resize();
179
+      });
180
+    }, 3000)
181
+  }
182
+
183
+  setData2() {
184
+    setTimeout(() => {
185
+      // 基于准备好的dom,初始化echarts实例
186
+      var myChart = echarts.init(document.getElementById('echarts9'));
187
+      var myColor = ['#eb2100', '#eb3600', '#d0570e', '#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3'];
188
+      var option = {
189
+        grid: {
190
+          left: '0%',
191
+          top: '15%',
192
+          right: '5%',
193
+          bottom: '0%',
194
+          containLabel: true
195
+        },
196
+        xAxis: [{
197
+          show: false,
198
+          inverse: true,
199
+        }],
200
+        yAxis: [{
201
+          axisTick: 'none',
202
+          axisLine: 'none',
203
+          offset: '15',
204
+          axisLine: {
205
+            onZero: false
206
+          },
207
+          axisLabel: {
208
+            textStyle: {
209
+              color: 'rgba(255,255,255,.6)',
210
+              fontSize: '0',
211
+            }
212
+          },
213
+          data: ['字段1', '字段2', '字段3']
214
+
215
+        },
216
+        {
217
+          name: '单位:件',
218
+          nameGap: '50',
219
+          nameTextStyle: {
220
+            color: 'rgba(255,255,255,.6)',
221
+            fontSize: '16',
222
+          },
223
+          axisLine: {
224
+            lineStyle: {
225
+              color: 'rgba(0,0,0,0)'
226
+            }
227
+          },
228
+          data: [],
229
+        }],
230
+        series: [{
231
+          name: '条',
232
+          type: 'bar',
233
+          yAxisIndex: 0,
234
+          data: this.state.missionsIntensity_arr,
235
+          animation:true,
236
+          animationDuration:3000,
237
+          smooth: true,
238
+          label: {
239
+            normal: {
240
+              show: true,
241
+              position: 'insideRight',
242
+              formatter: function (param) {
243
+                return param.value;
244
+              },
245
+              textStyle: {
246
+                color: 'rgba(255,255,255,1)',
247
+                fontSize: '15',
248
+                padding:[5,5,0,5]
249
+              }
250
+            }
251
+          },
252
+          barWidth: 23,
253
+          itemStyle: {
254
+            normal: {
255
+              color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [
256
+                { offset: 1, color: '#69FFDE' },
257
+                { offset: 0.75, color: '#69FFDE' },
258
+                { offset: 0, color: 'rgb(83 211 183 / 15%)' },
259
+              ]),
260
+              barBorderRadius: 15,
261
+              borderColor: "#69FFDE",
262
+              borderWidth: 1
263
+            }
264
+          },
265
+          z: 2
266
+        }, {
267
+          name: '白框',
268
+          type: 'bar',
269
+          yAxisIndex: 1,
270
+          barGap: '-100%',
271
+          data: this.state.max1,
272
+          animation:true,
273
+          animationDuration:3000,
274
+          smooth: true,
275
+          barWidth: 23,
276
+          itemStyle: {
277
+            normal: {
278
+              color: '#ffffff24',
279
+              barBorderRadius: 15,
280
+            }
281
+          },
282
+          z: 1
283
+        }]
284
+      };
285
+
286
+
287
+      // 使用刚指定的配置项和数据显示图表。
288
+      myChart.setOption(option);
289
+      window.addEventListener("resize", function () {
290
+        myChart.resize();
291
+      });
292
+
293
+    }, 3000)
294
+  }
295
+
296
+  render() {
297
+
298
+    return (
299
+      <div className={["eacharView cbRightBottomView"]}>
300
+        <span className="right_b_tip1">碳排放强度</span>
301
+        <div id="echarts9"></div>
302
+        {/* <div className="fonts">
303
+
304
+        </div> */}
305
+        <span className="right_b_tip2">碳排放总量/万吨</span>
306
+        <div id="echarts8"></div>
307
+      </div>
308
+    )
309
+  }
310
+}
311
+export default RightBottomView;

+ 11 - 0
src/pages/sial/index.jsx

@@ -0,0 +1,11 @@
1
+import React from 'react';
2
+
3
+function TqcDataVHomeCopy() {
4
+  return (
5
+    <div>
6
+      TqcDataVHomeCopy
7
+    </div>
8
+  );
9
+}
10
+
11
+export default TqcDataVHomeCopy;

+ 72 - 0
src/pages/sial/mod.js

@@ -0,0 +1,72 @@
1
+/*
2
+ * @Author: dayan_hjm 
3
+ * @Date: 2022-10-27 11:11:30 
4
+ * @Last modified by:   dayan_hjm 
5
+ * @Last modified time: 2022-10-27 11:11:30 
6
+ */
7
+
8
+// 状态管理方法
9
+import { observable, action, configure, makeObservable, runInAction } from 'mobx';
10
+// 工具方法
11
+import { cloneDeep, get, groupBy, isEmpty, orderBy, pick, values } from "lodash";
12
+
13
+import { message } from 'antd';
14
+
15
+// 默认状态
16
+const defaultState = {
17
+  totalValue:0,
18
+  yearDecline:0,
19
+  yearSend:0,
20
+  productInventory:0,
21
+  list:[{name:'营运数据大屏'},{name:'经营大盘'},{name:'到家专题'},{name:'门店大盘'},{name:'自助跑数SQL平台'},{name:'月度包材预警跑数模板'}],
22
+  rightlist:[],
23
+  bumen:'数字化中心/数据工程部',
24
+  gw:'数据产品经理',
25
+}
26
+
27
+// 严格模式
28
+configure({
29
+  enforceActions: 'observed'
30
+});
31
+
32
+
33
+/**
34
+ * mod层 - 业务逻辑,数据逻辑应该存储于此
35
+ */
36
+class Mod {
37
+  constructor() {
38
+    makeObservable(this);
39
+  }
40
+  // 监视状态
41
+  @observable state = cloneDeep(defaultState);
42
+
43
+  @action saveState = async (payload) => {
44
+    runInAction(() => {
45
+      this.state = {
46
+        ...this.state,
47
+        ...payload
48
+      };
49
+    });
50
+  };
51
+
52
+
53
+  // 新增/编辑运营商
54
+  // @action customerOperatorsmod = async (par, type) => {
55
+  //   try {
56
+  //     const { data, resultCode, resultMsg } = await Serv.customerOperatorsServ(par, type);
57
+  //     if (resultCode + '' === '0') {
58
+  //       runInAction(() => {
59
+  //         message.success('操作成功!')
60
+  //         this.state.addEditVisiable = false;
61
+  //         this.state.version = Math.random()
62
+  //       });
63
+  //     }
64
+  //   } catch (e) {
65
+  //     console.log('e: ', e);
66
+  //   }
67
+  // }
68
+}
69
+
70
+// 将组件实例化,这意味着组件将不能从别处实例化
71
+const mod = new Mod();
72
+export default mod;

+ 634 - 0
src/pages/sial/style.less

@@ -0,0 +1,634 @@
1
+@import url("../../themes/themes.less");
2
+
3
+@assetUrl: "../../assets/imgs/home";
4
+
5
+.sial_home {
6
+  position: relative;
7
+  left: 0;
8
+  top: 0;
9
+  width: 100%;
10
+  height: 100%;
11
+  overflow: hidden;
12
+  overflow-x: hidden;
13
+  background: url(../../assets/imgs/dataVimg/sialBgDataV.png) no-repeat 0 -10em / 100% 120% #041b40 !important;
14
+
15
+  :global(.rightJ_png) {
16
+    position: absolute;
17
+    z-index: 99;
18
+    width: 2em;
19
+    right: 0.8em;
20
+    top: 44%;
21
+    opacity: .5;
22
+  }
23
+
24
+  :global(.rightJ_png_L) {
25
+    right: unset;
26
+    left: 0.8em;
27
+  }
28
+
29
+
30
+
31
+  :global(.sial_video) {
32
+    position: absolute;
33
+    left: 0;
34
+    top: 0;
35
+    width: 98.5%;
36
+    // background: url(../imgs/dataVimg/homeBgDataV.png) no-repeat 0 -10em / 108% 120% #041b40;
37
+    height: 100%;
38
+    display: flex;
39
+    align-items: center;
40
+    justify-content: center;
41
+    flex-wrap: wrap;
42
+    pointer-events: none;
43
+    z-index: 12;
44
+
45
+    video {
46
+      width: 45%;
47
+      // height: 45%;
48
+      margin-top: -14%;
49
+      // padding: 1% 0 0 10%;
50
+    }
51
+
52
+    img {
53
+      width: 100%;
54
+      height: unset;
55
+      padding: 0;
56
+    }
57
+
58
+
59
+    :global(.alls) {
60
+      width: 80%;
61
+      height: unset;
62
+      padding: 1% 0 0 0;
63
+      margin: 0 auto;
64
+      position: relative;
65
+      box-sizing: border-box;
66
+      z-index: 1;
67
+      overflow: visible;
68
+      display: flex;
69
+      justify-content: center;
70
+    }
71
+
72
+    // 允许热点层接收 hover;片头层(.video_box_hide)继续禁用交互
73
+    &:not(.video_box_hide) :global(.alls) {
74
+      pointer-events: auto;
75
+    }
76
+
77
+    &.video_box_hide,
78
+    &.video_box_hide * {
79
+      pointer-events: none !important;
80
+    }
81
+
82
+    @media (min-height: 700px) {
83
+      :global(.alls) {
84
+        width: 60%;
85
+      }
86
+    }
87
+
88
+    @media (min-height: 800px) {
89
+      :global(.alls) {
90
+        width: 70%;
91
+      }
92
+    }
93
+
94
+    @media (min-height: 900px) {
95
+      :global(.alls) {
96
+        width: 75%;
97
+      }
98
+    }
99
+
100
+    @media (min-height: 1000px) {
101
+      :global(.alls) {
102
+        width: 80%;
103
+      }
104
+    }
105
+
106
+  }
107
+
108
+
109
+  .bg_after {
110
+    content: "";
111
+    display: block;
112
+    bottom: 0;
113
+    position: absolute;
114
+    width: 100%;
115
+    height: 10px;
116
+  }
117
+
118
+
119
+
120
+  .home {
121
+    position: relative;
122
+    overflow: hidden;
123
+
124
+    .insert {
125
+      position: absolute;
126
+      z-index: 4;
127
+      width: 100%;
128
+      left: 0;
129
+      top: 0;
130
+      height: 100vh;
131
+      padding: 16px;
132
+
133
+      .user {
134
+        background: #fff;
135
+        border-radius: 6px;
136
+        padding: 12px;
137
+        text-align: left;
138
+        margin-bottom: 12px;
139
+        font-size: 12px;
140
+      }
141
+
142
+      .notice {
143
+        background: #fff;
144
+        border-radius: 6px;
145
+        padding: 12px;
146
+        text-align: left;
147
+        font-size: 12px;
148
+        margin-bottom: 12px;
149
+
150
+        &>*:not(:first-child) {
151
+          margin-top: 8px;
152
+        }
153
+      }
154
+
155
+      .documents {
156
+        background: #fff;
157
+        border-radius: 6px;
158
+        padding: 12px;
159
+        text-align: left;
160
+        font-size: 12px;
161
+
162
+        &>*:not(:first-child) {
163
+          margin-top: 8px;
164
+        }
165
+      }
166
+    }
167
+
168
+
169
+    :global {
170
+      // background: url(../../../public/bg_home.png) 50% 50% no-repeat;
171
+      //background-color: #041747;
172
+      background-size: cover;
173
+      text-align: center;
174
+      //padding: 0 33px 113px 33px;
175
+      height: 100%;
176
+
177
+
178
+      .titles {
179
+        padding-top: 52px;
180
+        display: inline-block;
181
+
182
+        .big_title {
183
+          font-size: 40px;
184
+          color: #ffffff;
185
+          letter-spacing: 5px;
186
+          text-align: center;
187
+          font-weight: bold;
188
+        }
189
+
190
+        .sub_title {
191
+          margin-top: 15px;
192
+          display: flex;
193
+          justify-content: space-between;
194
+          position: relative;
195
+          width: 100%;
196
+          opacity: 0.4;
197
+          font-family: PingFangSC-Regular;
198
+          font-size: 20px;
199
+          color: #ffffff;
200
+          letter-spacing: 0.7px;
201
+
202
+          &::after,
203
+          &::before {
204
+            height: 1px;
205
+            width: 37px;
206
+            position: absolute;
207
+            top: 50%;
208
+            content: "";
209
+            display: block;
210
+          }
211
+
212
+          &::after {
213
+            background-image: linear-gradient(90deg,
214
+                rgba(255, 255, 255, 0.3) 0%,
215
+                rgba(255, 255, 255, 1) 100%);
216
+            left: -46px;
217
+          }
218
+
219
+          &::before {
220
+            background-image: linear-gradient(90deg,
221
+                rgba(255, 255, 255, 1) 0%,
222
+                rgba(255, 255, 255, 0.3) 100%);
223
+            right: -46px;
224
+          }
225
+        }
226
+      }
227
+
228
+      .player {
229
+        margin-top: 54px;
230
+        display: flex;
231
+        justify-content: space-between;
232
+
233
+        &>li {
234
+          position: relative;
235
+          cursor: pointer;
236
+          text-align: center;
237
+          width: 1%;
238
+          flex-grow: 1;
239
+          transition: all 0.3s;
240
+
241
+          &:not(:last-child) {
242
+            margin-right: 1%;
243
+          }
244
+
245
+          .not_open_card {
246
+            display: none;
247
+          }
248
+
249
+          &.toggle_stat {
250
+            .nor_card {
251
+              display: block;
252
+            }
253
+
254
+            &:hover>.nor_card {
255
+              display: none;
256
+            }
257
+
258
+            &:hover>.not_open_card {
259
+              display: block;
260
+            }
261
+
262
+            .tips {
263
+              text-align: center;
264
+              font-size: 16px;
265
+              color: rgba(255, 255, 255, 0.5);
266
+              margin-top: -5px;
267
+            }
268
+
269
+            .tips_img {
270
+              width: 60%;
271
+              margin-top: 30%;
272
+            }
273
+          }
274
+        }
275
+      }
276
+
277
+      .bg_1 {
278
+        background: rgba(69, 163, 109, 0.3);
279
+        border: none;
280
+
281
+        &:hover {
282
+          background: rgba(69, 163, 109, 0.5);
283
+          transform: translateY(-30px);
284
+          box-shadow: 0 0 0 1px #45a36d inset;
285
+          background-image: radial-gradient(120px 60px ellipse at 50% 100%,
286
+              rgba(42, 186, 128, 0.8) 0%,
287
+              rgba(42, 186, 128, 0) 90%,
288
+              transparent 0);
289
+
290
+          &::after {
291
+            content: "";
292
+            display: block;
293
+            bottom: -5px;
294
+            position: absolute;
295
+            width: 100%;
296
+            height: 10px;
297
+            background: url("@{assetUrl}/bg_light1.png") 50% 50% no-repeat;
298
+          }
299
+        }
300
+      }
301
+
302
+      .bg_2 {
303
+        background: rgba(38, 149, 140, 0.3);
304
+        border: none;
305
+
306
+        &:hover {
307
+          background: rgba(38, 149, 140, 0.5);
308
+          transform: translateY(-30px);
309
+          box-shadow: 0 0 0 1px #26958c inset;
310
+          background-image: radial-gradient(120px 60px ellipse at 50% 100%,
311
+              rgba(0, 199, 207, 0.8) 0%,
312
+              rgba(0, 199, 207, 0) 90%,
313
+              transparent 0);
314
+
315
+          &::after {
316
+            content: "";
317
+            display: block;
318
+            bottom: -5px;
319
+            position: absolute;
320
+            width: 100%;
321
+            height: 10px;
322
+            background: url("@{assetUrl}/bg_light2.png") 50% 50% no-repeat;
323
+          }
324
+        }
325
+      }
326
+
327
+      .bg_3 {
328
+        background: rgba(122, 89, 202, 0.3);
329
+        border: none;
330
+
331
+        &:hover {
332
+          background: rgba(122, 89, 202, 0.5);
333
+          transform: translateY(-30px);
334
+          box-shadow: 0 0 0 1px #a27cff inset;
335
+          background-image: radial-gradient(120px 60px ellipse at 50% 100%,
336
+              rgba(181, 151, 255, 0.8) 0%,
337
+              rgba(181, 151, 255, 0) 90%,
338
+              transparent 0);
339
+
340
+          &::after {
341
+            content: "";
342
+            display: block;
343
+            bottom: -5px;
344
+            position: absolute;
345
+            width: 100%;
346
+            height: 10px;
347
+            background: url("@{assetUrl}/bg_light3.png") 50% 50% no-repeat;
348
+          }
349
+        }
350
+      }
351
+
352
+      .bg_4 {
353
+        background: rgba(37, 90, 199, 0.3);
354
+        border: none;
355
+
356
+        &:hover {
357
+          background: rgba(37, 90, 199, 0.5);
358
+          transform: translateY(-30px);
359
+          box-shadow: 0 0 0 1px #6899ff inset;
360
+          background-image: radial-gradient(120px 60px ellipse at 50% 100%,
361
+              rgba(73, 181, 255, 0.8) 0%,
362
+              rgba(73, 181, 255, 0) 90%,
363
+              transparent 0);
364
+
365
+          &::after {
366
+            content: "";
367
+            display: block;
368
+            bottom: -5px;
369
+            position: absolute;
370
+            width: 100%;
371
+            height: 10px;
372
+            background: url("@{assetUrl}/bg_light4.png") 50% 50% no-repeat;
373
+          }
374
+        }
375
+      }
376
+
377
+      .bg_5 {
378
+        background: rgba(6, 159, 199, 0.3);
379
+        border: none;
380
+
381
+        &:hover {
382
+          background: rgba(6, 159, 199, 0.5);
383
+          transform: translateY(-30px);
384
+          box-shadow: 0 0 0 1px #41bad9 inset;
385
+          background-image: radial-gradient(120px 60px ellipse at 50% 100%,
386
+              rgba(58, 223, 255, 0.8) 0%,
387
+              rgba(58, 223, 255, 0) 90%,
388
+              transparent 0);
389
+
390
+          &::after {
391
+            content: "";
392
+            display: block;
393
+            bottom: -5px;
394
+            position: absolute;
395
+            width: 100%;
396
+            height: 10px;
397
+            background: url("@{assetUrl}/bg_light5.png") 50% 50% no-repeat;
398
+          }
399
+        }
400
+      }
401
+
402
+      .type_1 {
403
+        padding: 82px 0 75px 0;
404
+
405
+        .card_subtitle {
406
+          font-size: 14px;
407
+          color: #fff;
408
+          margin-top: 48px;
409
+          margin-bottom: 48px;
410
+        }
411
+      }
412
+
413
+      .type_2 {
414
+        padding: 42px 0 65px 0;
415
+      }
416
+
417
+      .card_title {
418
+        font-size: 20px;
419
+        color: #ffffff;
420
+        font-weight: bold;
421
+        position: absolute;
422
+        bottom: 7%;
423
+        width: 100%;
424
+        text-align: center;
425
+      }
426
+
427
+      .text {
428
+        text-align: left;
429
+        display: flex;
430
+        justify-content: center;
431
+      }
432
+
433
+      .type1_sub {
434
+        font-size: 12px;
435
+        color: rgba(255, 255, 255, 0.7);
436
+      }
437
+
438
+      .type1_left {
439
+        font-size: 12px;
440
+        color: rgba(255, 255, 255, 0.7);
441
+        text-align: left;
442
+      }
443
+
444
+      .col_fff {
445
+        color: #ffffff;
446
+      }
447
+
448
+      .col_gray {
449
+        color: rgba(255, 255, 255, 0.7);
450
+      }
451
+
452
+      .fs12 {
453
+        font-size: 12px;
454
+      }
455
+
456
+      .fs14 {
457
+        font-size: 14px;
458
+      }
459
+
460
+      .mt4 {
461
+        margin-top: 4px;
462
+      }
463
+
464
+      .mt50 {
465
+        margin-top: 90px;
466
+      }
467
+
468
+      .linear {
469
+        width: 100%;
470
+        height: 1px;
471
+        background: linear-gradient(90deg,
472
+            rgba(2, 199, 218, 0) 0%,
473
+            rgba(2, 199, 218, 0.5) 50%,
474
+            rgba(2, 199, 218, 0) 100%);
475
+        transform-origin: center;
476
+        transform: rotate(-45deg);
477
+        margin-top: 60px;
478
+        margin-bottom: 15px;
479
+      }
480
+
481
+      .min_w {
482
+        min-width: 40%;
483
+      }
484
+    }
485
+  }
486
+
487
+  .add_common_report {
488
+    display: flex;
489
+    align-items: center;
490
+
491
+    >div {
492
+      display: flex;
493
+      align-items: center;
494
+      overflow: hidden;
495
+      text-overflow: ellipsis;
496
+      white-space: nowrap;
497
+      white-space: nowrap;
498
+    }
499
+  }
500
+
501
+  .centerCon {
502
+    width: 63%;
503
+    height: 75%;
504
+    padding: 0;
505
+    position: relative;
506
+    margin: 0% 0 0 -1%;
507
+
508
+
509
+  }
510
+
511
+
512
+
513
+
514
+  :global {
515
+    .imgMsg2 {
516
+      list-style: none;
517
+      margin: 0;
518
+      padding: 0;
519
+      width: 100%;
520
+      position: absolute;
521
+      left: 27.5%;
522
+      margin-top: -14%;
523
+      top: 0;
524
+      height: 100%;
525
+      z-index: 100;
526
+      color: #fff;
527
+      pointer-events: none;
528
+      overflow: visible;
529
+
530
+      li {
531
+        position: absolute;
532
+        width: 20em;
533
+        z-index: 100;
534
+        height: 4em;
535
+        opacity: 1;
536
+        overflow: visible;
537
+        background: linear-gradient(0deg, #ffffff26 0%, #ffffff00 100%);
538
+        border-radius: 0.5em;
539
+        padding: 0.5em;
540
+        box-sizing: border-box;
541
+        font-size: 0.9em;
542
+        color: #CDF1FF;
543
+        pointer-events: auto;
544
+
545
+        .nums {
546
+          font-size: 1.3em;
547
+          color: #69FFDE;
548
+          display: inline-block !important;
549
+        }
550
+
551
+        .topMsg_number_2 {
552
+          display: inline-block !important;
553
+        }
554
+
555
+        .sma {
556
+          font-size: 0.7em;
557
+          color: #CDF1FF;
558
+          display: inline-block;
559
+          margin-left: 0.2em;
560
+        }
561
+
562
+        .chanL {
563
+          background: unset;
564
+          font-size: 0.9em;
565
+          color: #CDF1FF;
566
+          height: 4em;
567
+          box-sizing: border-box;
568
+          padding: 0 0.5em;
569
+          display: flex;
570
+          justify-content: space-between;
571
+
572
+          >div {
573
+            width: 50%;
574
+          }
575
+        }
576
+
577
+        .hoverR {
578
+          width: 100%;
579
+          height: 12em;
580
+          position: absolute;
581
+          left: 0;
582
+          top: -7em;
583
+          padding-top: 11em;
584
+          overflow: visible;
585
+
586
+
587
+          .hoverDiv {
588
+            display: none;
589
+          }
590
+        }
591
+
592
+        // hover 区域是绝对定位,直接用 li:hover 更稳定
593
+        &:hover .hoverDiv,
594
+        .hoverR:hover .hoverDiv {
595
+          display: flex;
596
+        }
597
+
598
+        .hoverDiv {
599
+          display: flex;
600
+          align-items: center;
601
+          justify-content: space-between;
602
+          padding: 0 1em;
603
+          background: linear-gradient(0deg, #292929f2 0%, #25252540 100%);
604
+          // linear-gradient(0deg, #ffffff00 20%, #7a7a7a29 100%);
605
+          width: 100%;
606
+          border-radius: 0.5em;
607
+          box-sizing: border-box;
608
+          margin-top: 0.1em;
609
+          font-size: 0.8em;
610
+          padding: 0.2em 0em 0 1em;
611
+          color: #d7d7d7;
612
+          align-items: flex-start;
613
+          height: auto;
614
+
615
+          >div>span {
616
+            display: block;
617
+          }
618
+        }
619
+      }
620
+
621
+      @media (max-height: 900px) {
622
+        li .hoverDiv {
623
+          background: linear-gradient(0deg, #292929 0%, #252525 100%) !important;
624
+        }
625
+
626
+      }
627
+
628
+
629
+      li:hover {
630
+        background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
631
+      }
632
+    }
633
+  }
634
+}

+ 663 - 0
src/pages/sial/view.jsx

@@ -0,0 +1,663 @@
1
+/*
2
+ * @Author: dayan_hjm 
3
+ * @Date: 2023-10-25 10:32:44 
4
+ * @Last Modified by: dayan_hjm
5
+ * @Last Modified time: 2024-11-13 10:24:39
6
+ */
7
+/*
8
+ * @Author: dayan_hjm 
9
+ * @Date: 2022-10-27 11:40:02 
10
+ * @Last Modified by: dayan_hjm
11
+ * @Last Modified time: 2023-10-25 10:32:07
12
+ */
13
+
14
+import React, { useState, useEffect, Component } from "react";
15
+import styles from "./style.less";
16
+import { useHistory, useLocation, withRouter } from "react-router-dom";
17
+import { observer, observable } from "mobx-react";
18
+import { message, Space, Form, Popconfirm, Modal, Tooltip, Icon, Button } from "antd";
19
+import mod from './mod';
20
+import { toJS } from "mobx";
21
+import BottomLineForSend from "./component/bottomLineForSend.jsx";
22
+import MoodSendView from "./component/moodSendView.jsx";
23
+import MoodProductionView from "./component/moodProductionView.jsx";
24
+
25
+import LeftMenoyView from "./component/leftMenoyView.jsx";
26
+import RightBottomView from "./component/rightBottomView.jsx";
27
+import OneQualified from "./component/oneQualified.jsx";
28
+import DryBaseQualified from "./component/dryBaseQualified";
29
+import mpVideoGvc from "@assets/imgs/dataVimg/sial_video2.mp4";
30
+import { get } from "lodash";
31
+
32
+import MapView from "./component/mapView.jsx";
33
+import $store from "@store/";
34
+import {
35
+  timeService,
36
+  numberService,
37
+  checkToken,
38
+  updateTimeService,
39
+  getBaseData,
40
+  getBaseYMDData,
41
+  getBaseDetailData
42
+} from "./api";
43
+import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
44
+import {
45
+  fullscreen,
46
+} from "@ant-design/icons";
47
+import 'animate.css';
48
+@withRouter
49
+
50
+class Home extends Component {
51
+  // 构造函数,组件的实例创建时,最先执行
52
+  constructor(props, context) {
53
+    super(props, context);
54
+    this.store = mod;
55
+    this.state = {
56
+      updateTime: '',
57
+      changGif: false,
58
+      changNun: false,
59
+      plannedCompletionData: [
60
+      ],
61
+      plannedCompletionNum: 1,
62
+      manHourData: [
63
+      ],
64
+      manHourNum: 1,
65
+      leftName: deleteCacheAndChangeUrl("left", false, true),
66
+      rightName: deleteCacheAndChangeUrl("right", false, true),
67
+      imgMsgData: [
68
+        {
69
+          "factoryCode": 5,
70
+          "production": 0,
71
+          "inventory": 0,
72
+          "total": 0,
73
+          "totalName": "",
74
+          "styles": {
75
+            "left": "14%",
76
+            "top": "50%"
77
+          },
78
+          "cumulativeProduction": 0,
79
+          "day": "0",
80
+          "mood": "0",
81
+          "year": "0",
82
+          "rawMaterial": [
83
+
84
+          ]
85
+        },
86
+        {
87
+          "factoryCode": 10,
88
+          "production": 0,
89
+          "inventory": 0,
90
+          "total": 0,
91
+          "totalName": "",
92
+          "styles": {
93
+            "left": "0%",
94
+            "top": "83%"
95
+          },
96
+          "cumulativeProduction": 0,
97
+          "day": "0",
98
+          "mood": "0",
99
+          "year": "0",
100
+          "rawMaterial": [
101
+
102
+          ]
103
+        },
104
+      ]
105
+    };
106
+    this.timer = null //定时器,用于检测同步状态
107
+  }
108
+  componentWillMount() {
109
+    if (window.location.host.indexOf("localhost") == -1) {
110
+      this.getToken()
111
+    }
112
+  }
113
+
114
+  async getToken() {
115
+    if (!sessionStorage.getItem("tqcVToken")) {
116
+      this.props.history.replace("/home/index");
117
+    } else {
118
+      await checkToken(sessionStorage.getItem("tqcVToken")).then(({ data, resultCode }) => {
119
+        if (data?.userId) {
120
+          sessionStorage.setItem("tqcUserName", data?.userId);
121
+          $store.app.setMarkSrc(
122
+            setWaterMark({
123
+              toDataURL: true,
124
+              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
125
+            })
126
+          );
127
+        } else {
128
+          window.location = window.location.origin + '/transfer.html#/login';
129
+          // this.props.history.replace("/home/index");
130
+        }
131
+      });
132
+    }
133
+  }
134
+  componentDidMount() {
135
+    this.fontMsgChange();
136
+    this.getUrl();
137
+    this.getUrl2()
138
+    this.getUrl3();
139
+    this.getBaseData();
140
+    setTimeout(() => {
141
+      this.videoStart();
142
+    }, 200)
143
+    setTimeout(() => {
144
+      //替换gif
145
+      this.setState({ changGif: true });
146
+    }, 2000);
147
+    setTimeout(() => {
148
+      this.setState({ changNun: true });
149
+    }, 4500)
150
+
151
+  }
152
+  async getBaseData() {
153
+    await getBaseData().then(async ({ data = [], resultCode }) => {
154
+      if (+resultCode === 0) {
155
+        console.log('getBaseData', data)
156
+        const jiangsu = data?.find(item => item.factoryCode == 5);
157
+        const yanting = data?.find(item => item.factoryCode == 10);
158
+        const imgMsgData = this.state.imgMsgData.map((item) => ({ ...item }));
159
+        if (jiangsu) {
160
+          imgMsgData[0] = { ...imgMsgData[0], inventory: jiangsu.inventory, cumulativeProduction: jiangsu.production };
161
+        }
162
+        if (yanting) {
163
+          imgMsgData[1] = { ...imgMsgData[1], inventory: yanting.inventory, cumulativeProduction: yanting.production };
164
+        }
165
+        this.setState({ imgMsgData });
166
+        await this.getBaseYMDData();
167
+        await this.getBaseDetailData();
168
+      }
169
+    });
170
+  }
171
+  async getBaseYMDData() {
172
+    await getBaseYMDData().then(({ data = [], resultCode }) => {
173
+      if (+resultCode === 0) {
174
+        console.log('getBaseYMDData', data)
175
+        function getItems(num) {
176
+          const datas = data.filter(x => { return x.factoryCode == num });
177
+          const par = {
178
+            day: getThousandNum(datas?.filter(x => { return x.dateType == 1 })?.[0]?.indexValue || 0),
179
+            mood: getThousandNum(datas?.filter(x => { return x.dateType == 2 })?.[0]?.indexValue || 0),
180
+            year: getThousandNum(datas?.filter(x => { return x.dateType == 3 })?.[0]?.indexValue || 0),
181
+          }
182
+          return par
183
+        }
184
+        const jiangsu = getItems(5);
185
+        const yanting = getItems(10);
186
+        const imgMsgData = this.state.imgMsgData.map((item) => ({ ...item }));
187
+        if (jiangsu) {
188
+          imgMsgData[0] = { ...imgMsgData[0], ...jiangsu };
189
+        }
190
+        if (yanting) {
191
+          imgMsgData[1] = { ...imgMsgData[1], ...yanting };
192
+        }
193
+        this.setState({ imgMsgData });
194
+      }
195
+    });
196
+  }
197
+  async getBaseDetailData() {
198
+    await getBaseDetailData().then(({ data = [], resultCode }) => {
199
+      if (+resultCode === 0) {
200
+        console.log('getBaseDetailData', data)
201
+        const jiangsu = (data?.filter(item => item.factoryCode == 5)) || [];
202
+        const yanting = (data?.filter(item => item.factoryCode == 10)) || [];
203
+        const imgMsgData = this.state.imgMsgData.map((item) => ({ ...item }));
204
+        if (jiangsu.length) {
205
+          imgMsgData[0] = { ...imgMsgData[0], rawMaterial: jiangsu };
206
+        }
207
+        if (yanting.length) {
208
+          imgMsgData[1] = { ...imgMsgData[1], rawMaterial: yanting };
209
+        }
210
+        this.setState({ imgMsgData });
211
+      }
212
+    });
213
+  }
214
+  videoStart() {
215
+    /*     Chrome 浏览器的视频自动播放策略
216
+        1.始终允许静音模式下自动播放
217
+        2.在以下的情况中,带声音播放会被允许:
218
+          ①用户已经与当前的域进行了交互(也就是click,tap事件)。
219
+          ②在桌面设备上,用户的媒体参与度指数阈值已经超过,这意味着用户之前播放过有声视频。
220
+          ③用户已经将网站添加到移动设备上的主屏幕或允在桌面上安装了PWA。
221
+        3.顶部帧可以将自动播放权限委派给其iframe,来允许自动播放声音
222
+        
223
+        媒体参与度(Media Engagement)是指用户与媒体内容进行互动的程度,可以通过多个指标来衡量。这些指标主要包括观看时间、观看率、转化率、交互行为等。
224
+        可以通过:chrome://media-engagement/ 查看
225
+     */
226
+    const video = document.querySelector('.video_box_2');
227
+    console.log(video.play());
228
+
229
+    const model = document.querySelector('.model')
230
+    const btn = document.querySelector('button')
231
+    // 第一种方法 引导用户去与页面交互实现播放
232
+    async function play() {
233
+      try {
234
+        await video.play();
235
+        //使用await的原因是因为video.play()方法返回的是一个Promise,所以在这里我们可以对他进行一些处理
236
+        model.style.display = 'none';
237
+        btn.removeEventListener('click', play);
238
+        // 如果他自动播放了就隐藏按钮,消除点击事件
239
+      } catch (err) {
240
+        model.style.display = 'block';
241
+        btn.addEventListener('click', play);
242
+        // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
243
+      }
244
+    }
245
+    play();
246
+
247
+    //第二种方法比较主流,类似的有网页版抖音以及B站
248
+    function play() {
249
+      video.muted = true;//设置视频为静音
250
+      video.play();//调用播放方法
251
+      const ctx = new AudioContext();
252
+      const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
253
+      // 如果是不能播放我们就执行下面的逻辑,其实就是类似于第一种方法,让用户与其交互
254
+      ctx.close();
255
+      if (canAutoPlay) {
256
+        video.muted = false;
257
+        model.style.display = 'none';
258
+        btn.removeEventListener('click', play);
259
+      }
260
+      else {
261
+        model.style.display = 'block';
262
+        btn.addEventListener('click', play);
263
+      }
264
+    }
265
+    play()
266
+
267
+  }
268
+
269
+  async getUrl() {
270
+    await timeService().then(({ data = [], resultCode }) => {
271
+      if (+resultCode === 0) {
272
+        let plannedCompletionData = [], manHourData = [];
273
+        data.map((x, i) => {
274
+          if (x.indexName == '产量计划完成率') {
275
+            plannedCompletionData.push({
276
+              name: x.factoryName,
277
+              factoryCode: x.factoryCode,
278
+              value: x.indexValue ? Number((x.indexValue * 100).toFixed(2)) : 0,
279
+            })
280
+          } else {
281
+            manHourData.push({
282
+              name: x.factoryName,
283
+              factoryCode: x.factoryCode,
284
+              // value: Number((x.indexValue * 100).toFixed(2)),
285
+              value: Number(x.indexValue),
286
+            })
287
+          }
288
+        });
289
+        console.log('plannedCompletionData', plannedCompletionData)
290
+        this.setState({ plannedCompletionData, manHourData, plannedCompletionNum: 1, manHourNum: 1 });
291
+      }
292
+    });
293
+  }
294
+  async getUrl2() {
295
+    await numberService().then(({ data = [], resultCode }) => {
296
+      if (+resultCode === 0) {
297
+        let totalValue = 0, yearDecline = 0, yearSend = 0, productInventory = 0;
298
+        data.map((x, i) => {
299
+          if (x.indexName == '产值') {
300
+            totalValue = x.indexValue
301
+          } else if (x.indexName == '年度产量') {
302
+            yearDecline = x.indexValue
303
+          } else if (x.indexName == '产品库存') {
304
+            yearSend = x.indexValue
305
+          } else if (x.indexName == '年度发货量') {
306
+            productInventory = x.indexValue
307
+          }
308
+        });
309
+        this.store.saveState({ totalValue, yearDecline, yearSend, productInventory });
310
+        setTimeout(() => {
311
+          $(".shu1").numScroll();
312
+        }, 2500)
313
+      }
314
+    });
315
+  }
316
+  async getUrl3() {
317
+    await updateTimeService().then(({ data = [], resultCode }) => {
318
+      if (+resultCode === 0) {
319
+        this.setState({ updateTime: data?.[0]?.etlTime || '' })
320
+      }
321
+    });
322
+  }
323
+
324
+  componentWillUnmount() {
325
+    clearInterval(this.timer);
326
+    this.timer = null;
327
+  }
328
+
329
+  fontMsgChange(type) {
330
+    this.timer = setInterval(() => {
331
+
332
+      const { plannedCompletionData, plannedCompletionNum, manHourData, manHourNum } = this.state;
333
+      const yanting = plannedCompletionData.find(item => item.factoryCode == 10);
334
+      const jiangsu = plannedCompletionData.find(item => item.factoryCode == 5);
335
+      //产量计划完成率
336
+      var p1 = document.getElementById('plannedCompletionBox_yanting');
337
+      var p3 = document.getElementById('plannedCompletionBox_jiangsu');
338
+      p1.innerHTML = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(yanting?.value.toFixed(2)) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + '盐亭' + '</p></div>';
339
+      p3.innerHTML = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(jiangsu?.value.toFixed(2)) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + '江苏' + '</p></div>';
340
+
341
+      // const num_ = plannedCompletionNum + 1 > plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
342
+      // this.setState({ plannedCompletionNum: num_, })
343
+    }, 4000)
344
+
345
+  }
346
+
347
+  render() {
348
+    const stores = this.store.state;
349
+    let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
350
+    let { changGif, updateTime, changNun, leftName, rightName, imgMsgData } = this.state;
351
+    return (
352
+      <div className={styles.sial_home}>
353
+        {/* 水印 */}
354
+        {
355
+          window.urlConfig && window.urlConfig.SHOW_WATERMARK && <div className={"shuiYin"} style={{ backgroundImage: `url(${$store.app.markSrc})`, backgroundRepeat: 'repeat' }}></div>
356
+        }
357
+        {/* 右键切换大屏 */}
358
+        <Tooltip placement="bottom" title={rightName}>
359
+          <img src={require("@assets/imgs/iconJpg/rightJ.png").default} alt="" className={"rightJ_png"} onClick={() => {
360
+            deleteCacheAndChangeUrl("right", (url) => {
361
+              this.props.history.replace(url);
362
+            })
363
+          }} />
364
+        </Tooltip>
365
+        <Tooltip placement="bottom" title={leftName}>
366
+          <img src={require("@assets/imgs/iconJpg/rightJL.png").default} alt="" className={"rightJ_png rightJ_png_L"} onClick={() => {
367
+            deleteCacheAndChangeUrl("left", (url) => {
368
+              this.props.history.replace(url);
369
+            })
370
+          }} />
371
+        </Tooltip>
372
+
373
+        {/* 视频播放器 */}
374
+        <MapView></MapView>
375
+        <div className={"sial_video"}>
376
+          <div className="alls">
377
+            <video src={mpVideoGvc} playbackRate={0.5} autoplay="autoplay" loop="loop" class="video_box_2 animate__animated animate__fadeIn animate__delay-2s">
378
+            </video>
379
+            {/* <img src={require("@assets/imgs/dataVimg/gvcbg.png").default} alt="" class="video_box_2 center_box2 animate__animated animate__fadeIn animate__delay-2s" /> */}
380
+            <ul className="imgMsg2">
381
+              {
382
+                toJS(imgMsgData).map((item, index) => {
383
+                  if (!item) { return null }
384
+                  return (
385
+                    <li style={{ ...item?.styles }} class="animate__animated animate__bounceInUp animate__slower">
386
+                      {/* 矿产 */}
387
+                      {
388
+                        item.totalName && <p className="name">{item.totalName}</p>
389
+                      }
390
+                      {
391
+                        item.totalName && !changGif && <span class="shu1 nums">{item.total}</span>
392
+                      }
393
+                      {
394
+                        item.totalName && changGif && <span class="nums">{getThousandNum(item.total)}</span>
395
+                      }
396
+                      {
397
+                        item.totalName && <span className="sma">吨</span>
398
+                      }
399
+                      {/* 基地 */}
400
+                      {
401
+                        (item.cumulativeProduction !== null || item.showDetail) && <div className="hoverR">
402
+                          <div className="hoverDiv chanL">
403
+                            {/* <div style={{ width: "62%","textAlign":'right' }}> */}
404
+                            {
405
+                              item.cumulativeProduction !== null && <div style={{ width: "38%", textAlign: 'start' }}>
406
+                                <p className="title">
407
+                                  产量/吨
408
+                                </p>
409
+                                <span>日:{item.day}</span>
410
+                                <span>月:{item.mood}</span>
411
+                                <span>年:{item.year}</span>
412
+                              </div>
413
+                            }
414
+
415
+                            <div style={{ width: index == 5 ? "58%" : "57%", textAlign: 'start' }}>
416
+                              <p className="title">
417
+                                库存/吨
418
+                              </p>
419
+                              {
420
+                                get(item, "rawMaterial", []).map((ra, rai) => {
421
+                                  return <span key={rai}>{ra.prodCatgory}:{ra.indexValue}</span>
422
+                                })
423
+                              }
424
+                            </div>
425
+                          </div>
426
+                        </div>
427
+                      }
428
+                      {
429
+                        item.cumulativeProduction !== null && <div className="chanL text">
430
+                          <div>
431
+                            <p>累计产量</p>
432
+                            {
433
+                              !changGif ? <span class="nums shu1">{item.cumulativeProduction}</span> : <span class="nums">{getThousandNum(item.cumulativeProduction)}</span>
434
+                            }
435
+
436
+                            <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
437
+                          </div>
438
+                          <div style={{ width: "60%" }}>
439
+                            <p>产品库存</p>
440
+                            {
441
+                              !changGif ? <span class="nums shu1">{item.inventory}</span> : <span class="nums">{getThousandNum(item.inventory)}</span>
442
+                            }
443
+                            <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
444
+                          </div>
445
+
446
+                        </div>
447
+                      }
448
+                    </li>
449
+                  )
450
+                })
451
+              }
452
+            </ul>
453
+          </div>
454
+
455
+        </div>
456
+        <div className={[styles.home + " home cbHome"]}>
457
+          <div className="leftContent">
458
+            {/* <div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
459
+              <div className="topMsg">
460
+                <Tooltip placement="bottom" title={<p className="titpeP">
461
+                  ● 本年度截止到最新结账月的主产品的产值合计,计算:
462
+                  <img src={require("@assets/imgs/dataVimg/gongshi.png").default} alt="" style={{ width: "1.5em", margin: " 0 0.5em 0 0em" }} />
463
+                  产品1月产量*产品1月平均销售单价+产品2月产量* 产品2月平均销售单价+...
464
+                </p>}>
465
+                  <p className="topMsg_title">总产值</p>
466
+                </Tooltip>
467
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
468
+                  {
469
+                    !changNun && <span className="topMsg_number" class="shu1">{totalValue}</span>
470
+                  }
471
+                  {
472
+                    changNun && <span className="topMsg_number">{getThousandNum(totalValue)}</span>
473
+                  }
474
+                  <span className="topMsg_number_2">万元</span>
475
+                </div>
476
+              </div>
477
+            </div> */}
478
+            <div class="topMsg_33 mgb_box animate__animated animate__fadeInDown animate__slower animate__delay-1s">
479
+              <div className="topMsg_3">
480
+                <Tooltip placement="bottom" title={' ● 本年度截止到更新日期累计产量的计划完成率。'}>
481
+                  <p className="topMsg_title">产量计划完成率</p>
482
+                </Tooltip>
483
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox_yanting">
484
+                  <div className="topMsg_box">
485
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
486
+                    <p className="topMsg_number_p"></p>
487
+                  </div>
488
+                </div>
489
+              </div>
490
+            </div>
491
+
492
+            <div class="topMsg_22 mgb_box animate__animated animate__fadeInDown animate__slower">
493
+              <div className="topMsg_2">
494
+                <Tooltip placement="bottom" title={' ● 近一年的干基产率。'}>
495
+                  <p className="topMsg_title">干基产率</p>
496
+                </Tooltip>
497
+
498
+                <div className="topMsg_content">
499
+                  <DryBaseQualified></DryBaseQualified>
500
+                </div>
501
+              </div>
502
+            </div>
503
+
504
+            {/* <div class="center_box2 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
505
+              <div className="center_box">
506
+                <Tooltip placement="bottom" title={<p className="titpeP">
507
+                  <p>● 截止更新日期的主产品库存金额,计算:</p>
508
+                  <img src={require("@assets/imgs/dataVimg/gongshi2.png").default} alt="" style={{ width: "1.3em", margin: " -0.3em 0.5em 0 0em" }} />
509
+                  物料1库存数*物料1移动平均价+物料2*物料2移动平均价+…
510
+                </p>}>
511
+                  <p className="topMsg_title" style={{ position: "relative", zIndex: 999999 }}>产品库存金额</p>
512
+                </Tooltip>
513
+                <div className="topMsg_content">
514
+                  <LeftMenoyView></LeftMenoyView>
515
+                </div>
516
+              </div>
517
+            </div> */}
518
+
519
+            <div class="bottomContent2 mgb_box animate__animated animate__fadeInDown animate__slower animate__delay-2s">
520
+              <div className="bottomContent bigDivPd">
521
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
522
+                  <p className="topMsg_title">月度产量</p>
523
+                </Tooltip>
524
+                <div className="topMsg_content">
525
+                  <MoodProductionView></MoodProductionView>
526
+                </div>
527
+              </div>
528
+            </div>
529
+
530
+
531
+
532
+
533
+          </div>
534
+
535
+          <div className="centerCon">
536
+            <div class="topMsg3 animate__animated animate__fadeInUp animate__slower">
537
+              <div className="topMsg">
538
+                <div className="topMsg2">
539
+                  <div className="topMsg_content">
540
+                    <div className="center_li">
541
+                      <div className="right_li">
542
+                        {
543
+                          !changNun && <span className="topMsg_number" class="shu1">{yearDecline}</span>
544
+                        }
545
+                        {
546
+                          changNun && <span className="topMsg_number">{getThousandNum(yearDecline)}</span>
547
+                        }
548
+                        <p className="topMsg_line"></p>
549
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的产量合计'}>
550
+                          <span className="topMsg_tip">年度产量/吨</span>
551
+                        </Tooltip>
552
+                      </div>
553
+                    </div>
554
+                    <div className="center_li">
555
+                      <div className="right_li">
556
+                        {
557
+                          !changNun && <span className="topMsg_number" class="shu1">{productInventory}</span>
558
+                        }
559
+                        {
560
+                          changNun && <span className="topMsg_number">{getThousandNum(productInventory)}</span>
561
+                        }
562
+                        <p className="topMsg_line"></p>
563
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的发货量合计。'}>
564
+                          <span className="topMsg_tip">年度发货量/吨</span>
565
+                        </Tooltip>
566
+                      </div>
567
+                    </div>
568
+                    <div className="center_li">
569
+                      {
570
+                        !changNun && <span className="topMsg_number" class="shu1">{yearSend}</span>
571
+                      }
572
+                      {
573
+                        changNun && <span className="topMsg_number">{getThousandNum(yearSend)}</span>
574
+                      }
575
+                      <p className="topMsg_line"></p>
576
+                      <Tooltip placement="bottom" title={' ● 截止更新日期的主产品库存数量。'}>
577
+                        <span className="topMsg_tip">产品库存/吨</span>
578
+                      </Tooltip>
579
+                    </div>
580
+                  </div>
581
+                </div>
582
+              </div>
583
+            </div>
584
+
585
+            <div class="bottomContent3  animate__animated animate__fadeInUp animate__slower animate__delay-1s" style={{ bottom: '3%' }}>
586
+              <div className="bottomContent">
587
+                <Tooltip placement="bottom" title={' ● 以更新日期为节点近30天的产量数据(含外加工)。'}>
588
+                  <p className="topMsg_title">近30天产量</p>
589
+                </Tooltip>
590
+                <div className="topMsg_content">
591
+                  <BottomLineForSend></BottomLineForSend>
592
+                </div>
593
+              </div>
594
+            </div>
595
+
596
+          </div>
597
+
598
+          {/* 右侧信息栏 */}
599
+          <div className="leftContent">
600
+
601
+            <div class="topMsg_33 mgb_box animate__animated animate__fadeInDown animate__slower animate__delay-1s">
602
+              <div className="topMsg_3">
603
+                <Tooltip placement="bottom" title={' ● 本年度截止到更新日期累计产量的计划完成率。'}>
604
+                  <p className="topMsg_title">产量计划完成率</p>
605
+                </Tooltip>
606
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox_jiangsu">
607
+                  <div className="topMsg_box">
608
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
609
+                    <p className="topMsg_number_p"></p>
610
+                  </div>
611
+                </div>
612
+              </div>
613
+            </div>
614
+
615
+            <div class="topMsg_22 mgb_box animate__animated animate__fadeInDown animate__slower">
616
+              <div className="topMsg_2">
617
+                <Tooltip placement="bottom" title={' ● 近六个月的主产品一次合格率,当月的数据计算至更新日期。'}>
618
+                  <p className="topMsg_title">一次合格率</p>
619
+                </Tooltip>
620
+
621
+                <div className="topMsg_content">
622
+                  <OneQualified></OneQualified>
623
+                </div>
624
+              </div>
625
+            </div>
626
+
627
+
628
+
629
+            {/* <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower  animate__delay-1s">
630
+              <div className="bottomContent bigDivPd">
631
+                <Tooltip placement="bottom" title={' ● 近三年的碳排放总量、碳排放强度数据'}>
632
+                  <p className="topMsg_title">碳排放</p>
633
+                </Tooltip>
634
+                <div className="topMsg_content">
635
+                  <RightBottomView></RightBottomView>
636
+                </div>
637
+              </div>
638
+            </div> */}
639
+
640
+            <div class="bottomContent2 mgb_box animate__animated animate__fadeInDown animate__slower animate__delay-2s">
641
+              <div className="bottomContent bigDivPd">
642
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
643
+                  <p className="topMsg_title">月度发货量</p>
644
+                </Tooltip>
645
+                <div className="topMsg_content">
646
+                  <MoodSendView></MoodSendView>
647
+                </div>
648
+              </div>
649
+            </div>
650
+
651
+          </div>
652
+          <div className="bottom_box">
653
+            <p style={{ color: "#6a818d", lineHeight: '2px' }}>
654
+              更新日期 : {updateTime ? updateTime.split(" ")[0] : updateTime}
655
+            </p>
656
+          </div>
657
+
658
+        </div>
659
+      </div>
660
+    )
661
+  }
662
+}
663
+export default Home;

+ 1 - 1
src/pages/tlk/api.js

@@ -89,7 +89,7 @@ export function timeService(params) {
89 89
         "indexValue"
90 90
       ],
91 91
       "pageNum": 1,
92
-      "pageSize": 10,
92
+      "pageSize": 999,
93 93
       "useResultCache": false
94 94
     },
95 95
     headers: {

+ 1 - 1
src/pages/tqcDataVHome/api.js

@@ -89,7 +89,7 @@ export function timeService(params) {
89 89
         "indexValue"
90 90
       ],
91 91
       "pageNum": 1,
92
-      "pageSize": 10,
92
+      "pageSize": 999,
93 93
       "useResultCache": false
94 94
     },
95 95
     headers: {

+ 232 - 0
src/pages/tqcDataVHome/api2.js

@@ -0,0 +1,232 @@
1
+import request from "@utils/request";
2
+
3
+/**登录*/
4
+export function checkToken(params) {
5
+  return request({
6
+    url: `/api/yonghong/checkToken?token=${params}`,
7
+    method: "GEt",
8
+  });
9
+}
10
+
11
+/**碳排放 */
12
+export function dataengineCenterOneservice(params) {
13
+  return request({
14
+    url: "/dataengine-center-oneservice/list/1356250396177503367",
15
+    method: "POST",
16
+    data: {
17
+      "apiId": "1356250396177503367",
18
+      "appKey": "200000134",
19
+      "env": "PROD",
20
+      "reqProtocol": 1,
21
+      "returnFields": [
22
+        "byear",
23
+        "missionsIntensity",
24
+        "missionsTotal",
25
+        "biz_id"
26
+      ],
27
+      "pageNum": 1,
28
+      "pageSize": 10,
29
+      "useResultCache": false
30
+    },
31
+    headers: {
32
+      sign: '19c3cdb58b80e44f2490b8eba3b7f938',
33
+      account: 'yunxi_fuxue',
34
+      'Cache-Control': 'no-cache',
35
+      apiId: '1356250396177503367',
36
+      appKey: '200000134',
37
+      execType: '3',
38
+      env: 'PROD',
39
+    }
40
+  });
41
+}
42
+
43
+
44
+/**库存金额 */
45
+export function momeyService(params) {
46
+  return request({
47
+    url: "/dataengine-center-oneservice/list/1431063632208685082",
48
+    method: "POST",
49
+    data: {
50
+      "apiId": "1431063632208685082",
51
+      "appKey": "200000134",
52
+      "env": "PROD",
53
+      "reqProtocol": 1,
54
+      "returnFields": [
55
+        "indexName",
56
+        "prodCatgory",
57
+        "indexValue"
58
+      ],
59
+      "pageNum": 1,
60
+      "pageSize": 10,
61
+      "useResultCache": false
62
+    },
63
+    headers: {
64
+      sign: '6203b66920c569f8228c3cb921f3ffb8',
65
+      account: 'yunxi_fuxue',
66
+      'Cache-Control': 'no-cache',
67
+      apiId: '1431063632208685082',
68
+      appKey: '200000134',
69
+      execType: '3',
70
+      env: 'PROD',
71
+    }
72
+  });
73
+}
74
+
75
+
76
+/**百万工时损工率   产量计划完成率*/
77
+export function timeService(params) {
78
+  return request({
79
+    url: "/dataengine-center-oneservice/list/1431063077222574093",
80
+    method: "POST",
81
+    data: {
82
+      "apiId": "1431063077222574093",
83
+      "appKey": "200000134",
84
+      "env": "PROD",
85
+      "reqProtocol": 1,
86
+      "returnFields": [
87
+        "indexName",
88
+        "factoryName",
89
+        "indexValue"
90
+      ],
91
+      "pageNum": 1,
92
+      "pageSize": 10,
93
+      "useResultCache": false
94
+    },
95
+    headers: {
96
+      sign: '9ab2d57a785c513f84cd0c5fb4fad7da',
97
+      account: 'yunxi_fuxue',
98
+      'Cache-Control': 'no-cache',
99
+      apiId: '1431063077222574093',
100
+      appKey: '200000134',
101
+      execType: '3',
102
+      env: 'PROD',
103
+    }
104
+  });
105
+}
106
+
107
+/**产值+发货量+产量+库存*/
108
+export function numberService(params) {
109
+  return request({
110
+    url: "/dataengine-center-oneservice/list/1431049820141217793",
111
+    method: "POST",
112
+    data: {
113
+      "apiId": "1431049820141217793",
114
+      "appKey": "200000134",
115
+      "env": "PROD",
116
+      "reqProtocol": 1,
117
+      "returnFields": [
118
+        "indexName",
119
+        "indexValue"
120
+      ],
121
+      "pageNum": 1,
122
+      "pageSize": 10,
123
+      "useResultCache": false
124
+    },
125
+    headers: {
126
+      sign: '915848290d3e70a7b8e7fbe911e12725',
127
+      account: 'yunxi_fuxue',
128
+      'Cache-Control': 'no-cache',
129
+      apiId: '1431049820141217793',
130
+      appKey: '200000134',
131
+      execType: '3',
132
+      env: 'PROD',
133
+    }
134
+  });
135
+}
136
+
137
+
138
+/**近30天产量*/
139
+export function mondService(params) {
140
+  return request({
141
+    url: "/dataengine-center-oneservice/list/1431065871110334506",
142
+    method: "POST",
143
+    data: {
144
+      "apiId": "1431065871110334506",
145
+      "appKey": "200000134",
146
+      "env": "PROD",
147
+      "reqProtocol": 1,
148
+      "returnFields": [
149
+        "indexName",
150
+        "indexDate",
151
+        "indexValue",
152
+        "factoryProdcution"
153
+      ],
154
+      "pageNum": 1,
155
+      "pageSize": 30,
156
+      "useResultCache": false
157
+    },
158
+    headers: {
159
+      sign: 'f84acfc47847e71c67be5569b9289291',
160
+      account: 'yunxi_fuxue',
161
+      'Cache-Control': 'no-cache',
162
+      apiId: '1431065871110334506',
163
+      appKey: '200000134',
164
+      execType: '3',
165
+      env: 'PROD',
166
+    }
167
+  });
168
+}
169
+
170
+/**月度产量/发货量+一次合格率*/
171
+export function twoService(params) {
172
+  return request({
173
+    url: "/dataengine-center-oneservice/list/1431065780441016356",
174
+    method: "POST",
175
+    data: {
176
+      "apiId": "1431065780441016356",
177
+      "appKey": "200000134",
178
+      "env": "PROD",
179
+      "reqProtocol": 1,
180
+      "returnFields": [
181
+        "bMonth",
182
+        "proQty",
183
+        "deliveryQty",
184
+        "qcRate",
185
+        "targeRate",
186
+      ],
187
+      "pageNum": 1,
188
+      "pageSize": 10,
189
+      "useResultCache": false
190
+    },
191
+    headers: {
192
+      sign: '178ae23014a9fecad15ffa9a88ed84f1',
193
+      account: 'yunxi_fuxue',
194
+      'Cache-Control': 'no-cache',
195
+      apiId: '1431065780441016356',
196
+      appKey: '200000134',
197
+      execType: '3',
198
+      env: 'PROD',
199
+    }
200
+  });
201
+}
202
+
203
+/**更新日期*/
204
+export function updateTimeService(params) {
205
+  return request({
206
+    url: "/dataengine-center-oneservice/list/1356778817327502618",
207
+    method: "POST",
208
+    data: {
209
+      "apiId": "1356778817327502618",
210
+      "appKey": "200000134",
211
+      "env": "PROD",
212
+      "reqProtocol": 1,
213
+      "returnFields": [
214
+        "etlTime"
215
+      ],
216
+      "pageNum": 1,
217
+      "pageSize": 10,
218
+      "useResultCache": false
219
+    },
220
+    headers: {
221
+      sign: '4365b6564b25c852fcf0228188f48114',
222
+      account: 'yunxi_fuxue',
223
+      'Cache-Control': 'no-cache',
224
+      apiId: '1356778817327502618',
225
+      appKey: '200000134',
226
+      execType: '3',
227
+      env: 'PROD',
228
+    }
229
+  });
230
+}
231
+
232
+

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

@@ -31,7 +31,7 @@ import {
31 31
   checkToken,
32 32
   updateTimeService
33 33
 } from "./api";
34
-import { getThousandNum, deleteCacheAndChangeUrl,timestampToTime,setWaterMark  } from "@utils/util";
34
+import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
35 35
 import {
36 36
   fullscreen,
37 37
 } from "@ant-design/icons";
@@ -53,8 +53,8 @@ class Home extends Component {
53 53
       manHourData: [
54 54
       ],
55 55
       manHourNum: 1,
56
-      leftName:deleteCacheAndChangeUrl("left",false,true),
57
-      rightName:deleteCacheAndChangeUrl("right",false,true),
56
+      leftName: deleteCacheAndChangeUrl("left", false, true),
57
+      rightName: deleteCacheAndChangeUrl("right", false, true),
58 58
 
59 59
     };
60 60
     this.timer = null //定时器,用于检测同步状态
@@ -75,7 +75,7 @@ class Home extends Component {
75 75
           $store.app.setMarkSrc(
76 76
             setWaterMark({
77 77
               toDataURL: true,
78
-              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"),timestampToTime()],
78
+              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
79 79
             })
80 80
           );
81 81
         } else {
@@ -255,7 +255,7 @@ class Home extends Component {
255 255
   render() {
256 256
     const stores = this.store.state;
257 257
     let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
258
-    let { changGif, updateTime, changNun,leftName,rightName } = this.state;
258
+    let { changGif, updateTime, changNun, leftName, rightName } = this.state;
259 259
     return (
260 260
       <div className={"home_box"}>
261 261
         {/* 水印 */}

+ 14 - 7
src/router/router.js

@@ -16,6 +16,8 @@ import Home from '@pages/home/view.jsx';
16 16
 import HomeForchaBaiDao from '@pages/tqcDataVHome/view.jsx';
17 17
 import GVC from '@pages/gvc/view.jsx';
18 18
 import TLK from '@pages/tlk/view.jsx';
19
+import SiAl from '@pages/sial/view.jsx';
20
+
19 21
 import JurisDiction from '@pages/jurisDiction/view.jsx';
20 22
 import Loading from "@components/Loading/view.jsx";
21 23
 import $store from "@store/";
@@ -73,6 +75,11 @@ const routes = [
73 75
         path: "/home/tlk",
74 76
         component: TLK,
75 77
       },
78
+      {
79
+        name: "硅铝微粉数据中心",
80
+        path: "/home/sial",
81
+        component: SiAl,
82
+      },
76 83
     ],
77 84
   },
78 85
   {
@@ -121,13 +128,13 @@ function RouteComponent(props) {
121 128
   );
122 129
 }
123 130
 function CacheRouteComponent(props) {
124
-  return  <CacheSwitch>
125
-  {
126
-    props.cacheRoutes.map((route, idx) => {
127
-      return <CacheRoute cacheKey={RouterCache.urlName(route.path)} key={route.path} path={route.path} exact component={route.component} when="always" className="bottom_body" />
128
-    })
129
-  }
130
-</CacheSwitch>
131
+  return <CacheSwitch>
132
+    {
133
+      props.cacheRoutes.map((route, idx) => {
134
+        return <CacheRoute cacheKey={RouterCache.urlName(route.path)} key={route.path} path={route.path} exact component={route.component} when="always" className="bottom_body" />
135
+      })
136
+    }
137
+  </CacheSwitch>
131 138
 }
132 139
 /*  */
133 140
 RouteComponent.propTypes = {

+ 5 - 5
src/utils/util.js

@@ -998,17 +998,17 @@ export function getThousandNum(num, need100) {
998 998
 
999 999
 //大屏转跳-去除缓存
1000 1000
 export function deleteCacheAndChangeUrl(next = 'left', callback, needName) {//needName 获取名称
1001
-  const screenName = ["/home/operation", "/home/gvc", "/home/tlk"];
1002
-  const names = ["运营数据中心", "产供销价值链", "TLK运营数据中心 / TLK Plant Dashboard"];
1001
+  const screenName = ["/home/operation", "/home/gvc", "/home/tlk", "/home/sial"];
1002
+  const names = ["运营数据中心", "产供销价值链", "TLK运营数据中心 / TLK Plant Dashboard", "硅铝微粉数据中心"];
1003 1003
   const HasScreen = localStorage.getItem("tqcHasScreen")?.split(",") || [];
1004 1004
   const currUrl = window.location.hash.split("#")[1];
1005 1005
   //检测是否含有当前页面的路径
1006 1006
   if (!HasScreen.includes(currUrl)) {
1007 1007
     message.error("您没有当前路径的权限!").then(() => {
1008 1008
       setTimeout(() => {
1009
-        if(HasScreen && HasScreen[0]){
1010
-          window.location = window.location.href.split('/transfer.html')[0] + '/transfer.html#'+HasScreen[0];
1011
-        }else{
1009
+        if (HasScreen && HasScreen[0]) {
1010
+          window.location = window.location.href.split('/transfer.html')[0] + '/transfer.html#' + HasScreen[0];
1011
+        } else {
1012 1012
           window.location = window.location.href.split('/transfer.html')[0] + '/transfer.html#/login';
1013 1013
         }
1014 1014
       }, 300)