Commit 3d353831 authored by 李纪文's avatar 李纪文

fix: 千分增加千分分割

parent 0f1459f8
......@@ -164,10 +164,19 @@ const ConfigurationView = (props) => {
}
break;
case 'valCase': // 实时值模型
const division = node.division || false;
if (node.shType === '值显示') {
myDiagram.model.setDataProperty(node, 'showVal', realVal < 0 ? 0 : realVal);
myDiagram.model.setDataProperty(
node,
'showVal',
realVal < 0 ? 0 : division ? realVal.toLocaleString() : realVal,
);
} else {
myDiagram.model.setDataProperty(node, 'showVal', realVal);
myDiagram.model.setDataProperty(
node,
'showVal',
division ? realVal.toLocaleString() : realVal,
);
}
if (node.stateName) return false;
shRule = ruleOperation(node, realVal);
......
......@@ -193,10 +193,19 @@ const ConfigurationView = (props) => {
}
break;
case 'valCase': // 实时值模型
const division = node.division || false;
if (node.shType === '值显示') {
myDiagram.model.setDataProperty(node, 'showVal', realVal < 0 ? 0 : realVal);
myDiagram.model.setDataProperty(
node,
'showVal',
realVal < 0 ? 0 : division ? realVal.toLocaleString() : realVal,
);
} else {
myDiagram.model.setDataProperty(node, 'showVal', realVal);
myDiagram.model.setDataProperty(
node,
'showVal',
division ? realVal.toLocaleString() : realVal,
);
}
// 颜色规则
if (node.stateName) 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