|
|
|
@ -184,36 +184,45 @@ class Goldsubject extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
datatime: undefined,
|
|
|
|
|
})
|
|
|
|
|
console.log("结束时间111111111116");
|
|
|
|
|
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
endtime: "",
|
|
|
|
|
endtime:undefined,
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
console.log("结束时间111111111117");
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
datatime: dateString,
|
|
|
|
|
});
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
endtime:dateString,
|
|
|
|
|
endtime: moment(dateString, dateFormat),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
onChangeTimepublishstwo = (date, dateString) => {
|
|
|
|
|
console.log("结束时间22222222222");
|
|
|
|
|
console.log(dateString);
|
|
|
|
|
if(dateString===""){
|
|
|
|
|
console.log("结束时间222222222223");
|
|
|
|
|
this.setState({
|
|
|
|
|
datatimetwo: undefined,
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
starttime: "",
|
|
|
|
|
starttime: undefined,
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
console.log("结束时间222222222224");
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
datatimetwo: dateString,
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
starttime: dateString,
|
|
|
|
|
starttime: moment(dateString, dateFormat),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
cancelmodel = () => {
|
|
|
|
|
|
|
|
|
@ -325,25 +334,32 @@ class Goldsubject extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("错误信息信息信息");
|
|
|
|
|
console.log("错误信息信息信息1");
|
|
|
|
|
console.log(err);
|
|
|
|
|
console.log(values.starttime);
|
|
|
|
|
console.log(values.endtime);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.props.form.validateFields((err, values) => {
|
|
|
|
|
|
|
|
|
|
console.log("错误信息信息信息2");
|
|
|
|
|
console.log(err);
|
|
|
|
|
if (err) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if(values.course===""||values.course===undefined){
|
|
|
|
|
// this.scrollToAnchor("iscourse")
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
if(values.classroom===""||values.classroom===undefined){
|
|
|
|
|
this.scrollToAnchor("isclassroom")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(values.school===""||values.school===undefined){
|
|
|
|
|
// this.scrollToAnchor("isschool")
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// if(values.classroom===""||values.classroom===undefined){
|
|
|
|
|
// this.scrollToAnchor("isclassroom")
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
// if(values.school===""||values.school===undefined){
|
|
|
|
|
// // this.scrollToAnchor("isschool")
|
|
|
|
|
// return
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
if (!err) {
|
|
|
|
|
// debugger
|
|
|
|
|
//新建
|
|
|
|
@ -535,10 +551,10 @@ class Goldsubject extends Component {
|
|
|
|
|
const optionschool = this.state.searchlistscholl===undefined?"":this.state.searchlistscholl===null?"":this.state.searchlistscholl==="[]"?"":this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
|
|
|
|
|
// console.log(this.props.current_user.user_school)
|
|
|
|
|
// form合并了
|
|
|
|
|
console.log("获取到的数据");
|
|
|
|
|
console.log(this.state);
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
console.log(this.props.current_user);
|
|
|
|
|
// console.log("获取到的数据");
|
|
|
|
|
// console.log(this.state);
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
// console.log(this.props.current_user);
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
|
|
|
|
|