产品-薪酬统计分析管理

This commit is contained in:
黎永顺 2023-04-18 17:19:15 +08:00
parent ccfb84930b
commit a793cda867
2 changed files with 24 additions and 5 deletions

View File

@ -20,7 +20,7 @@ class StatisticsModal extends Component {
return (
<WeaDialog
{...this.props} hasScroll
style={{ width: 640, height: 350 }}
style={typeKey === "addReport" ? { width: 640 } : { width: 640, height: 350 }}
buttons={buttons}
onCancel={onCancel}
initLoadCss

View File

@ -47,11 +47,30 @@ class Index extends Component {
initReportFormCondition = () => {
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" &&
<ReportForm form={reportForm} condition={reportCondition}/>
<ReportForm form={reportForm} condition={reportConditions}/>
}
</StatisticsModal>
<DimensionSlide