yuzipei před 2 týdny
rodič
revize
c3e8a48a27

+ 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
       }

+ 217 - 85
src/assets/css/styleTemplate.less

@@ -17,7 +17,8 @@
17 17
     min-width: 400px;
18 18
     width: 95%;
19 19
     height: 90%;
20
-    >div{
20
+
21
+    >div {
21 22
       text-align: left;
22 23
     }
23 24
   }
@@ -244,8 +245,9 @@
244 245
     background-color: #0a091e;
245 246
 
246 247
   }
248
+
247 249
   #app .tlkTop2 {
248
-    background: url(../imgs/dataVimg/topBg2.png) no-repeat 0 0 / 100% 100% #0a091e!important;
250
+    background: url(../imgs/dataVimg/topBg2.png) no-repeat 0 0 / 100% 100% #0a091e !important;
249 251
   }
250 252
 
251 253
   #app .top {
@@ -354,15 +356,17 @@
354 356
     width: 100%;
355 357
     height: 100%;
356 358
     background: url(../imgs/dataVimg/homeBgDataV.png) no-repeat 0 -10em / 100% 120% #041b40;
357
-    .rightJ_png{
359
+
360
+    .rightJ_png {
358 361
       position: absolute;
359
-        z-index: 99;
360
-        width: 2em;
361
-        right: 0.8em;
362
-        top: 44%;
363
-        opacity: .5;
362
+      z-index: 99;
363
+      width: 2em;
364
+      right: 0.8em;
365
+      top: 44%;
366
+      opacity: .5;
364 367
     }
365
-    .rightJ_png_L{
368
+
369
+    .rightJ_png_L {
366 370
       right: unset;
367 371
       left: 0.8em;
368 372
     }
@@ -390,8 +394,9 @@
390 394
         padding: 1% 0 0 10%;
391 395
       }
392 396
     }
397
+
393 398
     @media (max-height: 900px) {
394
-      .video_box{
399
+      .video_box {
395 400
         top: -2em;
396 401
       }
397 402
 
@@ -428,6 +433,117 @@
428 433
         font-family: "DingTalk JinBuTi";
429 434
       }
430 435
 
436
+      .topMsgCommond {
437
+        width: 100%;
438
+        height: 100%;
439
+
440
+        .topMsg_content {
441
+          height: calc(100% - 1em);
442
+          font-size: 2em;
443
+          color: #69FFDE;
444
+          background: url(../imgs/dataVimg/sunGong.gif) no-repeat 48% 0/86% 100%;
445
+          text-align: center;
446
+          display: flex;
447
+          align-items: center;
448
+          justify-content: center;
449
+
450
+          .topMsg_box {
451
+            width: 52%;
452
+
453
+            .topMsg_number_p {
454
+              font-size: 0.5em;
455
+              line-height: 0em;
456
+              color: #fff;
457
+              font-weight: 100;
458
+              margin-top: 0.8em;
459
+            }
460
+          }
461
+
462
+          .topMsg_number_2 {
463
+            font-size: 0.5em;
464
+          }
465
+        }
466
+
467
+        .changBg_topMsg_content {
468
+          background: url(../imgs/dataVimg/sunGong2.gif) no-repeat 48% 0/86% 100%;
469
+        }
470
+
471
+        .icon_c {
472
+          width: 100%;
473
+          display: flex;
474
+          align-items: flex-start;
475
+          justify-content: unset !important;
476
+          flex-wrap: wrap;
477
+          height: calc(100% - 40px);
478
+          overflow-y: scroll;
479
+
480
+          .icon_p {
481
+            width: 33%;
482
+            display: flex;
483
+            align-items: center;
484
+            justify-content: center;
485
+            flex-wrap: wrap;
486
+            padding: 2px 0;
487
+            cursor: pointer;
488
+            position: relative;
489
+
490
+            >i {
491
+              display: flex;
492
+              width: 54px;
493
+              height: 54px;
494
+              background: @dy-active;
495
+              color: #fff;
496
+              border-radius: 50%;
497
+              text-align: center;
498
+              justify-content: center;
499
+              line-height: 50px;
500
+              font-size: 23px;
501
+              font-style: normal;
502
+              font-weight: 700;
503
+            }
504
+
505
+            >span {
506
+              display: flex;
507
+              width: 100%;
508
+              justify-content: center;
509
+              margin-top: 5px;
510
+            }
511
+
512
+            .delectt {
513
+              display: none;
514
+              position: absolute;
515
+              background: #ff3737;
516
+              width: 20px;
517
+              height: 20px;
518
+              border-radius: 50%;
519
+              line-height: 13px;
520
+              font-size: 28px;
521
+              top: 0;
522
+              right: 14px;
523
+              color: #fff;
524
+            }
525
+          }
526
+
527
+          .icon_p:hover {
528
+            .delectt {
529
+              display: block;
530
+            }
531
+          }
532
+        }
533
+
534
+        .icon_c::-webkit-scrollbar {
535
+          display: none;
536
+          scrollbar-width: none;
537
+          -ms-overflow-style: none;
538
+        }
539
+
540
+        .icon_c:hover::-webkit-scrollbar {
541
+          display: unset;
542
+          scrollbar-width: unset;
543
+          -ms-overflow-style: unset;
544
+        }
545
+      }
546
+
431 547
       .leftContent {
432 548
         width: 28%;
433 549
         height: 88%;
@@ -523,20 +639,23 @@
523 639
                   font-size: 0.9em;
524 640
                 }
525 641
               }
642
+
526 643
               @media (min-height: 900px) {
527
-                .name_ul{
528
-                  top:1.5em
644
+                .name_ul {
645
+                  top: 1.5em
529 646
                 }
530 647
               }
531 648
 
532 649
 
533
-              #echarts4,#echarts41,
650
+              #echarts4,
651
+              #echarts41,
534 652
               #echarts6_box {
535 653
                 width: 45%;
536 654
                 height: 90%;
537 655
               }
538 656
 
539
-              #echarts4,#echarts41 {
657
+              #echarts4,
658
+              #echarts41 {
540 659
                 width: 55%;
541 660
               }
542 661
 
@@ -571,7 +690,8 @@
571 690
                   }
572 691
                 }
573 692
 
574
-                #echarts6,#echarts61 {
693
+                #echarts6,
694
+                #echarts61 {
575 695
                   width: 100%;
576 696
                   height: 100%;
577 697
                 }
@@ -607,7 +727,10 @@
607 727
             align-items: center;
608 728
             justify-content: center;
609 729
 
610
-            #chartmain,#chartmain2 {
730
+            #chartmain,
731
+            #chartSend,
732
+            #chartProduct,
733
+            #chartmain2 {
611 734
               min-width: 300px;
612 735
               width: 90%;
613 736
               height: 100%;
@@ -652,12 +775,14 @@
652 775
           display: flex;
653 776
           align-items: center;
654 777
 
655
-          #echarts5,#echarts51 {
778
+          #echarts5,
779
+          #echarts51 {
656 780
             min-width: 400px;
657 781
             width: 100%;
658 782
             height: 80%;
659 783
           }
660
-          #echarts51{
784
+
785
+          #echarts51 {
661 786
             height: 90%;
662 787
           }
663 788
         }
@@ -702,79 +827,80 @@
702 827
         -ms-overflow-style: unset;
703 828
       }
704 829
 
830
+      .topMsg_2 .topMsg_content {
831
+        height: 80%;
832
+      }
705 833
 
