diff --git a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js index bfebf988..8eecb1ab 100644 --- a/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js +++ b/pc4mobx/hrmSalary/pages/analysisOfSalaryStatistics/components/salaryTempAdminDialog.js @@ -40,10 +40,9 @@ class SalaryTempAdminDialog extends Component { render() { const { dataSource, selectedKeys } = this.state, { dataParams } = this.props; - const heads = _.reduce(dataSource, (pre, cur) => { - if (selectedKeys.includes(cur.id)) { - return [...pre, cur.name]; - } + const heads = _.reduce(selectedKeys, (pre, cur) => { + const item = dataSource.find(data => data.id === cur); + if (item) pre.push(item.name); return pre; }, []); return (