From a793cda8679aedad157014be4947f84ff0c61c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 18 Apr 2023 17:19:15 +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=E5=88=86=E6=9E=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/statisticsModal.js | 2 +- .../pages/analysisOfSalaryStatistics/index.js | 27 ++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js index e1e18e83..df8132e5 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/statisticsModal.js @@ -20,7 +20,7 @@ class StatisticsModal extends Component { return ( { const { attendanceStore: { reportForm } } = this.props; reportGetForm({}).then(({ status, data }) => { - console.log(data, reportCondition); if (status) { - + const { statsDimOptions } = data; + this.setState({ + reportConditions: _.map(reportCondition, item => { + return { + ...item, + items: _.map(item.items, child => { + if (child.domkey[0] === "dimensionIds") { + return { + ...child, + options: _.map(statsDimOptions, dimTypeItem => ({ + key: dimTypeItem.id, + showname: dimTypeItem.content + })) + }; + } + return { ...child }; + }) + }; + }) + }, () => { + reportForm.initFormFields(this.state.reportConditions); + }); } - reportForm.initFormFields(reportCondition); }); }; initCondition = async () => { @@ -238,7 +257,7 @@ class Index extends Component { } { modalReq.typeKey === "addReport" && - + }