Commit 91aa039b authored by 李纪文's avatar 李纪文

feat: 组态实时数据容错处理

parent 050b23ea
...@@ -1198,13 +1198,9 @@ const ConfigurationView = (props) => { ...@@ -1198,13 +1198,9 @@ const ConfigurationView = (props) => {
const pvList = list.dataList.find((arr) => { const pvList = list.dataList.find((arr) => {
return arr.dName === item.shName; return arr.dName === item.shName;
}); });
if (!bindList || item.stationName !== bindList.name) return false; if (!bindList || !pvList) return false;
if ( if (item.stationName !== bindList.name) return false;
!pvList || if (pvList.pv === null || pvList.dName !== item.shName || item.realVal === pvList.pv)
pvList.pv === null ||
pvList.dName !== item.shName ||
item.realVal === pvList.pv
)
return false; return false;
item.realVal = pvList.pv * 1; item.realVal = pvList.pv * 1;
const shRule = ruleOperation(item, item.realVal); const shRule = ruleOperation(item, item.realVal);
...@@ -1240,12 +1236,10 @@ const ConfigurationView = (props) => { ...@@ -1240,12 +1236,10 @@ const ConfigurationView = (props) => {
const pvList = list.dataList.find((arr) => { const pvList = list.dataList.find((arr) => {
return arr.dName === item.shName; return arr.dName === item.shName;
}); });
if (!bindList || item.stationName !== bindList.name) return false; if (!bindList || !pvList) return false;
if (item.stationName !== bindList.name) return false;
if ( if (
(!pvList || (pvList.pv === null || pvList.dName !== item.shName || item.realVal === pvList.pv) &&
pvList.pv === null ||
pvList.dName !== item.shName ||
item.realVal === pvList.pv) &&
pvList.dName !== item.stateName pvList.dName !== item.stateName
) )
return false; return false;
......
...@@ -1169,13 +1169,9 @@ const ConfigurationView = (props) => { ...@@ -1169,13 +1169,9 @@ const ConfigurationView = (props) => {
const pvList = list.dataList.find((arr) => { const pvList = list.dataList.find((arr) => {
return arr.dName === item.shName; return arr.dName === item.shName;
}); });
if (!bindList || item.stationName !== bindList.name) return false; if (!bindList || !pvList) return false;
if ( if (item.stationName !== bindList.name) return false;
!pvList || if (pvList.pv === null || pvList.dName !== item.shName || item.realVal === pvList.pv)
pvList.pv === null ||
pvList.dName !== item.shName ||
item.realVal === pvList.pv
)
return false; return false;
item.realVal = pvList.pv * 1; item.realVal = pvList.pv * 1;
const shRule = ruleOperation(item, item.realVal); const shRule = ruleOperation(item, item.realVal);
...@@ -1211,12 +1207,10 @@ const ConfigurationView = (props) => { ...@@ -1211,12 +1207,10 @@ const ConfigurationView = (props) => {
const pvList = list.dataList.find((arr) => { const pvList = list.dataList.find((arr) => {
return arr.dName === item.shName; return arr.dName === item.shName;
}); });
if (!bindList || item.stationName !== bindList.name) return false; if (!bindList || !pvList) return false;
if (item.stationName !== bindList.name) return false;
if ( if (
(!pvList || (pvList.pv === null || pvList.dName !== item.shName || item.realVal === pvList.pv) &&
pvList.pv === null ||
pvList.dName !== item.shName ||
item.realVal === pvList.pv) &&
pvList.dName !== item.stateName pvList.dName !== item.stateName
) )
return false; return false;
......
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