From b57cd59b2d13d384cfda47f9c94d4d0da4ca100a Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Mon, 18 Aug 2025 14:00:33 +0800 Subject: [PATCH] =?UTF-8?q?custom/=E4=B8=87=E5=BE=B7=E9=9A=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/wdlImportDialog/index.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/custom-pages/wandelong/components/wdlImportDialog/index.js b/pc4mobx/hrmSalary/pages/custom-pages/wandelong/components/wdlImportDialog/index.js index 2f51135d..dd27746e 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/wandelong/components/wdlImportDialog/index.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/wandelong/components/wdlImportDialog/index.js @@ -26,6 +26,18 @@ class Index extends Component { }; } + componentWillReceiveProps(nextProps, nextContext) { + if (nextProps.visible !== this.props.visible && !nextProps.visible) { + this.setState({ + importDialog: { + nextloading: false, importResult: {}, imageId: "", + previewUrl: "/api/bs/hrmsalary/salaryacct/wdl/previewWdlDynamicSalaryReport", + link: "/api/bs/hrmsalary/salaryacct/wdl/exportDynamicSalaryReport" + } + }); + } + } + handleImport = (payload) => { const { importDialog } = this.state; this.setState({ importDialog: { ...importDialog, nextloading: true } }); @@ -34,7 +46,7 @@ class Index extends Component { if (status) { this.setState({ importDialog: { ...importDialog, ...payload, importResult: data } - }, ()=> this.props.onSuccess()); + }, () => this.props.onSuccess()); } }).catch(() => this.setState({ importDialog: { ...importDialog, nextloading: false } })); }; @@ -46,7 +58,7 @@ class Index extends Component { {...this.props} {...importDialog} onResetImportResult={() => this.setState({ importDialog: { - ...importDialog, importResult: {}, imageId: "", link: "" + ...importDialog, importResult: {}, imageId: "" } })} exportDataDom={null}