|
|
|
@ -306,8 +306,6 @@ class NewWorkForm extends Component{
|
|
|
|
|
this.setState({ base_on_project: !this.state.base_on_project })
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
this.isEdit = this.props.match.url.indexOf('/edit')
|
|
|
|
|
|
|
|
|
|
window.$('.groupSetting .ant-form-item-label > label').addClass('ant-form-item-required')
|
|
|
|
|
this._scrollToTop()
|
|
|
|
|
}
|
|
|
|
@ -324,7 +322,7 @@ class NewWorkForm extends Component{
|
|
|
|
|
const { current_user } = this.props
|
|
|
|
|
|
|
|
|
|
const courseId = this.state.course_id || this.props.match.params.coursesId ;
|
|
|
|
|
|
|
|
|
|
this.isEdit = this.isEdit || this.props.match.url.indexOf('/edit') != -1
|
|
|
|
|
if ((this.isEdit) && !this.state.description) {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
@ -453,7 +451,7 @@ class NewWorkForm extends Component{
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<TPMMDEditor ref={this.contentMdRef} placeholder="请在此输入作业内容和要求,最大限制5000个字符" mdID={'courseContentMD'} refreshTimeout={1500}
|
|
|
|
|
initValue={this.state.description} noSetValue={true}
|
|
|
|
|
initValue={this.state.description} noSetValueOnInit={!!this.isEdit}
|
|
|
|
|
className="courseMessageMD" ></TPMMDEditor>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item> }
|
|
|
|
@ -522,7 +520,7 @@ class NewWorkForm extends Component{
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<TPMMDEditor ref={this.answerMdRef} placeholder="请在此输入作业的参考答案,最大限制5000个字符" mdID={'workAnswerMD'}
|
|
|
|
|
initValue={this.state.reference_answer || ''} noSetValue={true}
|
|
|
|
|
initValue={this.state.reference_answer || ''} noSetValueOnInit={!!this.isEdit}
|
|
|
|
|
className="courseMessageMD" refreshTimeout={1500} ></TPMMDEditor>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|