@dayan_hjm 2 anni fa
parent
commit
271d992d8d
2 ha cambiato i file con 11 aggiunte e 7 eliminazioni
  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 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-12-01 16:23:00
5
+ * @Last Modified time: 2023-12-06 14:45:11
6 6
  */
7 7
 
8 8
 import React, { useState, useEffect, Component } from "react";
@@ -63,7 +63,9 @@ class Gvc extends Component {
63 63
         if (data?.userId) {
64 64
           // this.props.history.push('/')
65 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 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-12-06 14:00:52
5
+ * @Last Modified time: 2023-12-06 14:50:55
6 6
  */
7 7
 /*
8 8
  * @Author: dayan_hjm 
@@ -67,7 +67,8 @@ class Home extends Component {
67 67
         if (data?.userId) {
68 68
           // this.props.history.push('/')
69 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 150
       if (+resultCode === 0) {
150 151
         let plannedCompletionData = [], manHourData = [];
151 152
         data.map((x, i) => {
152
-          if (x.indexValue) {
153
+          if (x.indexValue || x.indexValue == 0) {
153 154
             if (x.indexName == '产量计划完成率') {
154 155
               plannedCompletionData.push({
155 156
                 name: x.factoryName,
@@ -222,10 +223,11 @@ class Home extends Component {
222 223
       var p2 = document.getElementById('manHourBox');
223 224
       const datas_2 = manHourData[manHourNum - 1];
224 225
       var res2;
226
+      
225 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 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 232
       p2.innerHTML = res2;
231 233