|
|
@ -609,7 +609,7 @@ export default { |
|
|
this.columns.forEach((col, colIndex) => { |
|
|
this.columns.forEach((col, colIndex) => { |
|
|
const currentValue = row[col.prop]; |
|
|
const currentValue = row[col.prop]; |
|
|
const compareToValue = row[col.compareTo]; |
|
|
const compareToValue = row[col.compareTo]; |
|
|
if (col.compareTo && currentValue && compareToValue) { |
|
|
|
|
|
|
|
|
if (col.compareTo && !this.isValueEmpty(currentValue) && !this.isValueEmpty(compareToValue)) { |
|
|
// 比较当前值和compareTo值,如果不相等则设置橙色背景 |
|
|
// 比较当前值和compareTo值,如果不相等则设置橙色背景 |
|
|
if (!isEqual(currentValue, compareToValue)) { |
|
|
if (!isEqual(currentValue, compareToValue)) { |
|
|
this.setOrangeBg(rowIndex, colIndex, col.prop, true); |
|
|
this.setOrangeBg(rowIndex, colIndex, col.prop, true); |
|
|
@ -624,7 +624,7 @@ export default { |
|
|
const currentValue = row[col.bodySubKey]; |
|
|
const currentValue = row[col.bodySubKey]; |
|
|
const compareToValue = row[col.bodySubCompareTo]; |
|
|
const compareToValue = row[col.bodySubCompareTo]; |
|
|
|
|
|
|
|
|
if (!!currentValue && !!compareToValue) { |
|
|
|
|
|
|
|
|
if (!this.isValueEmpty(currentValue) && !this.isValueEmpty(compareToValue)) { |
|
|
// 比较当前值和compareTo值,如果不相等则设置橙色背景 |
|
|
// 比较当前值和compareTo值,如果不相等则设置橙色背景 |
|
|
if (!isEqual(currentValue, compareToValue)) { |
|
|
if (!isEqual(currentValue, compareToValue)) { |
|
|
this.setOrangeBg(rowIndex, colIndex, col.bodySubKey, true); |
|
|
this.setOrangeBg(rowIndex, colIndex, col.bodySubKey, true); |
|
|
|