Kaynağa Gözat

系统自检历史记录

xujunjie 1 yıl önce
ebeveyn
işleme
b2a39f6adc

+ 2 - 3
src/pages/EqSelfInspection/components/Table/DosingFlowCom.js

@@ -27,7 +27,7 @@ export default function DosingFlowCom(props) {
     allData?.forEach((item) => {
       if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.history && item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.history) {
         data.normalData.push(item);
       }
     });
@@ -44,7 +44,7 @@ export default function DosingFlowCom(props) {
         children: <div></div>,
       });
     }
-    if (showAllTabs || normalData.length > 0) {
+    if (showAllTabs) {
       items.push({
         key: '0',
         label: `历史记录(${normalData.length || 0})`,
@@ -203,7 +203,6 @@ function DosingFlowTable(props) {
     <Table
       columns={columns}
       dataSource={items}
-      rowKey="device_code"
       locale={{
         emptyText: <Empty />,
       }}

+ 3 - 3
src/pages/EqSelfInspection/components/Table/LiquidLevelCom.js

@@ -27,7 +27,7 @@ export default function LiquidLevelCom(props) {
     allData?.forEach((item) => {
       if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.history && item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.history) {
         data.normalData.push(item);
       }
     });
@@ -44,7 +44,7 @@ export default function LiquidLevelCom(props) {
         children: <div></div>,
       });
     }
-    if (showAllTabs || normalData.length > 0) {
+    if (showAllTabs) {
       items.push({
         key: '0',
         label: `历史记录(${normalData.length || 0})`,
@@ -77,7 +77,7 @@ export default function LiquidLevelCom(props) {
         <div className={styles.tipTitle}>
           液位校验
           <Popover content={content}>
-            <i></i>
+            <Icon type="info-circle" style={{ marginLeft: 20 }} />
           </Popover>
         </div>
         <TabsContent

+ 3 - 3
src/pages/EqSelfInspection/components/Table/PressureGaugeCom.js

@@ -141,7 +141,7 @@ export default function PressureGaugeCom(props) {
     allData?.forEach((item) => {
       if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.history && item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.history) {
         data.normalData.push(item);
       }
     });
@@ -158,10 +158,10 @@ export default function PressureGaugeCom(props) {
         children: <div></div>,
       });
     }
-    if (showAllTabs || normalData.length > 0) {
+    if (showAllTabs) {
       items.push({
         key: '0',
-        label: `正常(${normalData.length || 0})`,
+        label: `历史数据(${normalData.length || 0})`,
         children: <div></div>,
       });
     }

+ 1 - 1
src/pages/EqSelfInspection/components/Table/WaterInCom.js

@@ -26,7 +26,7 @@ export default function WaterInCom(props) {
     allData?.forEach((item) => {
       if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.history && item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.status == 0 && statusCheck.includes(0)) {
         data.normalData.push(item);
       }
     });

+ 5 - 5
src/pages/EqSelfInspection/components/Table/WaterQualityCom.js

@@ -139,10 +139,10 @@ export default function WaterQualityCom(props) {
 
   const { errorTableData, normalData } = useMemo(() => {
     let data = { errorTableData: [], normalData: [] };
-    allData?.forEach((item) => {
-      if (item.status == 1 && statusCheck.includes(1)) {
+    allData?.forEach(item => {
+      if (!item.history && item.status == 1 && statusCheck.includes(1)) {
         data.errorTableData.push(item);
-      } else if (item.status == 0 && statusCheck.includes(0)) {
+      } else if (item.history) {
         data.normalData.push(item);
       }
     });
@@ -159,10 +159,10 @@ export default function WaterQualityCom(props) {
         children: <div></div>,
       });
     }
-    if (showAllTabs || normalData.length > 0) {
+    if (showAllTabs) {
       items.push({
         key: '0',
-        label: `正常(${normalData.length || 0})`,
+        label: `历史数据(${normalData.length || 0})`,
         children: <div></div>,
       });
     }