Renxy пре 1 година
родитељ
комит
301f32bcd3
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 2
      src/models/eqSelfInspection.js
  2. 2 2
      src/pages/EqSelfInspection/components/Detail.js

+ 2 - 2
src/models/eqSelfInspection.js

@@ -206,7 +206,7 @@ export default {
         if (data?.sensorWaringNum > 0) num += 1;
         if (data?.dumuList?.length > 0) num += 1;
         if (data?.FaultAnalysis?.length > 0) num += 1;
-        if (errorNum.length > 0) num += errorNum;
+        if (errorNum?.length > 0) num += errorNum;
         data.warningTotalNum = num;
 
         data.patrolStatus = data?.extendWarningNum?.length > 0 ? 1 : 0;
@@ -214,7 +214,7 @@ export default {
         // data.secureStatus =
         //   data?.dumuList?.length > 0 || data?.sensorWaringNum > 0 ? 1 : 0;
         data.secureStatus =
-          data?.dumuList?.length > 0 || errorNum.length > 0 ? 1 : 0;
+          data?.dumuList?.length > 0 || errorNum?.length > 0 ? 1 : 0;
         let secureChild = [];
         let dumuStatus = 0;
         if (data?.dumuList?.length > 0) {

+ 2 - 2
src/pages/EqSelfInspection/components/Detail.js

@@ -890,12 +890,12 @@ function LiquidLevelCom(props) {
           items={[
             {
               key: '1',
-              label: `异常/警告(${errorData.length || 0})`,
+              label: `异常/警告(${errorData?.length || 0})`,
               children: <div></div>,
             },
             {
               key: '2',
-              label: `全部(${allData.length || 0})`,
+              label: `全部(${allData?.length || 0})`,
               children: <div></div>,
             },
           ]}