Explorar el Código

fix: 千分位给数据补齐两位数

@dayan_hjm hace 1 año
padre
commit
f87a12a296
Se han modificado 3 ficheros con 5 adiciones y 3 borrados
  1. 1 1
      src/pages/gvc/component/rightBottomView.jsx
  2. 2 2
      src/pages/gvc/view.jsx
  3. 2 0
      src/utils/util.js

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

@@ -80,7 +80,7 @@ class RightBottomView extends Component {
80 80
     };
81 81
     return (
82 82
       <div className={["eacharView cbRightBottomView slider_item_box"]} style={{height: data_item.length > 8 ? 'auto' : "100%"}}>
83
-        <p className="title_">累计量客户/吨</p>
83
+        <p className="title_">累计发货量客户/吨</p>
84 84
         <Slider {...settings}>
85 85
           {
86 86
             data_item.map((x, i) => {

+ 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: 2024-07-22 09:56:30
5
+ * @Last Modified time: 2024-08-14 16:41:44
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -89,7 +89,7 @@ class Gvc extends Component {
89 89
     }, 3000)
90 90
     setTimeout(() => {
91 91
       this.setState({ changGif: true });
92
-    }, 4500)
92
+    }, 5000)
93 93
   }
94 94
 
95 95
   changeAllShu() {

+ 2 - 0
src/utils/util.js

@@ -990,6 +990,8 @@ export function getThousandNum(num){
990 990
   // var text8_sum = TextBox8_all.replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g,'$1,');
991 991
   if(TextBox8_all.split('.')[1] && TextBox8_all.split('.')[1].length == 1){
992 992
     TextBox8_all = TextBox8_all+'0'
993
+  }else if (!TextBox8_all.split('.')[1]){
994
+    TextBox8_all = TextBox8_all+'.00'
993 995
   }
994 996
   return TextBox8_all;
995 997
 }