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

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

parent 04295432
......@@ -563,7 +563,7 @@ const HistoryView = (props) => {
aDom.click();
aDom.remove();
})
.catch((err) => {});
.catch((err) => { });
});
};
......@@ -749,9 +749,13 @@ const HistoryView = (props) => {
const dataItem = res.data.find(
(d) => d.stationCode === p.deviceCode && d.sensorName === s,
);
dataItem.dateFrom = dateFrom;
dataItem.dateTo = dateTo;
return dataItem;
if (dataItem) {
dataItem.dateFrom = dateFrom || '';
dataItem.dateTo = dateTo || '';
return dataItem;
} else {
return {};
}
});
data = data.concat(list);
});
......@@ -833,7 +837,7 @@ const HistoryView = (props) => {
columns={columns}
{...tableProps}
pagination={false}
onChange={() => {}}
onChange={() => { }}
/>
) : (
<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