|
|
|
@ -100,6 +100,7 @@ class NewWorkForm extends Component{
|
|
|
|
|
const courseId = this.state.course_id || this.props.match.params.coursesId ;
|
|
|
|
|
|
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
|
if(err && err.personNum) delete err.personNum;
|
|
|
|
|
console.log(values)
|
|
|
|
|
const mdContnet = this.contentMdRef.current.getValue().trim();
|
|
|
|
|
console.log(mdContnet)
|
|
|
|
@ -135,7 +136,7 @@ class NewWorkForm extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const errKeys = Object.keys(err); // || errKeys.length == 1 && errKeys[0] == 'content' && mdContnet
|
|
|
|
|
if (!err) {
|
|
|
|
|
if (!err || Object.keys(err).length == 0) {
|
|
|
|
|
if (this.state.isEdit) {
|
|
|
|
|
this.doEdit(courseId, values)
|
|
|
|
|
} else {
|
|
|
|
@ -451,12 +452,12 @@ class NewWorkForm extends Component{
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('personNum', {
|
|
|
|
|
validateTrigger: 'onNone',
|
|
|
|
|
rules: [{
|
|
|
|
|
// rules: [{
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '人数不能为空'
|
|
|
|
|
// validator: this.personNumValidator
|
|
|
|
|
// required: true, message: '请输入最小人数和最大人数'
|
|
|
|
|
}],
|
|
|
|
|
// }],
|
|
|
|
|
})(
|
|
|
|
|
<div>
|
|
|
|
|
<p className="clearfix">
|
|
|
|
|