|
|
@ -343,6 +343,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
updatesfuncrosscomment=(types,newlatetime,newcommenttime)=>{
|
|
|
|
updatesfuncrosscomment=(types,newlatetime,newcommenttime)=>{
|
|
|
|
|
|
|
|
debugger
|
|
|
|
let {endtimetype}=this.state;
|
|
|
|
let {endtimetype}=this.state;
|
|
|
|
if(types===1){
|
|
|
|
if(types===1){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -372,7 +373,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state;
|
|
|
|
let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state;
|
|
|
|
let commenttimetype=commenttime===null||commenttime==="";
|
|
|
|
let commenttimetype=commenttime===null||commenttime==="";
|
|
|
|
|
|
|
|
debugger
|
|
|
|
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
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 newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
|
|
|
@ -386,7 +387,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(commenttimetype===true){
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
|
|
if(allowlate===1||allowlate===true){
|
|
|
|
if(allowlate===1||allowlate===true){
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
@ -401,12 +402,6 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
|
|
|
|
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
|
|
|
commenttime:commenttimeone,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -545,25 +540,29 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
endTimetypes:false
|
|
|
|
endTimetypes:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
debugger
|
|
|
|
if(moment(latetime)<=moment(publish_time)){
|
|
|
|
if(moment(latetime)<=moment(publish_time)){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
debugger
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
latetimetype:true,
|
|
|
|
latetimetype:true,
|
|
|
|
latetimetypeval:"结束时间必须晚于发布时间"
|
|
|
|
latetimetypeval:"结束时间必须晚于发布时间"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}else if(moment(latetime)<=moment(end_time)){
|
|
|
|
}else if(moment(latetime)<=moment(end_time)){
|
|
|
|
|
|
|
|
debugger
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
latetimetype:true,
|
|
|
|
latetimetype:true,
|
|
|
|
latetimetypeval:"结束时间必须晚于截止时间"
|
|
|
|
latetimetypeval:"结束时间必须晚于截止时间"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
|
|
|
|
debugger
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
latetimetype:false
|
|
|
|
latetimetype:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
debugger
|
|
|
|
|
|
|
|
|
|
|
|
if(crosscomment===true){
|
|
|
|
if(crosscomment===true){
|
|
|
|
if(this.state.commenttime===undefined||this.state.commenttime===null||this.state.commenttime===""){
|
|
|
|
if(this.state.commenttime===undefined||this.state.commenttime===null||this.state.commenttime===""){
|
|
|
@ -950,9 +949,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// console.log(moment(publish_time))
|
|
|
|
// console.log(moment(publish_time))
|
|
|
|
// console.log(this.props.isSuperAdmin())
|
|
|
|
console.log(commenttime)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<React.Fragment>
|
|
|
|
<React.Fragment>
|
|
|
|