From eecb7f34f26d72e8cf56a60ca511c5f252b29155 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Sat, 8 Feb 2025 15:40:19 +0800 Subject: [PATCH] release/2.19.1.2501.01 --- .../components/salaryTempAdminDialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 (