Commit 9cf69177 authored by 徐乐's avatar 徐乐

feat: 修改历史曲线控件在指标缺失时报错问题

parent 04295432
...@@ -563,7 +563,7 @@ const HistoryView = (props) => { ...@@ -563,7 +563,7 @@ const HistoryView = (props) => {
aDom.click(); aDom.click();
aDom.remove(); aDom.remove();
}) })
.catch((err) => {}); .catch((err) => { });
}); });
}; };
...@@ -749,9 +749,13 @@ const HistoryView = (props) => { ...@@ -749,9 +749,13 @@ const HistoryView = (props) => {
const dataItem = res.data.find( const dataItem = res.data.find(
(d) => d.stationCode === p.deviceCode && d.sensorName === s, (d) => d.stationCode === p.deviceCode && d.sensorName === s,
); );
dataItem.dateFrom = dateFrom; if (dataItem) {
dataItem.dateTo = dateTo; dataItem.dateFrom = dateFrom || '';
return dataItem; dataItem.dateTo = dateTo || '';
return dataItem;
} else {
return {};
}
}); });
data = data.concat(list); data = data.concat(list);
}); });
...@@ -833,7 +837,7 @@ const HistoryView = (props) => { ...@@ -833,7 +837,7 @@ const HistoryView = (props) => {
columns={columns} columns={columns}
{...tableProps} {...tableProps}
pagination={false} pagination={false}
onChange={() => {}} onChange={() => { }}
/> />
) : ( ) : (
<PandaEmpty /> <PandaEmpty />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment