dev_forum
杨树明 5 years ago
parent 33e35d0f4b
commit 408d14062b

@ -288,7 +288,7 @@ class GraduationTaskssettingapp extends Component{
allowlatefun=(e)=>{
let {end_time}=this.state;
debugger
if(e.target.value===true||e.target.value===1){
this.setState({
@ -317,24 +317,24 @@ class GraduationTaskssettingapp extends Component{
})
}
updatesfuncrosscomment=(types,checked,newlatetime,newcommenttime)=>{
updatesfuncrosscomment=(types,newlatetime,newcommenttime)=>{
let {endtimetype}=this.state;
if(types===1){
this.setState({
latetime:newlatetime,
crosscomment:checked,
crosscomment:true,
commenttime:newcommenttime
})
}else{
if(endtimetype===true){
this.setState({
crosscomment:checked,
crosscomment:true,
commenttime:newcommenttime
})
}else{
this.setState({
end_time:newlatetime,
crosscomment:checked,
crosscomment:true,
commenttime:newcommenttime
})
}
@ -342,42 +342,41 @@ class GraduationTaskssettingapp extends Component{
}
funcrosscomment=(e)=>{
debugger
let {latetime,end_time,allowlate}=this.state;
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
let newlatetimes=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimes=moment(latetime).format("YYYY-MM-DD HH:mm");
let newend_timeb=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimeb=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newtime;
if(e.target.checked===true){
if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){
let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
}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.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
}
}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.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
}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.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
}
}
}else{
this.setState({
crosscomment:e.target.checked,
commenttime:undefined
})
}
}
funcommentstatus=(e)=>{

Loading…
Cancel
Save