Commit f4a311d4 authored by 崔佳豪's avatar 崔佳豪

fix(EC_RealTimeInfo): 处理实时数据guid显示问题

parent 6751e4c0
......@@ -166,6 +166,8 @@ const RealTimeInfo = (props) => {
useEffect(() => {
if (!tabKey || !tabData || !tabData.length) return;
GetPointAddressEntry();
const g = tabData.filter((item) => item.key === tabKey);
setGuid(g?.[0]?.guid);
}, [tabKey]);
const formatData = (data = [], sensorType = [], deviceInfo = {}) => {
......@@ -243,8 +245,6 @@ const RealTimeInfo = (props) => {
};
const onTabChange = (key) => {
const g = tabData.filter((item) => item.key === key);
setGuid(g[0].guid);
setTabKey(key);
};
......
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