|
@@ -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>,
|
|
|
});
|
|
|
}
|