产品-薪酬统计分析报表
This commit is contained in:
parent
185230b357
commit
ef46215d0f
|
|
@ -95,7 +95,7 @@ class ReportContent extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
queryRangeSetting = (payload) => {
|
||||
queryRangeSetting = (payload, isTab) => {
|
||||
const { dataSource, columns } = this.state;
|
||||
this.setState({ loading: true });
|
||||
queryRangeSetting(payload).then(({ status, data }) => {
|
||||
|
|
@ -108,11 +108,9 @@ class ReportContent extends Component {
|
|||
...rangSet,
|
||||
rangeVal: data
|
||||
}
|
||||
}, () => {
|
||||
if (this.refs.chart) this.refs.chart.clear();
|
||||
if (this.refs.chart) this.refs.chart.paint();
|
||||
});
|
||||
if (id) {
|
||||
if (!isTab) return;
|
||||
switch (viewType) {
|
||||
case "bar":
|
||||
this.setState({
|
||||
|
|
@ -150,6 +148,7 @@ class ReportContent extends Component {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (this.refs.chart) this.refs.chart.paint();
|
||||
} else {
|
||||
this.setState({ chartsInfo: {} });
|
||||
}
|
||||
|
|
@ -157,12 +156,13 @@ class ReportContent extends Component {
|
|||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleChangeChartOpts = (chartsType, viewType) => {
|
||||
if (this.refs.chart && viewType !== "setting" && viewType !== "dataView" && !this.state.rangSet.visible) this.refs.chart.clear();
|
||||
const { report: { id: reportId, dimensionId } } = this.props;
|
||||
const { rangSet } = this.state;
|
||||
viewType !== "setting" && this.setState({ chartsType, viewType }, () => {
|
||||
const { viewType, chartsType } = this.state;
|
||||
viewType !== "dataView" ?
|
||||
this.queryRangeSetting({ reportId, chartsType }) :
|
||||
this.queryRangeSetting({ reportId, chartsType }, true) :
|
||||
this.reportStatisticsReportGetData(reportId, dimensionId);
|
||||
});
|
||||
viewType === "setting" && this.setState({ rangSet: { ...rangSet, visible: true, reportId } }, () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue