| | |
| | | _this.setState({ |
| | | loading: true, |
| | | disabled: id ? true : false |
| | | }) |
| | | }) |
| | | fetch({ |
| | | url: 'api/document/findDetail', |
| | | params: { |
| | |
| | | documentType: res.documentType || 'DT00002' |
| | | }, |
| | | loading: false, |
| | | fileList: res.attachmentList && res.attachmentList.map((a) => ({ ...a, key: a.id, uid: a.id, name: a.fileName + '.' + a.suffix})) || [] |
| | | }); |
| | | }); |
| | | } |
| | |
| | | iconLoading: false, |
| | | }); |
| | | message.success("提交成功!"); |
| | | this.props.history.goBack() |
| | | this.props.history.push("/index/rules") |
| | | // this.props.history.goBack() |
| | | }); |
| | | // Fetch.savePatrolCom(savedate) |
| | | // .then(res => { |
| | |
| | | this.setState({ fileList }); |
| | | }, |
| | | fileList: fileList, |
| | | onPreview: (file) => { |
| | | console.log(file) |
| | | }, |
| | | showUploadList: { showPreviewIcon: true, showDownloadIcon: true, showRemoveIcon: disabled ? false : true } |
| | | // onDownload: (file) => { |
| | | // console.log(file) |
| | | // Fetch.attachmentDownload(file.uid) |
| | |
| | | {savedate.documentType == 'DT00001' && |
| | | <Row gutter={16} > |
| | | <Col className="gutter-row" > |
| | | <Upload {...props}> |
| | | <Button disabled={disabled}> |
| | | <Upload {...props} > |
| | | <Button disabled={disabled} style={{ display: disabled ? 'none' : 'inline-block' }}> |
| | | <Icon type="upload" />上传文件</Button> |
| | | </Upload> |
| | | </Col> |