From 6ccf2b8088c012b8bf07ecae9e346319baddc358 Mon Sep 17 00:00:00 2001 From: wjn Date: Sat, 11 May 2024 10:53:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/CustomPages/HM/HM061ShowPrint.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8f1a161..b4479fa 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "private": true, "scripts": { "start": "set PORT=7001 && cross-env ESLINT=none roadhog server", + "demo": "set PORT=7999 && cross-env ESLINT=none roadhog server", "build": "cross-env ESLINT=none roadhog build", "build:report": "cross-env ESLINT=none NODE_ENV=production ANALYZE=true roadhog build" }, diff --git a/src/components/CustomPages/HM/HM061ShowPrint.js b/src/components/CustomPages/HM/HM061ShowPrint.js index e0ded47..1d81258 100644 --- a/src/components/CustomPages/HM/HM061ShowPrint.js +++ b/src/components/CustomPages/HM/HM061ShowPrint.js @@ -16,6 +16,7 @@ class HM061ShowPrint extends React.Component { data: null, tmpData: {}, BtnSignDisplay: 'none', + loading: false, }; }; @@ -81,6 +82,7 @@ class HM061ShowPrint extends React.Component { XLSX.writeFile(wb, "风险任务表.xlsx") } onPersonalAgree() { + this.state.loading = true; this.props.dispatch({ type: 'app/getDataByPost', url: 'HM/HMRiskTask/UserSignin', @@ -89,10 +91,12 @@ class HM061ShowPrint extends React.Component { TaskID: this.props.data.TaskID, }, onComplete: (ret) => { - if (ret) { + if (ret.IsSuccessful) { message.success('确认成功!'); this.setState({ BtnSignDisplay: 'none' }) this.BtnClose(); + } else { + this.state.loading = false; } } }) @@ -139,7 +143,7 @@ class HM061ShowPrint extends React.Component { content={() => this.componentRef} /> - +
(this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>

危险源辨识任务表