Browse Source

处理能耗报表报错问题

meizhou
selia-zx 3 weeks ago
parent
commit
1629c56cc5
  1. 17
      src/views/hotWater/energyAnalysis/components/energyReport.vue

17
src/views/hotWater/energyAnalysis/components/energyReport.vue

@ -251,11 +251,18 @@ export default {
},
methods: {
isPositive(value) {
//
const numberPart = value.replace("%", "");
//
const num = parseFloat(numberPart);
return num > 0;
// value
if (typeof value === "string") {
//
const numberPart = value.replace("%", "");
//
const num = parseFloat(numberPart);
return num > 0;
} else {
//
// console.error(":", value);
return false;
}
},
handleEnter(index) {
this.currentIndex = index;

Loading…
Cancel
Save