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" && - + }