From 2d78222cf5d3ec1a259fe79c1631727b8ed0545e 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, 6 Dec 2022 15:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6-=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E6=A0=B8=E7=AE=97=E5=90=8E=E8=B0=83=E5=B7=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=9C=80=E8=A6=81=E5=88=B7=E6=96=B0=E6=89=8D=E8=83=BD?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/adjustTable.js | 9 ++++----- .../standingBookDetail/components/adjustmentSlide.js | 7 +------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js index 76bf1491..8f344401 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustTable.js @@ -32,12 +32,11 @@ class AdjustTable extends Component { }; } - componentDidMount() { - this.getCompensationList().then(r => { - }); - } - componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible) { + nextProps.visible && this.getCompensationList().then(r => { + }); + } } getCompensationList = async () => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index a7fdc244..53d961da 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -28,11 +28,6 @@ class AdjustmentSlide extends Component { this.adjustTableRef = null; } - componentWillReceiveProps(nextProps, nextContext) { - if (nextProps.visible !== this.props.visible) { - } - } - handleSave = () => { let { dataSource, targetOptions } = this.adjustTableRef.state; dataSource = _.filter(dataSource, it => !it.id); @@ -106,7 +101,7 @@ class AdjustmentSlide extends Component { customOperate={this.renderCustomOperate()} /> } - content={ this.adjustTableRef = dom}/>} + content={ this.adjustTableRef = dom} visible={visible}/>} onClose={onCancel} /> );