6-25bug更改

This commit is contained in:
wangxk 2025-06-25 14:33:39 +08:00
parent 49da0121b2
commit 6a8ba92485
2 changed files with 13 additions and 5 deletions

View File

@ -239,11 +239,19 @@ function comparePercentage(percentStr: any) {
percentStr.resar = false percentStr.resar = false
return percentStr.spaceOccupancyRatio; return percentStr.spaceOccupancyRatio;
} }
const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', '')); const arr = percentStr.spaceOccupancyRatio.split(";").map(item => parseFloat(item.replace("%", "")));
if(arr.length > 0){
if (percent > 80 || percent == 80) { arr.forEach(item => {
if (item > 80 || item == 80) {
percentStr.resar = true percentStr.resar = true
} }
});
}
// const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', ''));
// if (percent > 80 || percent == 80) {
// percentStr.resar = true
// }
return percentStr.spaceOccupancyRatio; return percentStr.spaceOccupancyRatio;
} }