706
-      .rightContent {
707
-        width: 28%;
708
-        height: 88%;
709
-        z-index: 9;
710
-        .bottomContent2{
711
-          width: 100%;
712
-          height: 28%;
713
-        }
834
+      .topMsg_22 {
835
+        width: 100%;
836
+        height: 28%;
837
+      }
714 838
 
715
-        .topMsg_2 .topMsg_content {
716
-          height: 80%;
717
-        }
839
+      .topMsg_33 {
840
+        width: 100%;
841
+        height: 22%;
842
+        margin-bottom: 2%;
843
+      }
718 844
 
719
-        .topMsg_22 {
720
-          width: 100%;
721
-          height: 28%;
722
-        }
845
+      .topMsg_2,
846
+      .topMsg_3 {
847
+        width: 100%;
848
+        height: 100%;
849
+      }
723 850
 
724
-        .topMsg_33 {
725
-          width: 100%;
726
-          height: 22%;
727
-          margin-bottom: 2%;
728
-        }
851
+      .topMsg_4 {
852
+        width: 100%;
853
+        height: 22%;
854
+      }
729 855
 
730
-        .topMsg_2,
731
-        .topMsg_3 {
732
-          width: 100%;
733
-          height: 100%;
734
-        }
856
+      .topMsg_3 {
857
+        .topMsg_content {
858
+          height: calc(100% - 1em);
859
+          line-height: 2.8em;
860
+          font-size: 1.8em;
861
+          color: #69FFDE;
862
+          background: url(../imgs/dataVimg/wanchanglv.gif) no-repeat center center/ 71% 99%;
863
+          display: flex;
864
+          align-items: center;
865
+          justify-content: center;
735 866
 
736
-        .topMsg_4 {
737
-          width: 100%;
738
-          height: 22%;
739
-        }
867
+          .topMsg_number_2 {
868
+            font-size: 0.5em;
869
+          }
740 870
 
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;
871
+          .topMsg_number_p {
872
+            font-size: 0.5em;
873
+            line-height: 0em;
874
+            color: #fff;
875
+            font-weight: 100;
876
+            margin-top: -1.5em;
877
+          }
751 878
 
752
-            .topMsg_number_2 {
753
-              font-size: 0.5em;
754
-            }
879
+        }
755 880
 
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
-            }
881
+        .changBg_topMsg_content {
882
+          background: url(../imgs/dataVimg/wanchanglv2.gif) no-repeat center center / 84% 98%;
883
+        }
763 884
 
764
-          }
885
+      }
765 886
 
766
-          .changBg_topMsg_content {
767
-            background: url(../imgs/dataVimg/wanchanglv2.gif) no-repeat center center / 84% 98%;
768
-          }
887
+      .topMsg2 {
888
+        width: 100%;
889
+        height: 20%;
890
+        margin-bottom: 3%;
891
+      }
769 892
 
770
-        }
893
+      .rightContent {
894
+        width: 28%;
895
+        height: 88%;
896
+        z-index: 9;
771 897
 
772
-        .topMsg2 {
898
+        .bottomContent2 {
773 899
           width: 100%;
774
-          height: 20%;
775
-          margin-bottom: 3%;
900
+          height: 28%;
776 901
         }
777 902
 
903
+
778 904
         .topMsg {
779 905
           width: 100%;
780 906
           height: 100%;
@@ -934,11 +1060,13 @@
934 1060
               justify-content: center;
935 1061
             }
936 1062
 
937
-            #echarts2,#echarts21 {
1063
+            #echarts2,
1064
+            #echarts21 {
938 1065
               min-width: 600px;
939 1066
               width: 95%;
940 1067
               height: 90%;
941
-              >div{
1068
+
1069
+              >div {
942 1070
                 text-align: left;
943 1071
               }
944 1072
             }
@@ -950,8 +1078,9 @@
950 1078
           background: url(../imgs/dataVimg/toplineB.png) no-repeat 0 bottom / 100% 11%;
951 1079
           height: 78%;
952 1080
         }
1081
+
953 1082
         @media (min-height: 900px) {
954
-          .center_li{
1083
+          .center_li {
955 1084
             height: 60%;
956 1085
           }
957 1086
         }
@@ -1194,7 +1323,7 @@
1194 1323
   .cbRightBottomView {
1195 1324
     flex-wrap: wrap;
1196 1325
     position: relative;
1197
-    
1326
+
1198 1327
     .right_b_tip2 {
1199 1328
       width: 46%;
1200 1329
       display: block;
@@ -1215,13 +1344,16 @@
1215 1344
       text-align: right;
1216 1345
     }
1217 1346
   }
1218
-.slider_item_box{
1219
-  justify-content: left;
1220
-  .slick-slider{
1221
-    width: 90%;
1222
-    color: #fff;
1347
+
1348
+  .slider_item_box {
1349
+    justify-content: left;
1350
+
1351
+    .slick-slider {
1352
+      width: 90%;
1353
+      color: #fff;
1354
+    }
1223 1355
   }
1224
-}
1356
+
1225 1357
   .testDiv {
1226 1358
     width: 4em;
1227 1359
     display: flex;

binární
src/assets/imgs/dataVImg/gvcbg.png


+ 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
       }} />

+ 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/videoGvc.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
           {

+ 89 - 68
src/pages/gvc/style.less

@@ -28,31 +28,38 @@
28 28
           padding: 0;
29 29
         }
30 30
 
31
+        img {
32
+          width: 100%;
33
+          height: unset;
34
+          padding: 0;
35
+        }
36
+
37
+
31 38
         .alls {
32 39
 
33
-          width: 64%;
40
+          width: 70%;
34 41
           height: unset;
35 42
           padding: 2% 0 0 0;
36 43
           position: relative;
37 44
         }
38 45
 
39
-        @media (min-height: 800px) {
40
-          .alls {
41
-            width: 73%;
42
-          }
43
-        }
46
+        // @media (min-height: 800px) {
47
+        //   .alls {
48
+        //     width: 73%;
49
+        //   }
50
+        // }
44 51
 
45
-        @media (min-height: 900px) {
46
-          .alls {
47
-            width: 64%;
48
-          }
49
-        }
52
+        // @media (min-height: 900px) {
53
+        //   .alls {
54
+        //     width: 64%;
55
+        //   }
56
+        // }
50 57
 
51
-        @media (min-height: 1000PX) {
52
-          .alls {
53
-            width: 70%;
54
-          }
55
-        }
58
+        // @media (min-height: 1000PX) {
59
+        //   .alls {
60
+        //     width: 70%;
61
+        //   }
62
+        // }
56 63
 
57 64
       }
58 65
 
@@ -144,10 +151,11 @@
144 151
         }
145 152
 
