|
|
@@ -164,14 +164,14 @@ export default {
|
|
|
},
|
|
|
*changeDataSource(action, { select, call, put }) {
|
|
|
const { dataSource } = action;
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { baseConfig } = chartDesigner;
|
|
|
yield put({ type: 'changeField', name: 'baseConfig', value: { ...baseConfig, dataSource } });
|
|
|
yield put({ type: 'remoteDataColumn', code: dataSource.code });
|
|
|
},
|
|
|
*initChangeDataSource(action, { select, call, put, take }) {
|
|
|
const { dataSource } = action;
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { baseConfig } = chartDesigner;
|
|
|
yield put({ type: 'silentChangeField', name: 'baseConfig', value: { ...baseConfig, dataSource } });
|
|
|
yield put({ type: 'remoteDataColumn', code: dataSource.code });
|
|
|
@@ -219,7 +219,7 @@ export default {
|
|
|
try{
|
|
|
yield put({ type: 'chart/remoteModify' });
|
|
|
const { newHeaderLabel } = action;
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { filters, baseConfig, otherConfig, description, group, chartOption, fetchConfig, styleConfig, theme } = chartDesigner;
|
|
|
let body = {
|
|
|
filters: JSON.stringify(filters),
|
|
|
@@ -297,7 +297,7 @@ export default {
|
|
|
},
|
|
|
// 因为数据源列字段可能发生重命名,需要替换到最新的列
|
|
|
*updateColumns(action, { select, call, put }) {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { columns, baseConfig } = chartDesigner;
|
|
|
const { viewType } = baseConfig;
|
|
|
try {
|
|
|
@@ -399,7 +399,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
*fetchChartData(action, { select, call, put }) {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { baseConfig } = chartDesigner;
|
|
|
const { viewType } = baseConfig;
|
|
|
const { page, pageSize, drillDown } = action;
|
|
|
@@ -477,8 +477,8 @@ export default {
|
|
|
*fetchBarData(action, { select, call, put }) {
|
|
|
try {
|
|
|
const { inDashBoard, item } = action;
|
|
|
- let chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
- let dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
+ let chartDesigner = yield select(state => state.chartDesigner);
|
|
|
+ let dashboardDesigner = yield select(state => state.dashboardDesigner);
|
|
|
let { code, barConfig, filters, theme, styleConfig, defaultBarThreshold } = chartDesigner;
|
|
|
if(inDashBoard){
|
|
|
code = item.code;
|
|
|
@@ -570,8 +570,8 @@ export default {
|
|
|
*fetchPieData(action, { select, call, put }) {
|
|
|
try {
|
|
|
const { inDashBoard, item, drillDown } = action;
|
|
|
- let chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
- let dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
+ let chartDesigner = yield select(state => state.chartDesigner);
|
|
|
+ let dashboardDesigner = yield select(state => state.dashboardDesigner);
|
|
|
let { code, pieConfig, filters, theme, styleConfig, defaultPieThreshold } = chartDesigner;
|
|
|
if(inDashBoard){
|
|
|
code = item.code;
|
|
|
@@ -660,10 +660,10 @@ export default {
|
|
|
},
|
|
|
*fetchLineData(action, { select, call, put }) {
|
|
|
try {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
let { code, lineConfig, filters, theme, styleConfig, defaultLineThreshold } = chartDesigner;
|
|
|
const { inDashBoard, item } = action;
|
|
|
- let dashboardDesigner = yield select(state => state.present.dashboardDesigner);
|
|
|
+ let dashboardDesigner = yield select(state => state.dashboardDesigner);
|
|
|
if(inDashBoard){
|
|
|
code = item.code;
|
|
|
filters = item.filters || [];
|
|
|
@@ -750,7 +750,7 @@ export default {
|
|
|
},
|
|
|
*fetchScatterData(action, { select, call, put }) {
|
|
|
try {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { code, scatterConfig, filters, theme, styleConfig, defaultScatterThreshold } = chartDesigner;
|
|
|
const body = {
|
|
|
id: code,
|
|
|
@@ -797,7 +797,7 @@ export default {
|
|
|
},
|
|
|
*fetchDataViewData(action, { select, call, put }) {
|
|
|
try {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { code, dataViewConfig, filters, theme, styleConfig } = chartDesigner;
|
|
|
const { page, pageSize } = action;
|
|
|
const body = {
|
|
|
@@ -841,7 +841,7 @@ export default {
|
|
|
},
|
|
|
*fetchAggregateTableData(action, { select, call, put }) {
|
|
|
try {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { code, aggregateTableConfig, filters, theme, styleConfig } = chartDesigner;
|
|
|
const { targetColumn, statistics: statisticsNames } = aggregateTableConfig;
|
|
|
|
|
|
@@ -897,7 +897,7 @@ export default {
|
|
|
},
|
|
|
*fetchIndicatorData(action, { select, call, put }) {
|
|
|
try {
|
|
|
- const chartDesigner = yield select(state => state.present.chartDesigner);
|
|
|
+ const chartDesigner = yield select(state => state.chartDesigner);
|
|
|
const { code, indicatorConfig, filters, theme, styleConfig, defaultIndicatorThreshold } = chartDesigner;
|
|
|
const { xAxis, yAxis, otherColumn, sortColumn, sortType, threshold } = indicatorConfig;
|
|
|
const body = {
|