|
@@ -386,7 +386,10 @@ const containChangeTotalBlur = (row) => {
|
|
|
|
|
|
//判断是否红色
|
|
|
const addTableRowStyle = ({ row }) => {
|
|
|
- if (row.allMeterTotal > row.changeTotal) {
|
|
|
+ let allMeterTotal = new BigNumber(row.allMeterTotal)
|
|
|
+ let changeTotal = new BigNumber(row.changeTotal)
|
|
|
+ const isCompared = allMeterTotal.comparedTo(changeTotal)
|
|
|
+ if (!isCompared || isCompared === 1) {
|
|
|
return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
|
|
|
}
|
|
|
}
|