Commit 03235c16efe1b29bc684cbf47bef3127eb7644fd
1 parent
d15c0347
fix: DEFECT-1511 修复流量计组件无法回显小数类型的值
Showing
3 changed files
with
13 additions
and
2 deletions
@@ -667,7 +667,7 @@ | @@ -667,7 +667,7 @@ | ||
667 | </g> | 667 | </g> |
668 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> | 668 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> |
669 | <foreignObject x="0" y="0" width="100" height="100" text-anchor="middle" dominant-baseline="middle"> | 669 | <foreignObject x="0" y="0" width="100" height="100" text-anchor="middle" dominant-baseline="middle"> |
670 | - <div xmlns="http://www.w3.org/1999/xhtml" class="text"></div> | 670 | + <div xmlns="http://www.w3.org/1999/xhtml" class="text">20 %</div> |
671 | </foreignObject> | 671 | </foreignObject> |
672 | </svg> | 672 | </svg> |
673 | `.replace(/\n/g, '') | 673 | `.replace(/\n/g, '') |
@@ -752,7 +752,7 @@ | @@ -752,7 +752,7 @@ | ||
752 | </g> | 752 | </g> |
753 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> | 753 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> |
754 | <foreignObject x="0" y="0" width="100" height="100" text-anchor="middle" dominant-baseline="middle"> | 754 | <foreignObject x="0" y="0" width="100" height="100" text-anchor="middle" dominant-baseline="middle"> |
755 | - <div xmlns="http://www.w3.org/1999/xhtml" class="text"></div> | 755 | + <div xmlns="http://www.w3.org/1999/xhtml" class="text">20 %</div> |
756 | </foreignObject> | 756 | </foreignObject> |
757 | </svg> | 757 | </svg> |
758 | `.replace(/\n/g, '') | 758 | `.replace(/\n/g, '') |
@@ -15348,6 +15348,7 @@ class HandleDataSource { | @@ -15348,6 +15348,7 @@ class HandleDataSource { | ||
15348 | if (element) { | 15348 | if (element) { |
15349 | if (type === flowmeterType.CIRCLE || type === flowmeterType.RECT) { | 15349 | if (type === flowmeterType.CIRCLE || type === flowmeterType.RECT) { |
15350 | const element = document.getElementById(id).querySelector('svg') | 15350 | const element = document.getElementById(id).querySelector('svg') |
15351 | + element.querySelector('.text').innerHTML = `${Number(receiveValue).toFixed(2)} %` | ||
15351 | element.style.setProperty('--value', receiveValue) | 15352 | element.style.setProperty('--value', receiveValue) |
15352 | } | 15353 | } |
15353 | if (type === flowmeterType.THERMOMETER) { | 15354 | if (type === flowmeterType.THERMOMETER) { |
@@ -592,3 +592,13 @@ html > body > .geMenubarContainer > .geMenubar > .thingskit-button-container { | @@ -592,3 +592,13 @@ html > body > .geMenubarContainer > .geMenubar > .thingskit-button-container { | ||
592 | .left-button-container { | 592 | .left-button-container { |
593 | flex: 1 1 auto; | 593 | flex: 1 1 auto; |
594 | } | 594 | } |
595 | + | ||
596 | +.waves-rect .text::after { | ||
597 | + counter-reset: none !important; | ||
598 | + content: none !important; | ||
599 | +} | ||
600 | + | ||
601 | +.waves-circle .text::after { | ||
602 | + counter-reset: none !important; | ||
603 | + content: none !important; | ||
604 | +} |