From bf197d455e74c6d6af63ae735f3d12e5adf965f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 30 Aug 2024 13:42:21 +0800 Subject: [PATCH] =?UTF-8?q?hotfix/2.15.1.2407.01=20=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=A9=BF?= =?UTF-8?q?=E9=80=8F=E6=8E=A5=E5=8F=A3=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reportView/components/povitpivotChartModal.js | 8 ++++---- .../pages/reportView/components/reportContent.js | 15 ++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js index 6a80e8fb..aa5f1bed 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js @@ -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 })); } } diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index 7509d3df..9716234a 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -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: "" } })} />