Commit 6d4c5df2 authored by 李纪文's avatar 李纪文

feat: 组态修复绑定数据干扰

parent 0a2f81f1
......@@ -67,7 +67,6 @@ let modalWidth = 520;
let historyInfoParams = [];
let statisticalInfoParams = {};
let nodeData = null; // 选中节点的数据
let bindData = [];
let twoID = '';
const waterFlow = new WaterFlowControlView();
......@@ -79,6 +78,7 @@ const ConfigurationView = (props) => {
// 入场动画
let entryAnim = '';
const guidAggre = {};
let bindData = [];
const stationList = [];
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-configuration-view');
......@@ -110,6 +110,7 @@ const ConfigurationView = (props) => {
const DomRef = useRef();
const TwoRef = useRef();
const loginTimer = useRef();
const bindDatas = useRef([]);
const ConfigurationViewRef = useCallback((dom) => {
if (DomRef) DomRef.current = !!dom;
setDomFlag(!!dom);
......@@ -167,6 +168,11 @@ const ConfigurationView = (props) => {
name,
type: siteInfo && siteInfo[name] ? siteInfo[name].Type : '',
});
bindDatas.current.push({
code: deviceList,
name,
type: siteInfo && siteInfo[name] ? siteInfo[name].Type : '',
});
devicesCode.push(deviceList);
});
await getPublicInfo();
......@@ -1653,7 +1659,7 @@ const ConfigurationView = (props) => {
// 控制日志内容渲染
const renderControlLogContent = () => {
const list = bindData.find((item) => {
const list = bindDatas.current.find((item) => {
return item.name === nodeData.stationName;
});
return list ? (
......
......@@ -66,7 +66,6 @@ let modalWidth = 520;
let historyInfoParams = [];
let statisticalInfoParams = {};
let nodeData = null; // 选中节点的数据
let bindData = [];
let twoID = '';
const waterFlow = new WaterFlowControlView();
......@@ -76,6 +75,7 @@ const ConfigurationView = (props) => {
let editionArr = [];
let globalControl = false;
const guidAggre = {};
let bindData = [];
const stationList = [];
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-configuration-view');
......@@ -107,6 +107,7 @@ const ConfigurationView = (props) => {
const DomRef = useRef();
const TwoRef = useRef();
const loginTimer = useRef();
const bindDatas = useRef([]);
const ConfigurationViewRef = useCallback((dom) => {
if (DomRef) DomRef.current = !!dom;
setDomFlag(!!dom);
......@@ -165,6 +166,11 @@ const ConfigurationView = (props) => {
name,
type: siteInfo && siteInfo[name] ? siteInfo[name].Type : '',
});
bindDatas.current.push({
code: deviceList,
name,
type: siteInfo && siteInfo[name] ? siteInfo[name].Type : '',
});
devicesCode.push(deviceList);
});
await getPublicInfo();
......@@ -1590,7 +1596,7 @@ const ConfigurationView = (props) => {
// 控制日志内容渲染
const renderControlLogContent = () => {
const list = bindData.find((item) => {
const list = bindDatas.current.find((item) => {
return item.name === nodeData.stationName;
});
return list ? (
......
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