@dayan_hjm 2 år sedan
förälder
incheckning
d6c5791a11

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

@@ -67,7 +67,7 @@ class RightBottomView extends Component {
67 67
       cssEase: "linear",
68 68
       // autoplaySpeed: 1000,//自动播放的时间
69 69
       // fade: true,//是否采用淡入淡出的效果  竖着的滚动方式不能添加此动效
70
-      slidesToShow: data_item.length >= 7 ? 7 : data_item.length,
70
+      slidesToShow: data_item.length >= 8 ? 8 : data_item.length,
71 71
       slidesToScroll: 1,
72 72
       vertical: true,
73 73
       verticalSwiping: true,

+ 7 - 7
src/pages/gvc/style.less

@@ -300,9 +300,9 @@
300 300
           width: 15%;
301 301
           position: absolute;
302 302
           right: 0;
303
-          bottom: 23%;
303
+          bottom: 10%;
304 304
           z-index: 9;
305
-          height: 45%;
305
+          height: 60%;
306 306
 
307 307
           .title_ {
308 308
             text-align: left;
@@ -376,21 +376,21 @@
376 376
 
377 377
         @media (min-height: 800px) {
378 378
           .rightContent {
379
-            bottom: 20%;
380
-            height: 38%;
379
+            bottom: 3%;
380
+            // height: 38%;
381 381
           }
382 382
         }
383 383
 
384 384
         @media (min-height: 900px) {
385 385
           .rightContent {
386
-            bottom: 20%;
386
+            bottom: 3%;
387 387
           }
388 388
         }
389 389
 
390 390
         @media (min-height: 1000px) {
391 391
           .rightContent {
392
-            bottom: 22%;
393
-            height: 32%;
392
+            bottom: -5%;
393
+            // height: 32%;
394 394
           }
395 395
         }
396 396
       }

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

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm  产供销价值链
3 3
  * @Date: 2023-11-10 10:19:34 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-28 15:23:49
5
+ * @Last Modified time: 2023-11-29 10:50:47
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -359,7 +359,7 @@ class Gvc extends Component {
359 359
             
360 360
             <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
361 361
           </div>
362
-          <div style={{width:"60%"}}>
362
+          <div>
363 363
             <p>产品库存</p>
364 364
             {
365 365
               !changGif ? <span class="topMsg_number shu1">{x.num2}</span> : <span class="topMsg_number">{getThousandNum(x.num2)}</span>

+ 42 - 21
src/pages/tqcDataVHome/component/oneQualified.jsx

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm 一次合格率
3 3
  * @Date: 2023-10-23 09:32:12 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-08 17:53:47
5
+ * @Last Modified time: 2023-11-29 10:53:47
6 6
  */
7 7
 
8 8
 
@@ -22,9 +22,9 @@ class BottomLineForSend extends Component {
22 22
     super(props, context);
23 23
     this.store = mod;
24 24
     this.state = {
25
-      targeRate:[],
26
-      year:[],
27
-      qcRate:[],
25
+      targeRate: [],
26
+      year: [],
27
+      qcRate: [],
28 28
     };
29 29
   }
30 30
 
@@ -41,13 +41,19 @@ class BottomLineForSend extends Component {
41 41
           qcRate.push(x.qcRate)
42 42
           targeRate.push(x.targeRate)
43 43
         });
44
-        this.setState({ year, targeRate,qcRate });
44
+        this.setState({ year, targeRate, qcRate });
45 45
         this.setData();
46 46
       }
47 47
     });
48 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
+
49 56
 
50
-  
51 57
   setData() {
52 58
     setTimeout(() => {
53 59
       // 基于准备好的dom,初始化echarts实例
@@ -57,15 +63,30 @@ class BottomLineForSend extends Component {
57 63
         tooltip: {
58 64
           trigger: 'axis',
59 65
           axisPointer: { type: 'shadow' },
60
-          borderColor:"rgba(105, 255, 222, 0.5)",
61
-          borderWidth:2,
62
-          padding:2,
63
-          textStyle:{
64
-            fontSize:12,
65
-            color:"#ededed"
66
+          borderColor: "rgba(105, 255, 222, 0.5)",
67
+          borderWidth: 2,
68
+          padding: 2,
69
+          textStyle: {
70
+            fontSize: 12,
71
+            color: "#ededed"
66 72
           },
67
-          formatter: '{a0}: {c0}<br />{a1}: {c1}',
68
-          backgroundColor:"#0000008a"
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"
69 90
         }, "grid": {
70 91
           "top": "20%",
71 92
           "right": "5%",
@@ -79,7 +100,7 @@ class BottomLineForSend extends Component {
79 100
           top: 0,
80 101
           textStyle: {
81 102
             color: "#fff",
82
-            fontSize:10,
103
+            fontSize: 10,
83 104
           },
84 105
           itemWidth: 12,
85 106
           itemHeight: 5,
@@ -92,9 +113,9 @@ class BottomLineForSend extends Component {
92 113
             axisLabel: {
93 114
               textStyle: { color: "'#7d7d7d'", fontSize: '12', },
94 115
             },
95
-            splitLine:{
96
-              show:true,
97
-              lineStyle:{
116
+            splitLine: {
117
+              show: true,
118
+              lineStyle: {
98 119
                 color: '#3b3b3b',
99 120
                 type: 'dashed',
100 121
 
@@ -120,9 +141,9 @@ class BottomLineForSend extends Component {
120 141
                 fontSize: 12
121 142
               }
122 143
             },
123
-            splitLine:{
124
-              show:true,
125
-              lineStyle:{
144
+            splitLine: {
145
+              show: true,
146
+              lineStyle: {
126 147
                 color: '#3b3b3b',
127 148
                 type: 'dashed',
128 149