Selaa lähdekoodia

feat: 数据千分位

@dayan_hjm 2 vuotta sitten
vanhempi
commit
6d2d506d54

BIN
src/assets/imgs/gvc/car.png


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

@@ -59,7 +59,7 @@ export function smallDayService(params) {
59 59
         "indexValue"
60 60
       ],
61 61
       "pageNum": 1,
62
-      "pageSize": 10,
62
+      "pageSize": 20,
63 63
       "useResultCache": false
64 64
     },
65 65
     headers: {

+ 3 - 2
src/pages/gvc/component/rightBottomView.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-16 17:05:05
5
+ * @Last Modified time: 2023-11-28 10:27:31
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -18,6 +18,7 @@ import {
18 18
   rollService,
19 19
 } from "../api";
20 20
 import { get, } from "lodash";
21
+import { getThousandNum } from "@utils/util";
21 22
 
22 23
 @withRouter
23 24
 
@@ -84,7 +85,7 @@ class RightBottomView extends Component {
84 85
                 <div className="slider_box">
85 86
                   <div className="slider_top">
86 87
                     <p>{i + 1}.<span>{x.name}</span></p>
87
-                    <p className="p2">{x.num}</p>
88
+                    <p className="p2">{getThousandNum(x.num)}</p>
88 89
                   </div>
89 90
                   <Progress
90 91
                     strokeColor={{

+ 53 - 46
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-27 17:16:02
5
+ * @Last Modified time: 2023-11-28 10:30:13
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -24,6 +24,7 @@ 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 { getThousandNum } from "@utils/util";
27 28
 
28 29
 import 'animate.css';
29 30
 import { get } from "lodash";
@@ -68,26 +69,31 @@ class Gvc extends Component {
68 69
     }
69 70
   }
70 71
   componentDidMount() {
71
-    // this.fontMsgChange();
72 72
     this.getUrl();
73 73
     this.getUrl2()
74 74
     this.getUrl4()
75 75
     this.getUrl3();
76
-
77
-
78 76
     setTimeout(() => {
79 77
       this.videoStart();
80 78
     }, 200)
81 79
     setTimeout(() => {
82 80
       //替换gif
83
-      this.setState({ changGif: true });
84
-      $(".shu1").numScroll();
81
+      $(".shu1").numScroll({time:3000});
82
+      // this.changeAllShu()
85 83
     }, 3000)
86
-    // setTimeout(() => {
87
-    //   setTimeout(() => {
88
-    //   }, 500)
89
-    // }, 4000)
84
+    setTimeout(() => {
85
+      this.setState({ changGif: true });
86
+    }, 4500)
90 87
   }
88
+
89
+  changeAllShu(){
90
+    const stu_input = document.getElementsByClassName("shu1");
91
+    for(var i=0;i<stu_input.length;i++){
92
+      console.log(stu_input[i],"arr_")
93
+      console.log(stu_input[i].value,"arr_")
94
+    }
95
+  }
96
+
91 97
   videoStart() {
92 98
     /*     Chrome 浏览器的视频自动播放策略
93 99
         1.始终允许静音模式下自动播放
@@ -147,7 +153,7 @@ class Gvc extends Component {
147 153
   async getUrl() {
148 154
     await leftService().then(({ data = [], resultCode }) => {
149 155
       if (+resultCode === 0) {
150
-        let LeftHtml = [], name_ = ["碳酸锂", '氢氧化', '氯化锂', '金属锂'];
156
+        let LeftHtml = [], name_ = ["碳酸锂", '氢氧化', '氯化锂', '金属锂'];
151 157
         data.map((x, i) => {
152 158
           if (i >= 4) {
153 159
             return
@@ -194,7 +200,7 @@ class Gvc extends Component {
194 200
   async getUrl4() {
195 201
     await smallShopService().then(({ data = [], resultCode }) => {
196 202
       if (+resultCode === 0) {
197
-        const style__ = [{}, { left: "88%", top: "28%" }, { left: "70%", top: "46%" }, { left: "52%", top: "59%" }, { left: "11%", top: "90%" }, { left: "29%", top: "76%" }]
203
+        const style__ = [{}, { left: "88%", top: "28%" }, { left: "70%", top: "46%" }, { left: "52%", top: "59%" }, { left: "29%", top: "76%" }, { left: "11%", top: "89%" }]
198 204
         data = data.map((x, i) => {0
199 205
           return {
200 206
             ...x,
@@ -205,8 +211,8 @@ class Gvc extends Component {
205 211
             inventory: x.inventory,
206 212
           }
207 213
         });
208
-        const d_1 = data.filter(x => { return x.factoryCode == 4 })[0];
209
-        const d_2 = data.filter(x => { return x.factoryCode == 5 })[0];
214
+        const d_1 = data.filter(x => { return x.factoryCode == 5 })[0];
215
+        const d_2 = data.filter(x => { return x.factoryCode == 4 })[0];
210 216
         const d_3 = data.filter(x => { return x.factoryCode == 3 })[0];
211 217
         const d_4 = data.filter(x => { return x.factoryCode == 2 })[0];
212 218
         const d_5 = data.filter(x => { return x.factoryCode == 1 })[0];
@@ -216,6 +222,8 @@ class Gvc extends Component {
216 222
         old_imgMsgData[5] = d_3;
217 223
         old_imgMsgData[6] = d_4;
218 224
         old_imgMsgData[7] = d_5;
225
+        
226
+
219 227
         console.log(old_imgMsgData, "old_imgMsgData")
220 228
         this.store.saveState({ imgMsgData: old_imgMsgData });
221 229
         this.getUrl5()
@@ -228,13 +236,13 @@ class Gvc extends Component {
228 236
         function getItems(num) {
229 237
           const datas = data.filter(x => { return x.factoryCode == num });
230 238
           const par = {
231
-            day: datas?.filter(x => { return x.dateType == 1 })?.[0]?.indexValue || 0,
232
-            mood: datas?.filter(x => { return x.dateType == 2 })?.[0]?.indexValue || 0,
233
-            year: datas?.filter(x => { return x.dateType == 3 })?.[0]?.indexValue || 0,
239
+            day: getThousandNum(datas?.filter(x => { return x.dateType == 1 })?.[0]?.indexValue || 0),
240
+            mood: getThousandNum(datas?.filter(x => { return x.dateType == 2 })?.[0]?.indexValue || 0),
241
+            year: getThousandNum(datas?.filter(x => { return x.dateType == 3 })?.[0]?.indexValue || 0),
234 242
           }
235 243
           return par
236 244
         }
237
-
245
+        
238 246
         const d_1 = getItems(5);
239 247
         const d_2 = getItems(4);
240 248
         const d_3 = getItems(3);
@@ -263,7 +271,7 @@ class Gvc extends Component {
263 271
           const rawMaterial = datas.map((item, index) => {
264 272
             return {
265 273
               prodCatgory: item.prodCatgory,
266
-              indexValue: item.indexValue,
274
+              indexValue: getThousandNum(item.indexValue),
267 275
             }
268 276
           })
269 277
           // const par = {
@@ -298,6 +306,8 @@ class Gvc extends Component {
298 306
         const d_3 = getItems(3);
299 307
         const d_4 = getItems(2);
300 308
         const d_5 = getItems(1);
309
+        
310
+
301 311
         let old_imgMsgData = this.store.state.imgMsgData;
302 312
         old_imgMsgData[3] = { ...old_imgMsgData[3], ...d_1 };
303 313
         old_imgMsgData[4] = { ...old_imgMsgData[4], ...d_2 };
@@ -322,29 +332,9 @@ class Gvc extends Component {
322 332
     this.timer = null;
323 333
   }
324 334
 
325
-  fontMsgChange() {
326
-    this.timer = setInterval(() => {
327
-      const { plannedCompletionData, plannedCompletionNum, manHourData, manHourNum } = this.state;
328
-
329
-      //产量计划完成率
330
-      var p1 = document.getElementById('plannedCompletionBox');
331
-      const datas_ = plannedCompletionData[plannedCompletionNum - 1];
332
-      var 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>';
333
-      p1.innerHTML = res;
334
-
335
-      //百万工时损工率
336
-      var p2 = document.getElementById('manHourBox');
337
-      const datas_2 = manHourData[manHourNum - 1];
338
-      var res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
339
-      p2.innerHTML = res2;
340
-
341
-      const num_ = plannedCompletionNum + 1 >= plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
342
-      const num_2 = manHourNum + 1 >= manHourData.length ? 1 : manHourNum + 1;
343
-      this.setState({ plannedCompletionNum: num_, manHourNum: num_2 })
344
-    }, 4000)
345
-  }
346 335
 
347 336
   getLeftHtml(x, i) {
337
+    const { changGif } = this.state;
348 338
     return (
349 339
       <li>
350 340
         <div className={"top_div"}>
@@ -363,11 +353,18 @@ class Gvc extends Component {
363 353
         <div className="text">
364 354
           <div>
365 355
             <p>累计产量</p>
366
-            <span class="topMsg_number shu1">{x.num1}</span><span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
356
+            {
357
+              !changGif ? <span class="topMsg_number shu1">{x.num1}</span> : <span class="topMsg_number">{getThousandNum(x.num1)}</span>
358
+            }
359
+            
360
+            <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
367 361
           </div>
368 362
           <div>
369 363
             <p>产品库存</p>
370
-            <span class="topMsg_number shu1">{x.num2}</span><span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
364
+            {
365
+              !changGif ? <span class="topMsg_number shu1">{x.num2}</span> : <span class="topMsg_number">{getThousandNum(x.num2)}</span>
366
+            }
367
+            <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
371 368
           </div>
372 369
         </div>
373 370
       </li>
@@ -378,7 +375,7 @@ class Gvc extends Component {
378 375
   render() {
379 376
     const stores = this.store.state;
380 377
     let { totalValue, yearDecline, yearSend, imgMsgData } = this.store.state;
381
-    let { LeftHtml, updateTime } = this.state;
378
+    let { LeftHtml, updateTime,changGif } = this.state;
382 379
     return (
383 380
       <div className={[styles.gvc_home + ' home_box ']}>
384 381
         <div className={"all_box"}>
@@ -414,7 +411,10 @@ class Gvc extends Component {
414 411
                           item.totalName && <p className="name">{item.totalName}</p>
415 412
                         }
416 413
                         {
417
-                          item.totalName && <span class="shu1 nums">{item.total}</span>
414
+                          item.totalName && !changGif && <span class="shu1 nums">{item.total}</span>
415
+                        }
416
+                        {
417
+                          item.totalName && changGif && <span class="nums">{getThousandNum(item.total)}</span>
418 418
                         }
419 419
                         {
420 420
                           item.totalName && <span className="sma">吨</span>
@@ -449,11 +449,18 @@ class Gvc extends Component {
449 449
                           item.cumulativeProduction !== null && <div className="chanL text">
450 450
                             <div>
451 451
                               <p>累计产量</p>
452
-                              <span class="nums shu1">{item.cumulativeProduction}</span><span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
452
+                              {
453
+                                !changGif ? <span class="nums shu1">{item.cumulativeProduction}</span> : <span class="nums">{getThousandNum(item.cumulativeProduction)}</span>
454
+                              }
455
+                              
456
+                              <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
453 457
                             </div>
454 458
                             <div>
455 459
                               <p>产品库存</p>
456
-                              <span class="nums shu1">{item.inventory}</span><span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
460
+                              {
461
+                                !changGif ? <span class="nums shu1">{item.inventory}</span> : <span class="nums">{getThousandNum(item.inventory)}</span>
462
+                              }
463
+                              <span class="topMsg_number_2" style={{ fontSize: "0.75em", color: "#fff" }}>吨</span>
457 464
                             </div>
458 465
 
459 466
                           </div>

+ 6 - 5
src/pages/tqcDataVHome/component/leftMenoyView.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-16 11:01:51
5
+ * @Last Modified time: 2023-11-28 10:43:30
6 6
  */
7 7
 
8 8
 
@@ -11,6 +11,7 @@ import styles from "../style.less";
11 11
 import { useHistory, useLocation, withRouter } from "react-router-dom";
12 12
 import mod from '../mod';
13 13
 import { getArrMax } from "@utils/util";
14
+import { getThousandNum } from "@utils/util";
14 15
 import {
15 16
   momeyService,
16 17
 } from "../api";
@@ -24,12 +25,12 @@ class LeftMenoyView extends Component {
24 25
     this.store = mod;
25 26
     this.state = {
26 27
       max1:[],
27
-      year:["碳酸锂","氧化纳",'金属锂',"氢氧化"],
28
+      year:["碳酸锂","氧化纳",'金属锂',"氢氧化"],
28 29
       missionsIntensity_arr:[
29 30
         {value:0,name:"碳酸锂"},
30 31
         {value:0,name:"氧化纳"},
31 32
         {value:0,name:'金属锂'},
32
-        {value:0,name:"氢氧化"},
33
+        {value:0,name:"氢氧化"},
33 34
       ],
34 35
     };
35 36
   }
@@ -208,7 +209,7 @@ class LeftMenoyView extends Component {
208 209
               show: true,
209 210
               position: 'right',
210 211
               formatter: function (param) {
211
-                return param.value + '万元';
212
+                return getThousandNum(param.value) + '万元';
212 213
                 // return param.name+":"+param.value + '万元';
213 214
 
214 215
               },
@@ -312,7 +313,7 @@ class LeftMenoyView extends Component {
312 313
         // //标题
313 314
         // title: {
314 315
         //   text: '16%',
315
-        //   subtext: '氢氧化',
316
+        //   subtext: '氢氧化',
316 317
         //   x: 'center',
317 318
         //   y: '40%',
318 319
         //   textStyle: {

+ 52 - 15
src/pages/tqcDataVHome/view.jsx

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm 
3 3
  * @Date: 2023-10-25 10:32:44 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-27 17:16:04
5
+ * @Last Modified time: 2023-11-28 10:41:00
6 6
  */
7 7
 /*
8 8
  * @Author: dayan_hjm 
@@ -30,6 +30,7 @@ import {
30 30
   checkToken,
31 31
   updateTimeService
32 32
 } from "./api";
33
+import { getThousandNum } from "@utils/util";
33 34
 
34 35
 import 'animate.css';
35 36
 @withRouter
@@ -42,6 +43,7 @@ class Home extends Component {
42 43
     this.state = {
43 44
       updateTime: '',
44 45
       changGif: false,
46
+      changNun: false,
45 47
       plannedCompletionData: [
46 48
       ],
47 49
       plannedCompletionNum: 1,
@@ -52,7 +54,7 @@ class Home extends Component {
52 54
     this.timer = null //定时器,用于检测同步状态
53 55
   }
54 56
   componentWillMount() {
55
-    if(window.location.host.indexOf("localhost") == -1){
57
+    if (window.location.host.indexOf("localhost") == -1) {
56 58
       this.getToken()
57 59
     }
58 60
   }
@@ -81,8 +83,11 @@ class Home extends Component {
81 83
     setTimeout(() => {
82 84
       //替换gif
83 85
       this.setState({ changGif: true });
86
+    }, 2000);
87
+    setTimeout(() => {
88
+      this.setState({ changNun: true });
89
+    }, 4500)
84 90
 
85
-    }, 2000)
86 91
   }
87 92
   videoStart() {
88 93
     /*     Chrome 浏览器的视频自动播放策略
@@ -144,7 +149,7 @@ class Home extends Component {
144 149
       if (+resultCode === 0) {
145 150
         let plannedCompletionData = [], manHourData = [];
146 151
         data.map((x, i) => {
147
-          if(x.indexValue){
152
+          if (x.indexValue) {
148 153
             if (x.indexName == '产量计划完成率') {
149 154
               plannedCompletionData.push({
150 155
                 name: x.factoryName,
@@ -197,20 +202,30 @@ class Home extends Component {
197 202
     this.timer = null;
198 203
   }
199 204
 
200
-  fontMsgChange() {
205
+  fontMsgChange(type) {
201 206
     this.timer = setInterval(() => {
202 207
       const { plannedCompletionData, plannedCompletionNum, manHourData, manHourNum } = this.state;
203 208
 
204 209
       //产量计划完成率
205 210
       var p1 = document.getElementById('plannedCompletionBox');
206 211
       const datas_ = plannedCompletionData[plannedCompletionNum - 1];
207
-      var 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>';
212
+      var res;
213
+      if (type) {
214
+        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>';
215
+      } else {
216
+        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>';
217
+      }
208 218
       p1.innerHTML = res;
209 219
 
210 220
       //百万工时损工率
211 221
       var p2 = document.getElementById('manHourBox');
212 222
       const datas_2 = manHourData[manHourNum - 1];
213
-      var res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
223
+      var res2;
224
+      if (type) {
225
+        res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_2?.value.toFixed(2)) + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
226
+      } else {
227
+        res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value.toFixed(2) + '</span><span class="topMsg_number_2">%</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
228
+      }
214 229
       p2.innerHTML = res2;
215 230
 
216 231
       const num_ = plannedCompletionNum + 1 > plannedCompletionData.length ? 1 : plannedCompletionNum + 1;
@@ -222,7 +237,7 @@ class Home extends Component {
222 237
   render() {
223 238
     const stores = this.store.state;
224 239
     let { totalValue, yearDecline, yearSend, productInventory } = this.store.state;
225
-    let { changGif, updateTime, } = this.state;
240
+    let { changGif, updateTime, changNun } = this.state;
226 241
     return (
227 242
       <div className={"home_box"}>
228 243
         {/* 视频播放器 */}
@@ -239,7 +254,13 @@ class Home extends Component {
239 254
                   <p className="topMsg_title">总产值</p>
240 255
                 </Tooltip>
241 256
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"}>
242
-                  <span className="topMsg_number" class="shu1">{totalValue}</span><span className="topMsg_number_2">万元</span>
257
+                  {
258
+                    !changNun && <span className="topMsg_number" class="shu1">{totalValue}</span>
259
+                  }
260
+                  {
261
+                    changNun && <span className="topMsg_number">{getThousandNum(totalValue)}</span>
262
+                  }
263
+                  <span className="topMsg_number_2">万元</span>
243 264
                 </div>
244 265
               </div>
245 266
             </div>
@@ -275,7 +296,12 @@ class Home extends Component {
275 296
                   <div className="topMsg_content">
276 297
                     <div className="center_li">
277 298
                       <div className="right_li">
278
-                        <span className="topMsg_number" class="shu1">{yearDecline}</span>
299
+                        {
300
+                          !changNun && <span className="topMsg_number" class="shu1">{yearDecline}</span>
301
+                        }
302
+                        {
303
+                          changNun && <span className="topMsg_number">{getThousandNum(yearDecline)}</span>
304
+                        }
279 305
                         <p className="topMsg_line"></p>
280 306
                         <Tooltip placement="bottom" title={' ● 即为从当年1月1日至更新数据ETL日期当天的产量之和(含外加工)'}>
281 307
                           <span className="topMsg_tip">年度产量/吨</span>
@@ -284,7 +310,12 @@ class Home extends Component {
284 310
                     </div>
285 311
                     <div className="center_li">
286 312
                       <div className="right_li">
287
-                        <span className="topMsg_number" class="shu1">{productInventory}</span>
313
+                        {
314
+                          !changNun && <span className="topMsg_number" class="shu1">{productInventory}</span>
315
+                        }
316
+                        {
317
+                          changNun && <span className="topMsg_number">{getThousandNum(productInventory)}</span>
318
+                        }
288 319
                         <p className="topMsg_line"></p>
289 320
                         <Tooltip placement="bottom" title={' ● 即为从当年1月1日至更新数据ETL日期当天的发货量之和(含外加工)'}>
290 321
                           <span className="topMsg_tip">年度发货量/吨</span>
@@ -292,7 +323,12 @@ class Home extends Component {
292 323
                       </div>
293 324
                     </div>
294 325
                     <div className="center_li">
295
-                      <span className="topMsg_number" class="shu1">{yearSend}</span>
326
+                      {
327
+                        !changNun && <span className="topMsg_number" class="shu1">{yearSend}</span>
328
+                      }
329
+                      {
330
+                        changNun && <span className="topMsg_number">{getThousandNum(yearSend)}</span>
331
+                      }
296 332
                       <p className="topMsg_line"></p>
297 333
                       <Tooltip placement="bottom" title={' ● 更新数据ETL日期当天的产品库存数量(含外加工)'}>
298 334
                         <span className="topMsg_tip">产品库存/吨</span>
@@ -324,7 +360,8 @@ class Home extends Component {
324 360
                 </Tooltip>
325 361
                 <div className={changGif ? "topMsg_content changBg_topMsg_content" : "topMsg_content"} id="manHourBox">
326 362
                   <div className="topMsg_box">
327
-                    <span className="topMsg_number" class="shu1"></span><span className="topMsg_number_2"></span>
363
+                    <span className="topMsg_number" class="shu1"></span>
364
+                    <span className="topMsg_number_2"></span>
328 365
                     <p className="topMsg_number_p"></p>
329 366
                   </div>
330 367
                 </div>
@@ -369,8 +406,8 @@ class Home extends Component {
369 406
             </div>
370 407
           </div>
371 408
           <div className="bottom_box">
372
-            <p style={{ color: "#6a818d",lineHeight:'2px' }}>
373
-            更新时间 : {updateTime?updateTime.split(" ")[0]:updateTime}
409
+            <p style={{ color: "#6a818d", lineHeight: '2px' }}>
410
+              更新时间 : {updateTime ? updateTime.split(" ")[0] : updateTime}
374 411
             </p>
375 412
           </div>
376 413
 

+ 7 - 0
src/utils/util.js

@@ -980,6 +980,13 @@ export function mapTree2(tree, c_name, la_name, isChildren = false, fathers) {
980 980
   return par;
981 981
 }
982 982
 
983
+export function getThousandNum(num){
984
+  if(!num){return 0}
985
+  var TextBox8_all = num+"";
986
+  var text8_sum = TextBox8_all.replace(/(\d{1,3})(?=(\d{3})+(?:$|\.))/g,'$1,');
987
+  return text8_sum;
988
+}
989
+
983 990
 
984 991
 // 格式化树结构
985 992
 export function findTreeAllNode(tree) {