| | |
| | | } |
| | | |
| | | loadData = () => { |
| | | const { id } = this.props; |
| | | const { id } = this.props.match.params; |
| | | console.log(this.props) |
| | | console.log(id) |
| | | let _this = this; |
| | | _this.setState({ |
| | |
| | | const { savedate } = this.state; |
| | | console.log(savedate) |
| | | if (savedate.documentType == 'DT00001') { |
| | | if (!savedate.documentItle) { |
| | | if (!savedate.documentTitle) { |
| | | return message.warning('规章制度标题不能为空') |
| | | } |
| | | } else { |
| | | if (!savedate.documentItle) { |
| | | if (!savedate.documentTitle) { |
| | | return message.warning('通知标题不能为空') |
| | | } else if (!savedate.documentContent) { |
| | | return message.warning('通知内容不能为空') |
| | |
| | | } |
| | | |
| | | cancle = () => { |
| | | this.props.history.push("/index/workbench"); |
| | | // this.props.history.push("/index/workbench"); |
| | | const { id } = this.props.match.params; |
| | | if(id){ |
| | | this.props.history.goBack() |
| | | }else { |
| | | this.props.history.push("/index/workbench"); |
| | | } |
| | | // console.log(this.props) |
| | | } |
| | | |
| | | render() { |
| | |
| | | } |
| | | <Row gutter={16}> |
| | | <Col className="gutter-row" style={{ margin: '12px 0' }} > |
| | | <Input disabled={disabled} style={{ width: '300px' }} name='documentItle' onChange={this.saveInputChange} value={savedate.documentItle || ""} /> |
| | | <Input disabled={disabled} style={{ width: '300px' }} name='documentTitle' onChange={this.saveInputChange} value={savedate.documentTitle || ""} /> |
| | | </Col> |
| | | </Row> |
| | | |