Commit c07ac8629f2c4d024dc97e1a9f6125f4a3564d27
Merge branch 'fix/DEFECT-1511' into 'main_dev'
fix: DEFECT-1511 修复流量计组件无法回显小数类型的值 See merge request yunteng/thingskit-scada!124
Showing
3 changed files
with
13 additions
and
2 deletions
| ... | ... | @@ -667,7 +667,7 @@ | 
| 667 | 667 | </g> | 
| 668 | 668 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> | 
| 669 | 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 | 671 | </foreignObject> | 
| 672 | 672 | </svg> | 
| 673 | 673 | `.replace(/\n/g, '') | 
| ... | ... | @@ -752,7 +752,7 @@ | 
| 752 | 752 | </g> | 
| 753 | 753 | <rect class="waveThird" x="0" y="0" width="100" height="100" fill="#2d55aa"></rect> | 
| 754 | 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 | 756 | </foreignObject> | 
| 757 | 757 | </svg> | 
| 758 | 758 | `.replace(/\n/g, '') | ... | ... | 
| ... | ... | @@ -15351,6 +15351,7 @@ class HandleDataSource { | 
| 15351 | 15351 | if (element) { | 
| 15352 | 15352 | if (type === flowmeterType.CIRCLE || type === flowmeterType.RECT) { | 
| 15353 | 15353 | const element = document.getElementById(id).querySelector('svg') | 
| 15354 | + element.querySelector('.text').innerHTML = `${Number(receiveValue).toFixed(2)} %` | |
| 15354 | 15355 | element.style.setProperty('--value', receiveValue) | 
| 15355 | 15356 | } | 
| 15356 | 15357 | if (type === flowmeterType.THERMOMETER) { | ... | ... | 
| ... | ... | @@ -592,3 +592,13 @@ html > body > .geMenubarContainer > .geMenubar > .thingskit-button-container { | 
| 592 | 592 | .left-button-container { | 
| 593 | 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 | +} | ... | ... |