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) { 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
})); }));
} }
} }

View File

@ -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: ""
} }
})} })}
/> />