Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

competitions
cxt 5 years ago
commit cb23912b1f

@ -57,10 +57,10 @@ class Homeworddescription extends Component {
} }
//确认操作 //确认操作
onSaveExercise=()=>{ onSaveExercise=()=>{
if(this.state.description === "" || this.state.description===undefined || this.state.description === null){ // if(this.state.description === "" || this.state.description===undefined || this.state.description === null){
this.props.showNotification("请输入作业说明"); // this.props.showNotification("请输入作业说明");
return // return
} // }
this.props.ReleaseNotes(this.state.description); this.props.ReleaseNotes(this.state.description);
} }
//获取输入框 //获取输入框
@ -72,6 +72,7 @@ class Homeworddescription extends Component {
}) })
} }
render() { render() {
const {getFieldDecorator} = this.props.form;
return ( return (
<div > <div >
<div style={{ <div style={{
@ -84,23 +85,61 @@ class Homeworddescription extends Component {
.ant-form-item-label{width:80px;} .ant-form-item-label{width:80px;}
`} `}
</style> </style>
<Form.Item <Form layout='vertical' onSubmit={this.handleSubmit}>
label="" <style>
className="mdInForm" {
> `.ant-form-item{
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/} margin-bottom:0px !important;
{/*<TextArea style={{"height": "120px"}}*/} }
{/* autoComplete="off" ></TextArea>*/} .chooseDestwo .ant-form-item{
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入作业内容和要求最大限制5000个字符'} margin-bottom:0px !important;
mdID={'courseMessageMD'} initValue={this.state.description} }
className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}
maxLent={"5000"}></TPMMDEditor> .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> </Form.Item>
<div className="clearfix mt10"> <div className="clearfix mt10">
<Button type="primary" className="defalutSubmitbtn fr mr20 "style={{"width":"90px"}} onClick={this.onSaveExercise} >保存</Button> <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> <Button className="defalutCancelbtn fr mr20 w20" style={{"width":"90px"}} onClick={this.clickcancel} >取消</Button>
</div> </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>
</div> </div>

@ -503,8 +503,10 @@ class Workquestionandanswer extends Component {
</div> </div>
: :
<div className="pl20 markdown-body" style={{minHeight: "150px",padding: "20px"}}> <div className="pl20 markdown-body" style={{minHeight: "150px",padding: "20px"}}>
{jobsettingsdata === undefined ? <span style={{color:"#D3D3D3"}}>暂无~</span> : jobsettingsdata === null ? <span style={{color:"#D3D3D3"}}>~</span> : jobsettingsdata === "null" ? <span style={{color:"#D3D3D3"}}>~</span> : {jobsettingsdata === undefined || jobsettingsdata === null || jobsettingsdata === "null" ?
jobsettingsdata.data.explanation === undefined ? <span style={{color:"#D3D3D3"}}>暂无~</span> : jobsettingsdata.data.explanation === null ? <span style={{color:"#D3D3D3"}}>~</span> : <span style={{color: "#D3D3D3"}}>暂无~</span> :
jobsettingsdata.data.explanation === undefined || jobsettingsdata.data.explanation === null || jobsettingsdata.data.explanation === undefined || jobsettingsdata.data.explanation === "" ?
<span style={{color: "#D3D3D3"}}>暂无~</span> :
<div className={"markdown-body"} <div className={"markdown-body"}
dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g, "▁▁▁")}}></div> dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.explanation).replace(/▁/g, "▁▁▁")}}></div>
} }

Loading…
Cancel
Save