From 42f2a8ac555f0bd107a3d561508554b3eb176a8e 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, 9 Jun 2023 10:01:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81-=E8=96=AA=E9=85=AC=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=8A=A5=E8=A1=A8=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/reportView/components/reportContent.js | 2 +- pc4mobx/hrmSalary/pages/reportView/index.js | 12 +++++++++--- .../pages/salaryItem/systemSalaryItemModal.js | 10 +++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js index 8db33b36..e0c3c2bf 100644 --- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js +++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js @@ -86,7 +86,7 @@ class ReportContent extends Component { this.setState({ loading: true }); reportStatisticsReportGetData(payload).then(({ status, data }) => { this.setState({ loading: false }); - if (status) { + if (status && id === data.reportId) { const { countResult, columns, pageInfo: { list } } = data; this.setState({ countResult, diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js index e16680a2..2031c1c5 100644 --- a/pc4mobx/hrmSalary/pages/reportView/index.js +++ b/pc4mobx/hrmSalary/pages/reportView/index.js @@ -135,9 +135,15 @@ class Index extends Component { this.setState({ - statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId } - })} + onClick={() => { + if (this.reportRef.state.loading) { + message.info(getLabel(111, "列表正在加载中,请稍后")) + } else { + this.setState({ + statisticalPayload: { visible: true, id: report.id, dimension: report.dimensionId } + }); + } + }} /> diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js index ba12bf48..3530ee29 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js @@ -34,7 +34,15 @@ export default class SystemSalaryItemModal extends React.Component { if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data; this.setState({ - columns, dataSource, + columns: _.map(columns, item => { + return { + ...item, + render: (text) => { + return {text}; + } + }; + }), + dataSource, pageInfo: { ...pageInfo, current, pageSize, total } }); }