146 153
         @media (max-height: 900px) {
147
-          .leftContent{
154
+          .leftContent {
148 155
             margin-top: 1%;
149 156
             height: 75%;
150 157
           }
158
+
151 159
           .leftContent li {
152 160
             height: 23% !important;
153 161
 
@@ -165,8 +173,8 @@
165 173
 
166 174
 
167 175
         .centerCon {
168
-          width: 62%;
169
-          height: 80%;
176
+          width: 63%;
177
+          height: 75%;
170 178
           padding: 0;
171 179
           position: relative;
172 180
           margin: 0% 0 0 -1%;
@@ -177,8 +185,10 @@
177 185
             position: absolute;
178 186
             left: 53%;
179 187
             top: 36%;
180
-            -webkit-animation: antSpinMove 8s linear infinite;;
181
-            animation: antSpinMove 8s linear infinite;;
188
+            -webkit-animation: antSpinMove 8s linear infinite;
189
+            ;
190
+            animation: antSpinMove 8s linear infinite;
191
+            ;
182 192
 
183 193
             >img {
184 194
               width: 100%;
@@ -187,52 +197,61 @@
187 197
 
188 198
         }
189 199
 
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 200
 
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 201
 
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
-        }
202
+        // @media (min-height: 800px) {
203
+        //   .centerCon {
204
+        //     width: 65%;
205
+        //     height: 78%;
206
+        //     padding: 0;
207
+        //     position: relative;
208
+        //     margin: 0% 0 0 -3%;
209
+
210
+        //     .rightCar {
211
+        //       -webkit-animation: antSpinMove900 8s linear infinite;
212
+        //       ;
213
+        //       animation: antSpinMove900 8s linear infinite;
214
+        //       ;
215
+
216
+        //     }
217
+        //   }
218
+
219
+        // }
220
+
221
+        // @media (min-height: 900px) {
222
+        //   .centerCon {
223
+        //     width: 62%;
224
+        //     height: 80%;
225
+        //     padding: 0;
226
+        //     position: relative;
227
+        //     margin: 0% 0 0 -1%;
228
+
229
+        //     .rightCar {
230
+        //       -webkit-animation: antSpinMove 8s linear infinite;
231
+        //       ;
232
+        //       animation: antSpinMove 8s linear infinite;
233
+        //       ;
234
+        //     }
235
+        //   }
236
+        // }
237
+
238
+        // @media (min-height: 1000PX) {
239
+        //   .centerCon {
240
+        //     width: 63%;
241
+        //     height: 75%;
242
+        //     padding: 0;
243
+        //     position: relative;
244
+        //     margin: 0% 0 0 -3%;
245
+
246
+        //     .rightCar {
247
+        //       -webkit-animation: antSpinMove1100 8s linear infinite;
248
+        //       ;
249
+        //       animation: antSpinMove1100 8s linear infinite;
250
+        //       ;
251
+
252
+        //     }
253
+        //   }
254
+        // }
236 255
 
237 256
 
238 257
         .imgMsg {
@@ -330,11 +349,12 @@
330 349
               }
331 350
             }
332 351
           }
352
+
333 353
           @media (max-height: 900px) {
334
-            li .hoverDiv{
335
-              background:linear-gradient(0deg, #292929 0%, #252525 100%)!important;
354
+            li .hoverDiv {
355
+              background: linear-gradient(0deg, #292929 0%, #252525 100%) !important;
336 356
             }
337
-  
357
+
338 358
           }
339 359
 
340 360
 
@@ -342,6 +362,7 @@
342 362
             background: linear-gradient(0deg, #42ca9840 0%, #42ca9800 98%);
343 363
           }
344 364
         }
365
+
345 366
         @media (max-height: 900px) {
346 367
           .imgMsg {
347 368
             top: -1.5em;

+ 23 - 16
src/pages/gvc/view.jsx

@@ -24,6 +24,8 @@ import {
24 24
 } from "./api";
25 25
 import MapViewTwo from "./component/mapView2.jsx";
26 26
 import mpVideoGvc from "@assets/imgs/dataVimg/videoGvc2.mp4";
27
+import 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) {
192
+        console.log('getUrl2', data)
190 193
         const name_ = ["", "锂辉石(化学级)库存量", "锂辉石(化学级)库存量", "累计运输锂辉石(化学级)"];
191
-        const style__ = [{}, { left: "34%", top: "30%" }, { left: "11%", top: "48%" }, { left: "0%", top: "22%" }]
194
+        const style__ = [{}, { left: "28%", top: "40%", width: '12em' }, { left: "5%", top: "55%", width: '12em' }, { left: "-3%", top: "27%", width: '12em' }]
192 195
         data = data.map((x, i) => {
193 196
           return {
194 197
             ...x,
@@ -208,7 +211,7 @@ class Gvc extends Component {
208 211
         old_imgMsgData[1] = d_2;
209 212
         old_imgMsgData[2] = d_3;
210 213
 
211
-        this.setState({ LeftHtml:[...[{txt_name:'锂辉石(化学级)',num1:d_4?.indexValue}],...this.state.LeftHtml] });
214
+        this.setState({ LeftHtml: [...[{ txt_name: '锂辉石(化学级)', num1: d_4?.indexValue }], ...this.state.LeftHtml] });
212 215
         this.store.saveState({ imgMsgData: old_imgMsgData });
213 216
       }
214 217
     });
@@ -216,7 +219,8 @@ class Gvc extends Component {
216 219
   async getUrl4() {
217 220
     await smallShopService().then(({ data = [], resultCode }) => {
218 221
       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%" }]
222
+        console.log('getUrl4', data)
223
+        const style__ = [{}, { left: "49%", top: "24%" }, { left: "32%", top: "73%" }, { left: "53%", top: "57%" }, { left: "71%", top: "44%" }, { left: "16%", top: "86%" }]
220 224
         data = data.map((x, i) => {
221 225
           return {
222 226
             ...x,
@@ -227,11 +231,11 @@ class Gvc extends Component {
227 231
             inventory: x.inventory,
228 232
           }
229 233
         });
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];
234
+        const d_1 = data.filter(x => { return x.factoryCode == 5 })[0];//江苏
235
+        const d_2 = data.filter(x => { return x.factoryCode == 4 })[0];//重庆
236
+        const d_3 = data.filter(x => { return x.factoryCode == 3 })[0];//射洪
237
+        const d_4 = data.filter(x => { return x.factoryCode == 2 })[0];//安居
238
+        const d_5 = data.filter(x => { return x.factoryCode == 1 })[0];//外加工厂
235 239
         let old_imgMsgData = this.store.state.imgMsgData;
236 240
         old_imgMsgData[3] = d_1;
237 241
         old_imgMsgData[4] = d_2;
@@ -251,6 +255,7 @@ class Gvc extends Component {
251 255
   async getUrl5() {
252 256
     await smallDayService().then(({ data = [], resultCode }) => {
253 257
       if (+resultCode === 0) {
258
+        console.log('getUrl5', data)
254 259
         function getItems(num) {
255 260
           const datas = data.filter(x => { return x.factoryCode == num });
256 261
           const par = {
@@ -286,6 +291,7 @@ class Gvc extends Component {
286 291
   async getUrl6() {
287 292
     await smallMaterialService().then(({ data = [], resultCode }) => {
288 293
       if (+resultCode === 0) {
294
+        console.log('getUrl6', data)
289 295
         function getItems(num) {
290 296
           const datas = data.filter(x => { return x.factoryCode == num });
291 297
           let rawMaterial = datas.map((item, index) => {
@@ -381,7 +387,7 @@ class Gvc extends Component {
381 387
   render() {
382 388
     const stores = this.store.state;
383 389
     let { totalValue, yearDecline, yearSend, imgMsgData } = this.store.state;
384
-    let { LeftHtml, updateTime, changGif,leftName,rightName } = this.state;
390
+    let { LeftHtml, updateTime, changGif, leftName, rightName } = this.state;
385 391
     return (
386 392
       <div className={[styles.gvc_home + ' home_box ']}>
387 393
         {/* 水印 */}
@@ -408,11 +414,12 @@ class Gvc extends Component {
408 414
 
409 415
         <div className={"all_box"}>
410 416
           {/* 视频播放器 */}
411
-          <MapViewTwo></MapViewTwo>
417
+          {/* <MapViewTwo></MapViewTwo> */}
412 418
           <div className={"video_box gvc_video"}>
413 419
             <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">
415
-              </video>
420
+              {/* <video src={mpVideoGvc} playbackRate={0.5} autoplay="autoplay" loop="loop" class="video_box_2 animate__animated animate__fadeIn animate__delay-2s">
421
+              </video> */}
422
+              <img src={require("@assets/imgs/dataVimg/gvcbg.png").default} alt="" class="video_box_2 center_box2 animate__animated animate__fadeIn animate__delay-2s" />
416 423
             </div>
417 424
 
418 425
           </div>
@@ -428,9 +435,9 @@ class Gvc extends Component {
428 435
             </div>
429 436
 
430 437
             <div className="centerCon">
431
-              <p className="rightCar">
438
+              {/* <p className="rightCar">
432 439
                 <img src={require("@assets/imgs/gvc/car.png").default} alt="" />
433
-              </p>
440
+              </p> */}
434 441
               <ul className="imgMsg">
435 442
                 {
436 443
                   toJS(imgMsgData).map((item, index) => {

+ 232 - 0
src/pages/sial/api.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/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/1356250124518724729",
80
+    method: "POST",
81
+    data: {
82
+      "apiId": "1356250124518724729",
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: '46847fe90889330f13cdc3318d848d45',
97
+      account: 'yunxi_fuxue',
98
+      'Cache-Control': 'no-cache',
99
+      apiId: '1356250124518724729',
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/1356243326548087867",
111
+    method: "POST",
112
+    data: {
113
+      "apiId": "1356243326548087867",
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: '2f079b53e1e63b753bb6f9807f6c6818',
127
+      account: 'yunxi_fuxue',
128
+      'Cache-Control': 'no-cache',
129
+      apiId: '1356243326548087867',
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/1356244872119751767",
142
+    method: "POST",
143
+    data: {
144
+      "apiId": "1356244872119751767",
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: 'ef3ecc442896d925cc02d36f1107d9e3',
160
+      account: 'yunxi_fuxue',
161
+      'Cache-Control': 'no-cache',
162
+      apiId: '1356244872119751767',
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/1356411403496625359",
174
+    method: "POST",
175
+    data: {
176
+      "apiId": "1356411403496625359",
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: '9c472223a9acbdb9f16bebb7002e0c40',
193
+      account: 'yunxi_fuxue',
194
+      'Cache-Control': 'no-cache',
195
+      apiId: '1356411403496625359',
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
+

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

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

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

@@ -0,0 +1,109 @@
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('.video1');
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 video_box_hide animate__animated animate__fadeOut animate__delay-2s animate__slower">
104
+          <video src={require("@assets/imgs/dataVImg/homeVideo.mp4").default} autoplay="autoplay" class="video1"></video>
105
+      </div>
106
+    )
107
+  }
108
+}
109
+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
+      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('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;

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

@@ -0,0 +1,376 @@
1
+@import url("../../themes/themes.less");
2
+
3
+@assetUrl: "../../assets/imgs/home";
4
+
5
+.bg_after {
6
+  content: "";
7
+  display: block;
8
+  bottom: 0;
9
+  position: absolute;
10
+  width: 100%;
11
+  height: 10px;
12
+}
13
+
14
+
15
+.home {
16
+  position: relative;
17
+  .insert {
18
+    position: absolute;
19
+    z-index: 4;
20
+    width: 100%;
21
+    left: 0;
22
+    top: 0;
23
+    height: 100vh;
24
+    padding: 16px;
25
+    .user {
26
+      background: #fff;
27
+      border-radius: 6px;
28
+      padding: 12px;
29
+      text-align: left;
30
+      margin-bottom: 12px;
31
+      font-size: 12px;
32
+    }
33
+    .notice {
34
+      background: #fff;
35
+      border-radius: 6px;
36
+      padding: 12px;
37
+      text-align: left;
38
+      font-size: 12px;
39
+      margin-bottom: 12px;
40
+      &>*:not(:first-child){
41
+        margin-top: 8px;
42
+      }
43
+    }
44
+    .documents {
45
+      background: #fff;
46
+      border-radius: 6px;
47
+      padding: 12px;
48
+      text-align: left;
49
+      font-size: 12px;
50
+      &>*:not(:first-child){
51
+        margin-top: 8px;
52
+      }
53
+    }
54
+  }
55
+  :global {
56
+    // background: url(../../../public/bg_home.png) 50% 50% no-repeat;
57
+    background-color: #041747;
58
+    background-size: cover;
59
+    text-align: center;
60
+    padding: 0 33px 113px 33px;
61
+    height: 100%;
62
+    .titles {
63
+      padding-top: 52px;
64
+      display: inline-block;
65
+      .big_title {
66
+        font-size: 40px;
67
+        color: #ffffff;
68
+        letter-spacing: 5px;
69
+        text-align: center;
70
+        font-weight: bold;
71
+      }
72
+      .sub_title {
73
+        margin-top: 15px;
74
+        display: flex;
75
+        justify-content: space-between;
76
+        position: relative;
77
+        width: 100%;
78
+        opacity: 0.4;
79
+        font-family: PingFangSC-Regular;
80
+        font-size: 20px;
81
+        color: #ffffff;
82
+        letter-spacing: 0.7px;
83
+        &::after,
84
+        &::before {
85
+          height: 1px;
86
+          width: 37px;
87
+          position: absolute;
88
+          top: 50%;
89
+          content: "";
90
+          display: block;
91
+        }
92
+        &::after {
93
+          background-image: linear-gradient(
94
+            90deg,
95
+            rgba(255, 255, 255, 0.3) 0%,
96
+            rgba(255, 255, 255, 1) 100%
97
+          );
98
+          left: -46px;
99
+        }
100
+        &::before {
101
+          background-image: linear-gradient(
102
+            90deg,
103
+            rgba(255, 255, 255, 1) 0%,
104
+            rgba(255, 255, 255, 0.3) 100%
105
+          );
106
+          right: -46px;
107
+        }
108
+      }
109
+    }
110
+    .player {
111
+      margin-top: 54px;
112
+      display: flex;
113
+      justify-content: space-between;
114
+      & > li {
115
+        position: relative;
116
+        cursor: pointer;
117
+        text-align: center;
118
+        width: 1%;
119
+        flex-grow: 1;
120
+        transition: all 0.3s;
121
+        &:not(:last-child) {
122
+          margin-right: 1%;
123
+        }
124
+
125
+        .not_open_card {
126
+          display: none;
127
+        }
128
+
129
+        &.toggle_stat {
130
+          .nor_card {
131
+            display: block;
132
+          }
133
+
134
+          &:hover > .nor_card {
135
+            display: none;
136
+          }
137
+          &:hover > .not_open_card {
138
+            display: block;
139
+          }
140
+
141
+          .tips {
142
+            text-align: center;
143
+            font-size: 16px;
144
+            color: rgba(255, 255, 255, 0.5);
145
+            margin-top: -5px;
146
+          }
147
+          .tips_img {
148
+            width: 60%;
149
+            margin-top: 30%;
150
+          }
151
+        }
152
+      }
153
+    }
154
+
155
+    .bg_1 {
156
+      background: rgba(69, 163, 109, 0.3);
157
+      border: none;
158
+
159
+      &:hover {
160
+        background: rgba(69, 163, 109, 0.5);
161
+        transform: translateY(-30px);
162
+        box-shadow: 0 0 0 1px #45a36d inset;
163
+        background-image: radial-gradient(
164
+          120px 60px ellipse at 50% 100%,
165
+          rgba(42, 186, 128, 0.8) 0%,
166
+          rgba(42, 186, 128, 0) 90%,
167
+          transparent 0
168
+        );
169
+        &::after {
170
+          content: "";
171
+          display: block;
172
+          bottom: -5px;
173
+          position: absolute;
174
+          width: 100%;
175
+          height: 10px;
176
+          background: url("@{assetUrl}/bg_light1.png") 50% 50% no-repeat;
177
+        }
178
+      }
179
+    }
180
+
181
+    .bg_2 {
182
+      background: rgba(38, 149, 140, 0.3);
183
+      border: none;
184
+      &:hover {
185
+        background: rgba(38, 149, 140, 0.5);
186
+        transform: translateY(-30px);
187
+        box-shadow: 0 0 0 1px #26958c inset;
188
+        background-image: radial-gradient(
189
+          120px 60px ellipse at 50% 100%,
190
+          rgba(0, 199, 207, 0.8) 0%,
191
+          rgba(0, 199, 207, 0) 90%,
192
+          transparent 0
193
+        );
194
+        &::after {
195
+          content: "";
196
+          display: block;
197
+          bottom: -5px;
198
+          position: absolute;
199
+          width: 100%;
200
+          height: 10px;
201
+          background: url("@{assetUrl}/bg_light2.png") 50% 50% no-repeat;
202
+        }
203
+      }
204
+    }
205
+
206
+    .bg_3 {
207
+      background: rgba(122, 89, 202, 0.3);
208
+      border: none;
209
+      &:hover {
210
+        background: rgba(122, 89, 202, 0.5);
211
+        transform: translateY(-30px);
212
+        box-shadow: 0 0 0 1px #a27cff inset;
213
+        background-image: radial-gradient(
214
+          120px 60px ellipse at 50% 100%,
215
+          rgba(181, 151, 255, 0.8) 0%,
216
+          rgba(181, 151, 255, 0) 90%,
217
+          transparent 0
218
+        );
219
+        &::after {
220
+          content: "";
221
+          display: block;
222
+          bottom: -5px;
223
+          position: absolute;
224
+          width: 100%;
225
+          height: 10px;
226
+          background: url("@{assetUrl}/bg_light3.png") 50% 50% no-repeat;
227
+        }
228
+      }
229
+    }
230
+
231
+    .bg_4 {
232
+      background: rgba(37, 90, 199, 0.3);
233
+      border: none;
234
+      &:hover {
235
+        background: rgba(37, 90, 199, 0.5);
236
+        transform: translateY(-30px);
237
+        box-shadow: 0 0 0 1px #6899ff inset;
238
+        background-image: radial-gradient(
239
+          120px 60px ellipse at 50% 100%,
240
+          rgba(73, 181, 255, 0.8) 0%,
241
+          rgba(73, 181, 255, 0) 90%,
242
+          transparent 0
243
+        );
244
+        &::after {
245
+          content: "";
246
+          display: block;
247
+          bottom: -5px;
248
+          position: absolute;
249
+          width: 100%;
250
+          height: 10px;
251
+          background: url("@{assetUrl}/bg_light4.png") 50% 50% no-repeat;
252
+        }
253
+      }
254
+    }
255
+
256
+    .bg_5 {
257
+      background: rgba(6, 159, 199, 0.3);
258
+      border: none;
259
+      &:hover {
260
+        background: rgba(6, 159, 199, 0.5);
261
+        transform: translateY(-30px);
262
+        box-shadow: 0 0 0 1px #41bad9 inset;
263
+        background-image: radial-gradient(
264
+          120px 60px ellipse at 50% 100%,
265
+          rgba(58, 223, 255, 0.8) 0%,
266
+          rgba(58, 223, 255, 0) 90%,
267
+          transparent 0
268
+        );
269
+        &::after {
270
+          content: "";
271
+          display: block;
272
+          bottom: -5px;
273
+          position: absolute;
274
+          width: 100%;
275
+          height: 10px;
276
+          background: url("@{assetUrl}/bg_light5.png") 50% 50% no-repeat;
277
+        }
278
+      }
279
+    }
280
+
281
+    .type_1 {
282
+      padding: 82px 0 75px 0;
283
+      .card_subtitle {
284
+        font-size: 14px;
285
+        color: #fff;
286
+        margin-top: 48px;
287
+        margin-bottom: 48px;
288
+      }
289
+    }
290
+
291
+    .type_2 {
292
+      padding: 42px 0 65px 0;
293
+    }
294
+
295
+    .card_title {
296
+      font-size: 20px;
297
+      color: #ffffff;
298
+      font-weight: bold;
299
+      position: absolute;
300
+      bottom: 7%;
301
+      width: 100%;
302
+      text-align: center;
303
+    }
304
+
305
+    .text {
306
+      text-align: left;
307
+      display: flex;
308
+      justify-content: center;
309
+    }
310
+
311
+    .type1_sub {
312
+      font-size: 12px;
313
+      color: rgba(255, 255, 255, 0.7);
314
+    }
315
+    .type1_left {
316
+      font-size: 12px;
317
+      color: rgba(255, 255, 255, 0.7);
318
+      text-align: left;
319
+    }
320
+    .col_fff {
321
+      color: #ffffff;
322
+    }
323
+    .col_gray {
324
+      color: rgba(255, 255, 255, 0.7);
325
+    }
326
+
327
+    .fs12 {
328
+      font-size: 12px;
329
+    }
330
+
331
+    .fs14 {
332
+      font-size: 14px;
333
+    }
334
+
335
+    .mt4 {
336
+      margin-top: 4px;
337
+    }
338
+
339
+    .mt50 {
340
+      margin-top: 90px;
341
+    }
342
+
343
+    .linear {
344
+      width: 100%;
345
+      height: 1px;
346
+      background: linear-gradient(
347
+        90deg,
348
+        rgba(2, 199, 218, 0) 0%,
349
+        rgba(2, 199, 218, 0.5) 50%,
350
+        rgba(2, 199, 218, 0) 100%
351
+      );
352
+      transform-origin: center;
353
+      transform: rotate(-45deg);
354
+      margin-top: 60px;
355
+      margin-bottom: 15px;
356
+    }
357
+
358
+    .min_w {
359
+      min-width: 40%;
360
+    }
361
+  }
362
+}
363
+.add_common_report {
364
+  display: flex;
365
+  align-items: center;
366
+
367
+  >div {
368
+    display: flex;
369
+    align-items: center;
370
+    overflow: hidden;
371
+    text-overflow: ellipsis;
372
+    white-space: nowrap;
373
+    white-space: nowrap;
374
+  }
375
+}
376
+

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

@@ -0,0 +1,499 @@
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 MapView from "./component/mapView.jsx";
29
+import $store from "@store/";
30
+import {
31
+  timeService,
32
+  numberService,
33
+  checkToken,
34
+  updateTimeService
35
+} from "./api";
36
+import { getThousandNum, deleteCacheAndChangeUrl, timestampToTime, setWaterMark } from "@utils/util";
37
+import {
38
+  fullscreen,
39
+} from "@ant-design/icons";
40
+import 'animate.css';
41
+@withRouter
42
+
43
+class Home extends Component {
44
+  // 构造函数,组件的实例创建时,最先执行
45
+  constructor(props, context) {
46
+    super(props, context);
47
+    this.store = mod;
48
+    this.state = {
49
+      updateTime: '',
50
+      changGif: false,
51
+      changNun: false,
52
+      plannedCompletionData: [
53
+      ],
54
+      plannedCompletionNum: 1,
55
+      manHourData: [
56
+      ],
57
+      manHourNum: 1,
58
+      leftName: deleteCacheAndChangeUrl("left", false, true),
59
+      rightName: deleteCacheAndChangeUrl("right", false, true),
60
+
61
+    };
62
+    this.timer = null //定时器,用于检测同步状态
63
+  }
64
+  componentWillMount() {
65
+    if (window.location.host.indexOf("localhost") == -1) {
66
+      this.getToken()
67
+    }
68
+  }
69
+
70
+  async getToken() {
71
+    if (!sessionStorage.getItem("tqcVToken")) {
72
+      this.props.history.replace("/home/index");
73
+    } else {
74
+      await checkToken(sessionStorage.getItem("tqcVToken")).then(({ data, resultCode }) => {
75
+        if (data?.userId) {
76
+          sessionStorage.setItem("tqcUserName", data?.userId);
77
+          $store.app.setMarkSrc(
78
+            setWaterMark({
79
+              toDataURL: true,
80
+              waterMarkText: [data?.userId || sessionStorage.getItem("tqcUserName"), timestampToTime()],
81
+            })
82
+          );
83
+        } else {
84
+          window.location = window.location.origin + '/transfer.html#/login';
85
+          // this.props.history.replace("/home/index");
86
+        }
87
+      });
88
+    }
89
+  }
90
+  componentDidMount() {
91
+    this.fontMsgChange();
92
+    this.getUrl();
93
+    this.getUrl2()
94
+    this.getUrl3();
95
+    setTimeout(() => {
96
+      this.videoStart();
97
+    }, 200)
98
+    setTimeout(() => {
99
+      //替换gif
100
+      this.setState({ changGif: true });
101
+    }, 2000);
102
+    setTimeout(() => {
103
+      this.setState({ changNun: true });
104
+    }, 4500)
105
+
106
+  }
107
+  videoStart() {
108
+    /*     Chrome 浏览器的视频自动播放策略
109
+        1.始终允许静音模式下自动播放
110
+        2.在以下的情况中,带声音播放会被允许:
111
+          ①用户已经与当前的域进行了交互(也就是click,tap事件)。
112
+          ②在桌面设备上,用户的媒体参与度指数阈值已经超过,这意味着用户之前播放过有声视频。
113
+          ③用户已经将网站添加到移动设备上的主屏幕或允在桌面上安装了PWA。
114
+        3.顶部帧可以将自动播放权限委派给其iframe,来允许自动播放声音
115
+        
116
+        媒体参与度(Media Engagement)是指用户与媒体内容进行互动的程度,可以通过多个指标来衡量。这些指标主要包括观看时间、观看率、转化率、交互行为等。
117
+        可以通过:chrome://media-engagement/ 查看
118
+     */
119
+    const video = document.querySelector('.video2');
120
+    console.log(video.play());
121
+
122
+    const model = document.querySelector('.model')
123
+    const btn = document.querySelector('button')
124
+    // 第一种方法 引导用户去与页面交互实现播放
125
+    async function play() {
126
+      try {
127
+        await video.play();
128
+        //使用await的原因是因为video.play()方法返回的是一个Promise,所以在这里我们可以对他进行一些处理
129
+        model.style.display = 'none';
130
+        btn.removeEventListener('click', play);
131
+        // 如果他自动播放了就隐藏按钮,消除点击事件
132
+      } catch (err) {
133
+        model.style.display = 'block';
134
+        btn.addEventListener('click', play);
135
+        // 如果Promise返回的是error就引导用户点击按钮,在调用play方法
136
+      }
137
+    }
138
+    play();
139
+
140
+    //第二种方法比较主流,类似的有网页版抖音以及B站
141
+    function play() {
142
+      video.muted = true;//设置视频为静音
143
+      video.play();//调用播放方法
144
+      const ctx = new AudioContext();
145
+      const canAutoPlay = ctx.state === 'running'; //通过这个可以判断出视频能不能够自动播放 如何可以它的值就是“running” 否则为"suspended"
146
+      // 如果是不能播放我们就执行下面的逻辑,其实就是类似于第一种方法,让用户与其交互
147
+      ctx.close();
148
+      if (canAutoPlay) {
149
+        video.muted = false;
150
+        model.style.display = 'none';
151
+        btn.removeEventListener('click', play);
152
+      }
153
+      else {
154
+        model.style.display = 'block';
155
+        btn.addEventListener('click', play);
156
+      }
157
+    }
158
+    play()
159
+
160
+  }
161
+
162
+  async getUrl() {
163
+    await timeService().then(({ data = [], resultCode }) => {
164
+      if (+resultCode === 0) {
165
+        let plannedCompletionData = [], manHourData = [];
166
+        data.map((x, i) => {
167
+          if (x.indexValue || x.indexValue == 0) {
168
+            if (x.indexName == '产量计划完成率') {
169
+              plannedCompletionData.push({
170
+                name: x.factoryName,
171
+                value: Number((x.indexValue * 100).toFixed(2)),
172
+              })
173
+            } else {
174
+              manHourData.push({
175
+                name: x.factoryName,
176
+                // value: Number((x.indexValue * 100).toFixed(2)),
177
+                value: Number(x.indexValue),
178
+              })
179
+            }
180
+          }
181
+        });
182
+        this.setState({ plannedCompletionData, manHourData, plannedCompletionNum: 1, manHourNum: 1 });
183
+      }
184
+    });
185
+  }
186
+  async getUrl2() {
187
+    await numberService().then(({ data = [], resultCode }) => {
188
+      if (+resultCode === 0) {
189
+        let totalValue = 0, yearDecline = 0, yearSend = 0, productInventory = 0;
190
+        data.map((x, i) => {
191
+          if (x.indexName == '产值') {
192
+            totalValue = x.indexValue
193
+          } else if (x.indexName == '年度产量') {
194
+            yearDecline = x.indexValue
195
+          } else if (x.indexName == '产品库存') {
196
+            yearSend = x.indexValue
197
+          } else if (x.indexName == '年度发货量') {
198
+            productInventory = x.indexValue
199
+          }
200
+        });
201
+        this.store.saveState({ totalValue, yearDecline, yearSend, productInventory });
202
+        setTimeout(() => {
203
+          $(".shu1").numScroll();
204
+        }, 2500)
205
+      }
206
+    });
207
+  }
208
+  async getUrl3() {
209
+    await updateTimeService().then(({ data = [], resultCode }) => {
210
+      if (+resultCode === 0) {
211
+        this.setState({ updateTime: data?.[0]?.etlTime || '' })
212
+      }
213
+    });
214
+  }
215
+
216
+  componentWillUnmount() {
217
+    clearInterval(this.timer);
218
+    this.timer = null;
219
+  }
220
+
221
+  fontMsgChange(type) {
222
+    this.timer = setInterval(() => {
223
+      const { plannedCompletionData, plannedCompletionNum, manHourData, manHourNum } = this.state;
224
+
225
+      //产量计划完成率
226
+      var p1 = document.getElementById('plannedCompletionBox_yanting');
227
+      var p3 = document.getElementById('plannedCompletionBox_suzhou');
228
+      const datas_ = plannedCompletionData[plannedCompletionNum - 1];
229
+      var res = "";
230
+      if (datas_) {
231
+        if (type) {
232
+          res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_?.value.toFixed(2)) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_?.name + '</p></div>';
233
+        } else {
234
+          res = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_?.value.toFixed(2) + '</span><span class="topMsg_number_2" style={{fontSize: "0.75em",color: "#fff"}}>%</span><p class="topMsg_number_p">' + datas_?.name + '</p></div>';
235
+        }
236
+      }
237
+      p1.innerHTML = res;
238
+      p3.innerHTML = res;
239
+
240
+      //百万工时损工率
241
+      var p2 = document.getElementById('manHourBox');
242
+      const datas_2 = manHourData[manHourNum - 1];
243
+      var res2 = "";
244
+      if (datas_2) {
245
+        if (type) {
246
+          res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_2?.value.toFixed(2)) + '</span><p class="topMsg_number_p">' + datas_2?.name + '</p></div>';//<span class="topMsg_number_2">%</span>
247
+        } else {
248
+          res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><p class="topMsg_number_p">' + datas_2?.name + '</p></div>';
249
+        }
250
+      }
251
+      p2.innerHTML = res2;
252
+
253
+      const num_ = plannedCompletionNum + 1 > plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
254
+      const num_2 = manHourNum + 1 > manHourData.length ? 1 : manHourNum + 1;
255
+      this.setState({ plannedCompletionNum: num_, manHourNum: num_2 })
256
+    }, 4000)
257
+  }
258
+
259
+  render() {
260
+    const stores = this.store.state;
261
+    let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
262
+    let { changGif, updateTime, changNun, leftName, rightName } = this.state;
263
+    return (
264
+      <div className={"home_box"}>
265
+        {/* 水印 */}
266
+        {
267
+          window.urlConfig && window.urlConfig.SHOW_WATERMARK && <div className={"shuiYin"} style={{ backgroundImage: `url(${$store.app.markSrc})`, backgroundRepeat: 'repeat' }}></div>
268
+        }
269
+        {/* 右键切换大屏 */}
270
+        <Tooltip placement="bottom" title={rightName}>
271
+          <img src={require("@assets/imgs/iconJpg/rightJ.png").default} alt="" className={"rightJ_png"} onClick={() => {
272
+            deleteCacheAndChangeUrl("right", (url) => {
273
+              this.props.history.replace(url);
274
+            })
275
+          }} />
276
+        </Tooltip>
277
+        <Tooltip placement="bottom" title={leftName}>
278
+          <img src={require("@assets/imgs/iconJpg/rightJL.png").default} alt="" className={"rightJ_png rightJ_png_L"} onClick={() => {
279
+            deleteCacheAndChangeUrl("left", (url) => {
280
+              this.props.history.replace(url);
281
+            })
282
+          }} />
283
+        </Tooltip>
284
+
285
+        {/* 视频播放器 */}
286
+        <MapView></MapView>
287
+        <div className={"video_box"}>
288
+          <video src={require("@assets/imgs/dataVImg/homeVideo2.mp4").default} autoplay="autoplay" loop="loop" class="video2 center_box2 animate__animated animate__fadeIn animate__delay-1s"></video>
289
+        </div>
290
+        <div className={[styles.home + " home cbHome"]}>
291
+          <div className="leftContent">
292
+            {/* <div class="topMsg2 animate__animated animate__fadeInDown animate__slower">
293
+              <div className="topMsg">
294
+                <Tooltip placement="bottom" title={<p className="titpeP">
295
+                  ● 本年度截止到最新结账月的主产品的产值合计,计算:
296
+                  <img src={require("@assets/imgs/dataVimg/gongshi.png").default} alt="" style={{ width: "1.5em", margin: " 0 0.5em 0 0em" }} />
297
+                  产品1月产量*产品1月平均销售单价+产品2月产量* 产品2月平均销售单价+...
298
+                </p>}>
299
+                  <p className="topMsg_title">总产值</p>
300
+                </Tooltip>
301
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
302
+                  {
303
+                    !changNun && <span className="topMsg_number" class="shu1">{totalValue}</span>
304
+                  }
305
+                  {
306
+                    changNun && <span className="topMsg_number">{getThousandNum(totalValue)}</span>
307
+                  }
308
+                  <span className="topMsg_number_2">万元</span>
309
+                </div>
310
+              </div>
311
+            </div> */}
312
+            <div class="topMsg_33 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
313
+              <div className="topMsg_3">
314
+                <Tooltip placement="bottom" title={' ● 本年度截止到更新日期累计产量的计划完成率。'}>
315
+                  <p className="topMsg_title">产量计划完成率</p>
316
+                </Tooltip>
317
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox_yanting">
318
+                  <div className="topMsg_box">
319
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
320
+                    <p className="topMsg_number_p"></p>
321
+                  </div>
322
+                </div>
323
+              </div>
324
+            </div>
325
+
326
+            <div class="topMsg2 animate__animated animate__fadeInDown animate__slower" style={{ marginTop: '6%', marginBottom: '6%' }}>
327
+              <div className="topMsgCommond bigDivPd">
328
+                <Tooltip placement="bottom" title={' ● 近一年的干基产率。'}>
329
+                  <p className="topMsg_title">干基产率</p>
330
+                </Tooltip>
331
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox" >
332
+                  <div className="topMsg_box" >
333
+                    <span className="topMsg_number" class="shu1"></span>
334
+                    <span className="topMsg_number_2"></span>
335
+                    <p className="topMsg_number_p"></p>
336
+                  </div>
337
+                </div>
338
+              </div>
339
+            </div>
340
+
341
+            {/* <div class="center_box2 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
342
+              <div className="center_box">
343
+                <Tooltip placement="bottom" title={<p className="titpeP">
344
+                  <p>● 截止更新日期的主产品库存金额,计算:</p>
345
+                  <img src={require("@assets/imgs/dataVimg/gongshi2.png").default} alt="" style={{ width: "1.3em", margin: " -0.3em 0.5em 0 0em" }} />
346
+                  物料1库存数*物料1移动平均价+物料2*物料2移动平均价+…
347
+                </p>}>
348
+                  <p className="topMsg_title" style={{ position: "relative", zIndex: 999999 }}>产品库存金额</p>
349
+                </Tooltip>
350
+                <div className="topMsg_content">
351
+                  <LeftMenoyView></LeftMenoyView>
352
+                </div>
353
+              </div>
354
+            </div> */}
355
+
356
+            <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower animate__delay-2s">
357
+              <div className="bottomContent bigDivPd">
358
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
359
+                  <p className="topMsg_title">月度产量</p>
360
+                </Tooltip>
361
+                <div className="topMsg_content">
362
+                  <MoodProductionView></MoodProductionView>
363
+                </div>
364
+              </div>
365
+            </div>
366
+
367
+
368
+
369
+
370
+          </div>
371
+
372
+          <div className="centerCon">
373
+            <div class="topMsg3 animate__animated animate__fadeInUp animate__slower">
374
+              <div className="topMsg">
375
+                <div className="topMsg2">
376
+                  <div className="topMsg_content">
377
+                    <div className="center_li">
378
+                      <div className="right_li">
379
+                        {
380
+                          !changNun && <span className="topMsg_number" class="shu1">{yearDecline}</span>
381
+                        }
382
+                        {
383
+                          changNun && <span className="topMsg_number">{getThousandNum(yearDecline)}</span>
384
+                        }
385
+                        <p className="topMsg_line"></p>
386
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的产量合计'}>
387
+                          <span className="topMsg_tip">年度产量/吨</span>
388
+                        </Tooltip>
389
+                      </div>
390
+                    </div>
391
+                    <div className="center_li">
392
+                      <div className="right_li">
393
+                        {
394
+                          !changNun && <span className="topMsg_number" class="shu1">{productInventory}</span>
395
+                        }
396
+                        {
397
+                          changNun && <span className="topMsg_number">{getThousandNum(productInventory)}</span>
398
+                        }
399
+                        <p className="topMsg_line"></p>
400
+                        <Tooltip placement="bottom" title={' ● 本年度截止更新日期的主产品(含外加工)的发货量合计。'}>
401
+                          <span className="topMsg_tip">年度发货量/吨</span>
402
+                        </Tooltip>
403
+                      </div>
404
+                    </div>
405
+                    <div className="center_li">
406
+                      {
407
+                        !changNun && <span className="topMsg_number" class="shu1">{yearSend}</span>
408
+                      }
409
+                      {
410
+                        changNun && <span className="topMsg_number">{getThousandNum(yearSend)}</span>
411
+                      }
412
+                      <p className="topMsg_line"></p>
413
+                      <Tooltip placement="bottom" title={' ● 截止更新日期的主产品库存数量。'}>
414
+                        <span className="topMsg_tip">产品库存/吨</span>
415
+                      </Tooltip>
416
+                    </div>
417
+                  </div>
418
+                </div>
419
+              </div>
420
+            </div>
421
+            <div class="bottomContent3 animate__animated animate__fadeInUp animate__slower animate__delay-1s">
422
+              <div className="bottomContent">
423
+                <Tooltip placement="bottom" title={' ● 以更新日期为节点近30天的产量数据(含外加工)。'}>
424
+                  <p className="topMsg_title">近30天产量</p>
425
+                </Tooltip>
426
+                <div className="topMsg_content">
427
+                  <BottomLineForSend></BottomLineForSend>
428
+                </div>
429
+              </div>
430
+            </div>
431
+
432
+          </div>
433
+
434
+          {/* 右侧信息栏 */}
435
+          <div className="leftContent">
436
+
437
+            <div class="topMsg_33 animate__animated animate__fadeInDown animate__slower animate__delay-1s">
438
+              <div className="topMsg_3">
439
+                <Tooltip placement="bottom" title={' ● 本年度截止到更新日期累计产量的计划完成率。'}>
440
+                  <p className="topMsg_title">产量计划完成率</p>
441
+                </Tooltip>
442
+                <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="plannedCompletionBox_suzhou">
443
+                  <div className="topMsg_box">
444
+                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
445
+                    <p className="topMsg_number_p"></p>
446
+                  </div>
447
+                </div>
448
+              </div>
449
+            </div>
450
+
451
+            <div class="topMsg_22 animate__animated animate__fadeInDown animate__slower">
452
+              <div className="topMsg_2">
453
+                <Tooltip placement="bottom" title={' ● 近六个月的主产品一次合格率,当月的数据计算至更新日期。'}>
454
+                  <p className="topMsg_title">一次合格率</p>
455
+                </Tooltip>
456
+
457
+                <div className="topMsg_content">
458
+                  <OneQualified></OneQualified>
459
+                </div>
460
+              </div>
461
+            </div>
462
+
463
+
464
+
465
+            {/* <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower  animate__delay-1s">
466
+              <div className="bottomContent bigDivPd">
467
+                <Tooltip placement="bottom" title={' ● 近三年的碳排放总量、碳排放强度数据'}>
468
+                  <p className="topMsg_title">碳排放</p>
469
+                </Tooltip>
470
+                <div className="topMsg_content">
471
+                  <RightBottomView></RightBottomView>
472
+                </div>
473
+              </div>
474
+            </div> */}
475
+
476
+            <div class="bottomContent2 animate__animated animate__fadeInDown animate__slower animate__delay-2s">
477
+              <div className="bottomContent bigDivPd">
478
+                <Tooltip placement="bottom" title={' ● 近六个月的产量和发货量的对比数据(含外加工),当月的数据计算至更新日期。'}>
479
+                  <p className="topMsg_title">月度发货量</p>
480
+                </Tooltip>
481
+                <div className="topMsg_content">
482
+                  <MoodSendView></MoodSendView>
483
+                </div>
484
+              </div>
485
+            </div>
486
+
487
+          </div>
488
+          <div className="bottom_box">
489
+            <p style={{ color: "#6a818d", lineHeight: '2px' }}>
490
+              更新日期 : {updateTime ? updateTime.split(" ")[0] : updateTime}
491
+            </p>
492
+          </div>
493
+
494
+        </div>
495
+      </div>
496
+    )
497
+  }
498
+}
499
+export default Home;

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

@@ -44,10 +44,10 @@ export function dataengineCenterOneservice(params) {
44 44
 /**库存金额 */
45 45
 export function momeyService(params) {
46 46
   return request({
47
-    url: "/dataengine-center-oneservice/list/1356776817075459329",
47
+    url: "/dataengine-center-oneservice/list/1431063632208685082",
48 48
     method: "POST",
49 49
     data: {
50
-      "apiId": "1356776817075459329",
50
+      "apiId": "1431063632208685082",
51 51
       "appKey": "200000134",
52 52
       "env": "PROD",
53 53
       "reqProtocol": 1,
@@ -61,10 +61,10 @@ export function momeyService(params) {
61 61
       "useResultCache": false
62 62
     },
63 63
     headers: {
64
-      sign: 'd58de970856e583f126d186662251024',
64
+      sign: '6203b66920c569f8228c3cb921f3ffb8',
65 65
       account: 'yunxi_fuxue',
66 66
       'Cache-Control': 'no-cache',
67
-      apiId: '1356776817075459329',
67
+      apiId: '1431063632208685082',
68 68
       appKey: '200000134',
69 69
       execType: '3',
70 70
       env: 'PROD',
@@ -76,10 +76,10 @@ export function momeyService(params) {
76 76
 /**百万工时损工率   产量计划完成率*/
77 77
 export function timeService(params) {
78 78
   return request({
79
-    url: "/dataengine-center-oneservice/list/1356250124518724729",
79
+    url: "/dataengine-center-oneservice/list/1431063077222574093",
80 80
     method: "POST",
81 81
     data: {
82
-      "apiId": "1356250124518724729",
82
+      "apiId": "1431063077222574093",
83 83
       "appKey": "200000134",
84 84
       "env": "PROD",
85 85
       "reqProtocol": 1,
@@ -93,10 +93,10 @@ export function timeService(params) {
93 93
       "useResultCache": false
94 94
     },
95 95
     headers: {
96
-      sign: '46847fe90889330f13cdc3318d848d45',
96
+      sign: '9ab2d57a785c513f84cd0c5fb4fad7da',
97 97
       account: 'yunxi_fuxue',
98 98
       'Cache-Control': 'no-cache',
99
-      apiId: '1356250124518724729',
99
+      apiId: '1431063077222574093',
100 100
       appKey: '200000134',
101 101
       execType: '3',
102 102
       env: 'PROD',
@@ -107,10 +107,10 @@ export function timeService(params) {
107 107
 /**产值+发货量+产量+库存*/
108 108
 export function numberService(params) {
109 109
   return request({
110
-    url: "/dataengine-center-oneservice/list/1356243326548087867",
110
+    url: "/dataengine-center-oneservice/list/1431049820141217793",
111 111
     method: "POST",
112 112
     data: {
113
-      "apiId": "1356243326548087867",
113
+      "apiId": "1431049820141217793",
114 114
       "appKey": "200000134",
115 115
       "env": "PROD",
116 116
       "reqProtocol": 1,
@@ -123,10 +123,10 @@ export function numberService(params) {
123 123
       "useResultCache": false
124 124
     },
125 125
     headers: {
126
-      sign: '2f079b53e1e63b753bb6f9807f6c6818',
126
+      sign: '915848290d3e70a7b8e7fbe911e12725',
127 127
       account: 'yunxi_fuxue',
128 128
       'Cache-Control': 'no-cache',
129
-      apiId: '1356243326548087867',
129
+      apiId: '1431049820141217793',
130 130
       appKey: '200000134',
131 131
       execType: '3',
132 132
       env: 'PROD',
@@ -138,10 +138,10 @@ export function numberService(params) {
138 138
 /**近30天产量*/
139 139
 export function mondService(params) {
140 140
   return request({
141
-    url: "/dataengine-center-oneservice/list/1356244872119751767",
141
+    url: "/dataengine-center-oneservice/list/1431065871110334506",
142 142
     method: "POST",
143 143
     data: {
144
-      "apiId": "1356244872119751767",
144
+      "apiId": "1431065871110334506",
145 145
       "appKey": "200000134",
146 146
       "env": "PROD",
147 147
       "reqProtocol": 1,
@@ -156,10 +156,10 @@ export function mondService(params) {
156 156
       "useResultCache": false
157 157
     },
158 158
     headers: {
159
-      sign: 'ef3ecc442896d925cc02d36f1107d9e3',
159
+      sign: 'f84acfc47847e71c67be5569b9289291',
160 160
       account: 'yunxi_fuxue',
161 161
       'Cache-Control': 'no-cache',
162
-      apiId: '1356244872119751767',
162
+      apiId: '1431065871110334506',
163 163
       appKey: '200000134',
164 164
       execType: '3',
165 165
       env: 'PROD',
@@ -170,10 +170,10 @@ export function mondService(params) {
170 170
 /**月度产量/发货量+一次合格率*/
171 171
 export function twoService(params) {
172 172
   return request({
173
-    url: "/dataengine-center-oneservice/list/1356411403496625359",
173
+    url: "/dataengine-center-oneservice/list/1431065780441016356",
174 174
     method: "POST",
175 175
     data: {
176
-      "apiId": "1356411403496625359",
176
+      "apiId": "1431065780441016356",
177 177
       "appKey": "200000134",
178 178
       "env": "PROD",
179 179
       "reqProtocol": 1,
@@ -189,10 +189,10 @@ export function twoService(params) {
189 189
       "useResultCache": false
190 190
     },
191 191
     headers: {
192
-      sign: '9c472223a9acbdb9f16bebb7002e0c40',
192
+      sign: '178ae23014a9fecad15ffa9a88ed84f1',
193 193
       account: 'yunxi_fuxue',
194 194
       'Cache-Control': 'no-cache',
195
-      apiId: '1356411403496625359',
195
+      apiId: '1431065780441016356',
196 196
       appKey: '200000134',
197 197
       execType: '3',
198 198
       env: 'PROD',

+ 232 - 0
src/pages/tqcDataVHome/api3.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/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/1356250124518724729",
80
+    method: "POST",
81
+    data: {
82
+      "apiId": "1356250124518724729",
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: '46847fe90889330f13cdc3318d848d45',
97
+      account: 'yunxi_fuxue',
98
+      'Cache-Control': 'no-cache',
99
+      apiId: '1356250124518724729',
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/1356243326548087867",
111
+    method: "POST",
112
+    data: {
113
+      "apiId": "1356243326548087867",
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: '2f079b53e1e63b753bb6f9807f6c6818',
127
+      account: 'yunxi_fuxue',
128
+      'Cache-Control': 'no-cache',
129
+      apiId: '1356243326548087867',
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/1356244872119751767",
142
+    method: "POST",
143
+    data: {
144
+      "apiId": "1356244872119751767",
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: 'ef3ecc442896d925cc02d36f1107d9e3',
160
+      account: 'yunxi_fuxue',
161
+      'Cache-Control': 'no-cache',
162
+      apiId: '1356244872119751767',
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/1356411403496625359",
174
+    method: "POST",
175
+    data: {
176
+      "apiId": "1356411403496625359",
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: '9c472223a9acbdb9f16bebb7002e0c40',
193
+      account: 'yunxi_fuxue',
194
+      'Cache-Control': 'no-cache',
195
+      apiId: '1356411403496625359',
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)