hotfix/2.15.1.2407.01

薪酬统计报表数据穿透接口参数修改
This commit is contained in:
黎永顺 2024-08-30 13:42:21 +08:00
parent 21ead59420
commit bf197d455e
2 changed files with 14 additions and 9 deletions

View File

@ -36,8 +36,8 @@ class PovitpivotChartModal extends Component {
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
const { id, dimensionId, dimensionValue, isShare } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare });
const { id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth } = nextProps;
this.getDataPerspective({ id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth });
} else {
this.setState({
dataSource: [],
@ -64,11 +64,11 @@ class PovitpivotChartModal extends Component {
});
} else if (type === "turn") {
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;
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () =>
this.getDataPerspective({
id, dimensionId, dimensionValue, isShare
id, dimensionId, dimensionValue, isShare, salaryStartMonth, salaryEndMonth
}));
}
}

View File

@ -29,8 +29,8 @@ class ReportContent extends Component {
chartsType: "0",
chartsInfo: {},
povitView: {
visible: false, id: "", isShare: false,
dimensionId: "", dimensionValue: ""
visible: false, id: "", isShare: false, dimensionId: "", dimensionValue: "", salaryStartMonth: "",
salaryEndMonth: ""
},
rangSet: {
visible: false, reportId: "",
@ -69,10 +69,15 @@ class ReportContent extends Component {
if (id === "PIVOTCHART") {
const { record } = params;
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({
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") {
@ -282,7 +287,7 @@ class ReportContent extends Component {
onCancel={() => this.setState({
povitView: {
visible: false, id: "", dimensionId: "", dimensionValue: "",
isShare: false
isShare: false, salaryStartMonth: "", salaryEndMonth: ""
}
})}
/>