dtable-statistic 5.0.42-alpha.26 → 5.0.42-alpha.27
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.
|
@@ -252,14 +252,10 @@ const exportOneDimensionToTable = _ref => {
|
|
|
252
252
|
newRow[name] = cellValue;
|
|
253
253
|
rowTotal = rowTotal + Number(cellValue);
|
|
254
254
|
});
|
|
255
|
-
|
|
256
|
-
console.log('newRow', newRow);
|
|
255
|
+
// total row
|
|
257
256
|
newRow[_reactIntlUniversal.default.get('Total')] = rowTotal;
|
|
258
257
|
rows.push(newRow);
|
|
259
258
|
});
|
|
260
|
-
|
|
261
|
-
// total row
|
|
262
|
-
|
|
263
259
|
console.log(11, {
|
|
264
260
|
columns,
|
|
265
261
|
rows
|
|
@@ -614,18 +610,22 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
614
610
|
let oldRow = {};
|
|
615
611
|
Array.isArray(pivot_columns) && pivot_columns.forEach(item => {
|
|
616
612
|
const {
|
|
617
|
-
key
|
|
618
|
-
method
|
|
613
|
+
key
|
|
619
614
|
} = item;
|
|
620
615
|
const column = columnMap[key];
|
|
621
616
|
const cellValueKey = key;
|
|
622
617
|
const totalCellValue = getValidValueForColumn(column, total[cellValueKey]);
|
|
618
|
+
console.log('column', column);
|
|
619
|
+
console.log('cellValueKey', cellValueKey);
|
|
620
|
+
console.log('totalCellValue', totalCellValue);
|
|
623
621
|
if (column && (0, _cellValue.isCellValueChanged)(row[column.key], totalCellValue, column.type)) {
|
|
622
|
+
console.log(111);
|
|
624
623
|
updateRow[column.key] = totalCellValue;
|
|
625
624
|
oldRow[column.key] = row[column.key];
|
|
626
625
|
}
|
|
627
626
|
});
|
|
628
627
|
if (Object.keys(updateRow).length > 0) {
|
|
628
|
+
console.log(222);
|
|
629
629
|
const rowId = row._id;
|
|
630
630
|
rowIds.push(rowId);
|
|
631
631
|
updatedRows[rowId] = updateRow;
|
|
@@ -650,6 +650,12 @@ const updatedOneDimensionToTable = _ref5 => {
|
|
|
650
650
|
newRows.push(newRow);
|
|
651
651
|
}
|
|
652
652
|
});
|
|
653
|
+
console.log('update', {
|
|
654
|
+
newRows,
|
|
655
|
+
updatedRows,
|
|
656
|
+
rowIds,
|
|
657
|
+
oldRows
|
|
658
|
+
});
|
|
653
659
|
return {
|
|
654
660
|
newRows,
|
|
655
661
|
updatedRows,
|