Sfoglia il codice sorgente

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

@dayan_hjm 1 anno fa
parent
commit
f87a12a296

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

@@ -80,7 +80,7 @@ class RightBottomView extends Component {
80
     };
80
     };
81
     return (
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
-        <p className="title_">累计量客户/吨</p>
83
+        <p className="title_">累计发货量客户/吨</p>
84
         <Slider {...settings}>
84
         <Slider {...settings}>
85
           {
85
           {
86
             data_item.map((x, i) => {
86
             data_item.map((x, i) => {

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

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm  产供销价值链
2
  * @Author: dayan_hjm  产供销价值链
3
  * @Date: 2023-11-10 10:19:34 
3
  * @Date: 2023-11-10 10:19:34 
4
  * @Last Modified by: dayan_hjm
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
 import React, { useState, useEffect, Component } from "react";
8
 import React, { useState, useEffect, Component } from "react";
@@ -89,7 +89,7 @@ class Gvc extends Component {
89
     }, 3000)
89
     }, 3000)
90
     setTimeout(() => {
90
     setTimeout(() => {
91
       this.setState({ changGif: true });
91
       this.setState({ changGif: true });
92
-    }, 4500)
92
+    }, 5000)
93
   }
93
   }
94
 
94
 
95
   changeAllShu() {
95
   changeAllShu() {

+ 2 - 0
src/utils/util.js

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