|
|
@ -317,73 +317,59 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
let {latetime,end_time}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
let {latetime,end_time,allowlate}=this.state;
|
|
|
|
let newtime;
|
|
|
|
let newtime;
|
|
|
|
if(latetime!=null&&end_time!=null){
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(allowlate===1||allowlate===true){
|
|
|
|
if(moment(latetime)>moment(end_time)){
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
|
newtime=moment(latetime)+604800000;
|
|
|
|
let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
newtime=new Date(newtime)
|
|
|
|
let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
|
|
|
|
}else if(moment(latetime)<moment(end_time)){
|
|
|
|
this.setState({
|
|
|
|
newtime=moment(end_time)+604800000;
|
|
|
|
latetime:newlatetime,
|
|
|
|
newtime=new Date(newtime)
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
}
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
latetime:newlatetime,
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
if(end_time===null||end_time===""){
|
|
|
|
|
|
|
|
let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
end_time:newend_time,
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
end_time:newend_time,
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
}
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:moment(moment(newtime)).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if(latetime===null&&end_time!=null){
|
|
|
|
}else{
|
|
|
|
if(e.target.checked===true){
|
|
|
|
this.setState({
|
|
|
|
newtime=moment(end_time)+604800000;
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
newtime=new Date(newtime)
|
|
|
|
commenttime:undefined
|
|
|
|
this.setState({
|
|
|
|
})
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
}
|
|
|
|
commenttime:newtime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(latetime!=null&&end_time===null){
|
|
|
|
|
|
|
|
if(e.target.checked===true){
|
|
|
|
|
|
|
|
newtime=moment(latetime)+604800000;
|
|
|
|
|
|
|
|
newtime=new Date(newtime)
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:newtime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else if(latetime===null&&end_time===null){
|
|
|
|
|
|
|
|
if(e.target.checked===true){
|
|
|
|
|
|
|
|
newtime=moment(new Date())+604800000;
|
|
|
|
|
|
|
|
newtime=new Date(newtime)
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:newtime
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -588,7 +574,6 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
commenttimetype:false
|
|
|
|
commenttimetype:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
debugger
|
|
|
|
|
|
|
|
if(moment(this.state.commenttime)<moment(publish_time)){
|
|
|
|
if(moment(this.state.commenttime)<moment(publish_time)){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
commenttimetype:true,
|
|
|
|
commenttimetype:true,
|
|
|
|