|
|
@@ -51,14 +51,16 @@ export default {
|
|
|
header: { label: '无标题' },
|
|
|
columns: [],
|
|
|
baseConfig: { dataSource: { code: '' }, viewType: '' },
|
|
|
- aggregateTableConfig: { targetColumn: {}, statistics: [], groupBy: [], direction: ['vertical', 'horizontal'][0] },
|
|
|
+ aggregateTableConfig: { targetColumn: {}, statistics: [], groupBy: [] },
|
|
|
dataViewConfig: { viewColumns: [], sortColumn: {key: ''}, sortType: 'asc' },
|
|
|
barConfig: { xAxis: { column: {}, granularity: {} }, yAxis: { column: {}, gauge: {} }, groupBy: {key:''}, threshold: 20 },
|
|
|
lineConfig: { xAxis: { column: {}, granularity: {} }, yAxis: { column: {}, gauge: {} }, groupBy: {key:''}, threshold: 1000 },
|
|
|
pieConfig: { xAxis: { column: {}, granularity: {} }, yAxis: { column: {}, gauge: {} }, threshold: 20 },
|
|
|
scatterConfig: { xAxis: { column: {}, granularity: {} }, yAxis: { column: {}, gauge: {} }, groupBy: {key:''}, threshold: 1000 },
|
|
|
theme: 'default',
|
|
|
- styleConfig: { bar: {}, line: {}, pie: {}, scatter: {} },
|
|
|
+ styleConfig: {
|
|
|
+ aggregateTable: { direction: ['vertical', 'horizontal'][0] },
|
|
|
+ },
|
|
|
otherConfig:{},
|
|
|
description: '',
|
|
|
filters: [],
|
|
|
@@ -525,7 +527,7 @@ export default {
|
|
|
*fetchAggregateTableData(action, { select, call, put }) {
|
|
|
try {
|
|
|
const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
- const { code, aggregateTableConfig, filters, theme, styleConfig } = chartDesigner;
|
|
|
+ const { originData, code, aggregateTableConfig, filters, theme, styleConfig } = chartDesigner;
|
|
|
const { targetColumn, statistics } = aggregateTableConfig;
|
|
|
|
|
|
const body = {
|
|
|
@@ -536,7 +538,7 @@ export default {
|
|
|
filters: getBodyFilters(filters),
|
|
|
testPage: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 999999999,
|
|
|
+ pageSize: 99,
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -546,7 +548,7 @@ export default {
|
|
|
timeout: 30000
|
|
|
});
|
|
|
if(!res.err && res.data.code > 0) {
|
|
|
- let option = parseChartOption('aggregateTable', res.data.data, aggregateTableConfig, theme, styleConfig.aggregateTable);
|
|
|
+ let option = parseChartOption('aggregateTable', res.data.data, aggregateTableConfig, theme, styleConfig.aggregateTable || originData.styleConfig.aggregateTable);
|
|
|
yield put({ type: 'silentSetField', name: 'chartOption', value: option });
|
|
|
}else {
|
|
|
message.error('请求统计数据失败: ' + (res.err || res.data.msg));
|