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

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

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