Commit bc521652 authored by 李纪文's avatar 李纪文

fix: 兼容组态V1前

parent 00852529
...@@ -142,12 +142,12 @@ const ConfigurationView = (props) => { ...@@ -142,12 +142,12 @@ const ConfigurationView = (props) => {
const showNodeMethod = (node, list) => { const showNodeMethod = (node, list) => {
const realVal = list.Value * 1; const realVal = list.Value * 1;
let switchState; let switchState;
myDiagram.model.setDataProperty(node, 'realVal', realVal);
if (node.switch === '是') { if (node.switch === '是') {
switchState = openValState(node.openVal, realVal) ? '开' : '关'; switchState = openValState(node.openVal, realVal) ? '开' : '关';
myDiagram.model.setDataProperty(node, 'switchState', switchState); myDiagram.model.setDataProperty(node, 'switchState', switchState);
} }
if (!node.shType) return false; if (!node.shType) return false;
myDiagram.model.setDataProperty(node, 'realVal', realVal);
const patt = /[><=]/gi; const patt = /[><=]/gi;
let shRule = []; let shRule = [];
try { try {
......
...@@ -172,12 +172,12 @@ const ConfigurationView = (props) => { ...@@ -172,12 +172,12 @@ const ConfigurationView = (props) => {
const showNodeMethod = (node, list) => { const showNodeMethod = (node, list) => {
const realVal = list.Value * 1; const realVal = list.Value * 1;
let switchState; let switchState;
myDiagram.model.setDataProperty(node, 'realVal', realVal);
if (node.switch === '是') { if (node.switch === '是') {
switchState = openValState(node.openVal, realVal) ? '开' : '关'; switchState = openValState(node.openVal, realVal) ? '开' : '关';
myDiagram.model.setDataProperty(node, 'switchState', switchState); myDiagram.model.setDataProperty(node, 'switchState', switchState);
} }
if (!node.shType) return false; if (!node.shType) return false;
myDiagram.model.setDataProperty(node, 'realVal', realVal);
const patt = /[><=]/gi; const patt = /[><=]/gi;
let shRule = []; let shRule = [];
try { try {
......
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