dtable-statistic 5.0.42-alpha.27 → 5.0.42-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -608,6 +608,7 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
608
608
|
if (row) {
|
|
609
609
|
let updateRow = {};
|
|
610
610
|
let oldRow = {};
|
|
611
|
+
let rowTotal = 0;
|
|
611
612
|
Array.isArray(pivot_columns) && pivot_columns.forEach(item => {
|
|
612
613
|
const {
|
|
613
614
|
key
|
|
@@ -615,15 +616,19 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
615
616
|
const column = columnMap[key];
|
|
616
617
|
const cellValueKey = key;
|
|
617
618
|
const totalCellValue = getValidValueForColumn(column, total[cellValueKey]);
|
|
618
|
-
console.log('column', column);
|
|
619
|
-
console.log('cellValueKey', cellValueKey);
|
|
620
|
-
console.log('totalCellValue', totalCellValue);
|
|
621
619
|
if (column && (0, _cellValue.isCellValueChanged)(row[column.key], totalCellValue, column.type)) {
|
|
622
|
-
console.log(111);
|
|
623
620
|
updateRow[column.key] = totalCellValue;
|
|
624
621
|
oldRow[column.key] = row[column.key];
|
|
622
|
+
rowTotal = rowTotal + Number(totalCellValue);
|
|
625
623
|
}
|
|
626
624
|
});
|
|
625
|
+
|
|
626
|
+
// total column
|
|
627
|
+
console.log('rowTotal', rowTotal);
|
|
628
|
+
const column = columnMap[_reactIntlUniversal.default.get('Total')];
|
|
629
|
+
console.log('column', column);
|
|
630
|
+
updateRow[_reactIntlUniversal.default.get('Total')] = totalCellValue;
|
|
631
|
+
oldRow[_reactIntlUniversal.default.get('Total')] = row[column.key];
|
|
627
632
|
if (Object.keys(updateRow).length > 0) {
|
|
628
633
|
console.log(222);
|
|
629
634
|
const rowId = row._id;
|