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' }}>

危险源辨识任务表