sea-chart 0.0.67 → 0.0.68
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.
- package/dist/components/statistic-record-dialog/index.js +3 -2
- package/dist/utils/sql/chart-data-sql.js +3 -1
- package/dist/view/wrapper/combination.js +4 -1
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +1 -0
- package/dist/view/wrapper/table/two-dimension-table.js +6 -2
- package/package.json +1 -1
|
@@ -40,11 +40,12 @@ class StatisticRecordDialog extends React.Component {
|
|
|
40
40
|
}
|
|
41
41
|
this.unShowColumnKeyList = this.getUnShowColumnKeyList(this.view);
|
|
42
42
|
this.renderedColumns = this.getRenderedColumns(this.table);
|
|
43
|
-
if (this.isArchiveView || !isCalculateByView ||
|
|
43
|
+
if (this.isArchiveView || !isCalculateByView || statisticRecord.isQueryBySql) {
|
|
44
44
|
var _context$api;
|
|
45
45
|
const chartDataSQL = new ChartDataSQL({
|
|
46
46
|
table: this.table,
|
|
47
|
-
chart
|
|
47
|
+
chart,
|
|
48
|
+
view: this.view
|
|
48
49
|
});
|
|
49
50
|
const sqlString = chartDataSQL.get_statistic_record_sql(chart, statisticRecord, {
|
|
50
51
|
isColumn,
|
|
@@ -13,6 +13,7 @@ class ChartDataSQL {
|
|
|
13
13
|
var _chart$config;
|
|
14
14
|
let {
|
|
15
15
|
table,
|
|
16
|
+
view,
|
|
16
17
|
chart,
|
|
17
18
|
username,
|
|
18
19
|
userId,
|
|
@@ -1059,6 +1060,7 @@ class ChartDataSQL {
|
|
|
1059
1060
|
};
|
|
1060
1061
|
this.error = '';
|
|
1061
1062
|
this.table = table;
|
|
1063
|
+
this.view = view;
|
|
1062
1064
|
this.chart = (chart === null || chart === void 0 ? void 0 : chart.config) || {};
|
|
1063
1065
|
this.username = username;
|
|
1064
1066
|
const table_name = (table === null || table === void 0 ? void 0 : table.name) || '';
|
|
@@ -1072,7 +1074,7 @@ class ChartDataSQL {
|
|
|
1072
1074
|
Array.isArray(table.columns) && table.columns.forEach(column => {
|
|
1073
1075
|
this.column_key_map[column.key] = column;
|
|
1074
1076
|
});
|
|
1075
|
-
this.filter_sql = filter2SqlCondition(table,
|
|
1077
|
+
this.filter_sql = filter2SqlCondition(table, view, username, userId, userDepartmentIdsMap);
|
|
1076
1078
|
}
|
|
1077
1079
|
}
|
|
1078
1080
|
export default ChartDataSQL;
|
|
@@ -305,7 +305,10 @@ class Combination extends ChartComponent {
|
|
|
305
305
|
}, 100));
|
|
306
306
|
}
|
|
307
307
|
this.chart.on('element:click', e => {
|
|
308
|
-
this.props.toggleRecords(
|
|
308
|
+
this.props.toggleRecords({
|
|
309
|
+
...e.data.data,
|
|
310
|
+
isQueryBySql: true
|
|
311
|
+
});
|
|
309
312
|
});
|
|
310
313
|
this.chart.on('interval:mouseenter', e => {
|
|
311
314
|
if (this.isInsideInterval) return;
|
|
@@ -153,6 +153,7 @@ class OneDimensionTableWithNumericColumns extends PureComponent {
|
|
|
153
153
|
key: "table-cell-".concat(cellIdx),
|
|
154
154
|
onClick: () => this.toggleRecords({
|
|
155
155
|
rows,
|
|
156
|
+
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name,
|
|
156
157
|
total: total[key]
|
|
157
158
|
}, {
|
|
158
159
|
rowIdx,
|
|
@@ -214,7 +214,10 @@ class TwoDimensionTable extends PureComponent {
|
|
|
214
214
|
'selected-pivot-cell-left': isSelectedCellLeft
|
|
215
215
|
}),
|
|
216
216
|
key: "table-cell-".concat(cellIdx),
|
|
217
|
-
onClick: () => this.toggleRecords(
|
|
217
|
+
onClick: () => this.toggleRecords({
|
|
218
|
+
...c,
|
|
219
|
+
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name
|
|
220
|
+
}, {
|
|
218
221
|
rowIdx,
|
|
219
222
|
cellIdx
|
|
220
223
|
}),
|
|
@@ -265,7 +268,8 @@ class TwoDimensionTable extends PureComponent {
|
|
|
265
268
|
}),
|
|
266
269
|
onClick: () => this.toggleRecords({
|
|
267
270
|
rows: Array.isArray(cells) && cells.length > 0 ? pivotRowCells : rowItem.rows,
|
|
268
|
-
total: total
|
|
271
|
+
total: total,
|
|
272
|
+
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name
|
|
269
273
|
}, {
|
|
270
274
|
rowIdx,
|
|
271
275
|
cellIdx: cells.length
|