|
|
|
@ -57,10 +57,10 @@ class Homeworddescription extends Component {
|
|
|
|
|
}
|
|
|
|
|
//确认操作
|
|
|
|
|
onSaveExercise=()=>{
|
|
|
|
|
if(this.state.description === "" || this.state.description===undefined || this.state.description === null){
|
|
|
|
|
this.props.showNotification("请输入作业说明");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// if(this.state.description === "" || this.state.description===undefined || this.state.description === null){
|
|
|
|
|
// this.props.showNotification("请输入作业说明");
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
this.props.ReleaseNotes(this.state.description);
|
|
|
|
|
}
|
|
|
|
|
//获取输入框
|
|
|
|
@ -72,6 +72,7 @@ class Homeworddescription extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
return (
|
|
|
|
|
<div >
|
|
|
|
|
<div style={{
|
|
|
|
@ -84,23 +85,61 @@ class Homeworddescription extends Component {
|
|
|
|
|
.ant-form-item-label{width:80px;}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label=""
|
|
|
|
|
className="mdInForm"
|
|
|
|
|
>
|
|
|
|
|
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
|
|
|
|
|
{/*<TextArea style={{"height": "120px"}}*/}
|
|
|
|
|
{/* autoComplete="off" ></TextArea>*/}
|
|
|
|
|
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入作业内容和要求,最大限制5000个字符'}
|
|
|
|
|
mdID={'courseMessageMD'} initValue={this.state.description}
|
|
|
|
|
className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}
|
|
|
|
|
maxLent={"5000"}></TPMMDEditor>
|
|
|
|
|
<Form layout='vertical' onSubmit={this.handleSubmit}>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`.ant-form-item{
|
|
|
|
|
margin-bottom:0px !important;
|
|
|
|
|
}
|
|
|
|
|
.chooseDestwo .ant-form-item{
|
|
|
|
|
margin-bottom:0px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chooseDestwo .ant-form-item-control-wrapper .ant-form-item-control .ant-form-explain{
|
|
|
|
|
padding-left: 25px !important;
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
.ant-form-vertical .ant-form-item {
|
|
|
|
|
margin-bottom:0px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Form.Item
|
|
|
|
|
style={{"borderBottom": 'none'}}
|
|
|
|
|
className="chooseDestwo "
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('content', {
|
|
|
|
|
rules: [{
|
|
|
|
|
max: 5000, message: '最大限制为5000个字符',
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入作业内容和要求,最大限制5000个字符'}
|
|
|
|
|
mdID={'courseMessageMD'} initValue={this.state.description}
|
|
|
|
|
className="courseMessageMD" onChange={this.settextarea}
|
|
|
|
|
style={{"height": "120px"}}></TPMMDEditor>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<div className="clearfix mt10">
|
|
|
|
|
<Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button>
|
|
|
|
|
<Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/*<Form.Item>*/}
|
|
|
|
|
{/* <div className="clearfix mt28 fr pb50 mr25" >*/}
|
|
|
|
|
{/* <a className="defalutCancelbtn fl mr20 " onClick={()=>this.bianji(false)}>取消</a>*/}
|
|
|
|
|
{/* <Button htmlType="submit" className="ant-btn defalutSubmitbtn fl ant-btn-primary">*/}
|
|
|
|
|
{/* <span>提 交</span></Button>*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/* <div className="clearfix mt10">*/}
|
|
|
|
|
{/* <Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button>*/}
|
|
|
|
|
{/* <Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>*/}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/*</Form.Item>*/}
|
|
|
|
|
</Form>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|