This commit is contained in:
wyw 2024-05-11 11:29:37 +08:00
commit 575461f633
2 changed files with 7 additions and 2 deletions

View File

@ -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"
},

View File

@ -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}
/>
<Button onClick={() => this.onTableBtnExport()} icon="export" style={{ marginLeft: '8px' }}>导出</Button>
<Button type={'primary'} style={{ marginLeft: '8px', display: this.state.BtnSignDisplay }} onClick={() => this.onPersonalAgree()} icon="check" >确认</Button>
<Button type={'primary'} style={{ marginLeft: '8px', display: this.state.BtnSignDisplay }} onClick={() => this.onPersonalAgree()} icon="check" loading={this.state.loading} >确认</Button>
</div>
<div ref={el => (this.componentRef = el)} id={'tableId' + this.props.data.id} style={{ padding: '20px' }}>
<h1 style={{ textAlign: 'center' }}>危险源辨识任务表</h1>