@dayan_hjm лет назад: 2
Родитель
Сommit
271d992d8d
2 измененных файлов с 11 добавлено и 7 удалено
  1. 4 2
      src/pages/gvc/view.jsx
  2. 7 5
      src/pages/tqcDataVHome/view.jsx

+ 4 - 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: 2023-12-01 16:23:00
5
+ * @Last Modified time: 2023-12-06 14:45:11
6
  */
6
  */
7
 
7
 
8
 import React, { useState, useEffect, Component } from "react";
8
 import React, { useState, useEffect, Component } from "react";
@@ -63,7 +63,9 @@ class Gvc extends Component {
63
         if (data?.userId) {
63
         if (data?.userId) {
64
           // this.props.history.push('/')
64
           // this.props.history.push('/')
65
         } else {
65
         } else {
66
-          this.props.history.replace("/home/index");
66
+          window.location = window.location.origin + '/transfer.html#/login';
67
+
68
+          // this.props.history.replace("/home/index");
67
         }
69
         }
68
       });
70
       });
69
     }
71
     }

+ 7 - 5
src/pages/tqcDataVHome/view.jsx

@@ -2,7 +2,7 @@
2
  * @Author: dayan_hjm 
2
  * @Author: dayan_hjm 
3
  * @Date: 2023-10-25 10:32:44 
3
  * @Date: 2023-10-25 10:32:44 
4
  * @Last Modified by: dayan_hjm
4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-12-06 14:00:52
5
+ * @Last Modified time: 2023-12-06 14:50:55
6
  */
6
  */
7
 /*
7
 /*
8
  * @Author: dayan_hjm 
8
  * @Author: dayan_hjm 
@@ -67,7 +67,8 @@ class Home extends Component {
67
         if (data?.userId) {
67
         if (data?.userId) {
68
           // this.props.history.push('/')
68
           // this.props.history.push('/')
69
         } else {
69
         } else {
70
-          this.props.history.replace("/home/index");
70
+          window.location = window.location.origin + '/transfer.html#/login';
71
+          // this.props.history.replace("/home/index");
71
         }
72
         }
72
       });
73
       });
73
     }
74
     }
@@ -149,7 +150,7 @@ class Home extends Component {
149
       if (+resultCode === 0) {
150
       if (+resultCode === 0) {
150
         let plannedCompletionData = [], manHourData = [];
151
         let plannedCompletionData = [], manHourData = [];
151
         data.map((x, i) => {
152
         data.map((x, i) => {
152
-          if (x.indexValue) {
153
+          if (x.indexValue || x.indexValue == 0) {
153
             if (x.indexName == '产量计划完成率') {
154
             if (x.indexName == '产量计划完成率') {
154
               plannedCompletionData.push({
155
               plannedCompletionData.push({
155
                 name: x.factoryName,
156
                 name: x.factoryName,
@@ -222,10 +223,11 @@ class Home extends Component {
222
       var p2 = document.getElementById('manHourBox');
223
       var p2 = document.getElementById('manHourBox');
223
       const datas_2 = manHourData[manHourNum - 1];
224
       const datas_2 = manHourData[manHourNum - 1];
224
       var res2;
225
       var res2;
226
+      
225
       if (type) {
227
       if (type) {
226
-        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>
228
+        res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number">' + getThousandNum(datas_2?.value) + '</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';//<span class="topMsg_number_2">%</span>
227
       } else {
229
       } else {
228
-        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>';
230
+        res2 = '<div class="topMsg_box animate__animated animate__zoomIn"><span class="topMsg_number shu1">' + datas_2?.value + '</span><p class="topMsg_number_p">' + datas_2.name + '</p></div>';
229
       }
231
       }
230
       p2.innerHTML = res2;
232
       p2.innerHTML = res2;
231
 
233