parent
21ead59420
commit
bf197d455e
|
|
@ -36,8 +36,8 @@ class PovitpivotChartModal extends Component {
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps, nextContext) {
|
componentWillReceiveProps(nextProps, nextContext) {
|
||||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||||
const { id, dimensionId, dimensionValue, isShare } = nextProps;
|
const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = nextProps;
|
||||||
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
|
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth });
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
|
|
@ -64,11 +64,11 @@ class PovitpivotChartModal extends Component {
|
||||||
});
|
});
|
||||||
} else if (type === "turn") {
|
} else if (type === "turn") {
|
||||||
if (id === "PAGEINFO") {
|
if (id === "PAGEINFO") {
|
||||||
const { id, dimensionId, dimensionValue, isShare } = this.props;
|
const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = this.props;
|
||||||
const { pageNum: current, size: pageSize } = params;
|
const { pageNum: current, size: pageSize } = params;
|
||||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
|
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
|
||||||
this.getDataPerspective({
|
this.getDataPerspective({
|
||||||
id, dimensionId, dimensionValue, isShare
|
id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ class ReportContent extends Component {
|
||||||
chartsType: "0",
|
chartsType: "0",
|
||||||
chartsInfo: {},
|
chartsInfo: {},
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: false, id: "", isShare: false,
|
visible: false, id: "", isShare: false, dimensionId: "", dimensionValue: "", salaryStartMonth: "",
|
||||||
dimensionId: "", dimensionValue: ""
|
salaryEndMonth: ""
|
||||||
},
|
},
|
||||||
rangSet: {
|
rangSet: {
|
||||||
visible: false, reportId: "",
|
visible: false, reportId: "",
|
||||||
|
|
@ -69,10 +69,15 @@ class ReportContent extends Component {
|
||||||
if (id === "PIVOTCHART") {
|
if (id === "PIVOTCHART") {
|
||||||
const { record } = params;
|
const { record } = params;
|
||||||
const { dimension: dimensionValue } = record;
|
const { dimension: dimensionValue } = record;
|
||||||
const { id: pivotId, dimensionId, isShare } = this.props.report;
|
const {
|
||||||
|
id: pivotId, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start
|
||||||
|
} = this.props.report;
|
||||||
|
const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType);
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: true, id: pivotId, dimensionId, dimensionValue, isShare
|
visible: true, id: pivotId, dimensionId, dimensionValue, isShare,
|
||||||
|
salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (id === "PAGEINFO_REPORT") {
|
} else if (id === "PAGEINFO_REPORT") {
|
||||||
|
|
@ -282,7 +287,7 @@ class ReportContent extends Component {
|
||||||
onCancel={() => this.setState({
|
onCancel={() => this.setState({
|
||||||
povitView: {
|
povitView: {
|
||||||
visible: false, id: "", dimensionId: "", dimensionValue: "",
|
visible: false, id: "", dimensionId: "", dimensionValue: "",
|
||||||
isShare: false
|
isShare: false, salaryStartMonth: "", salaryEndMonth: ""
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue