|
|
|
@ -111,11 +111,11 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
max_nums: result.data.max_num,
|
|
|
|
|
task_type: result.data.task_type,
|
|
|
|
|
baseonproject: result.data.base_on_project,
|
|
|
|
|
publish_time: result.data.publish_time,
|
|
|
|
|
end_time: result.data.end_time,
|
|
|
|
|
publish_time:moment(moment(handleDateString(result.data.publish_time))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
end_time:moment(moment(handleDateString(result.data.end_time))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
allowlate: result.data.allow_late,
|
|
|
|
|
latepenalty: result.data.late_penalty,
|
|
|
|
|
latetime: result.data.late_time,
|
|
|
|
|
latetime:moment(moment(handleDateString(result.data.late_time))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
crosscomment: result.data.cross_comment,
|
|
|
|
|
taskid: result.data.id,
|
|
|
|
|
taskname: result.data.task_name,
|
|
|
|
@ -128,7 +128,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
hasproject: result.data.has_project,
|
|
|
|
|
hascommit: result.data.has_commit,
|
|
|
|
|
assigngroups: assigngroups,
|
|
|
|
|
commenttime: result.data.comment_time,
|
|
|
|
|
commenttime:moment(moment(handleDateString(result.data.comment_time))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
task_status: result.data.task_status
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -142,7 +142,9 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
|
|
|
|
|
this.getsettings();
|
|
|
|
|
|
|
|
|
|
if(this.props.isAdmin()===true){
|
|
|
|
|
this.editSetting()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -210,17 +212,18 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
latetime:null
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
endtime=moment(handleDateString(dateString)).add(1, 'months')
|
|
|
|
|
|
|
|
|
|
endtime= moment(moment(handleDateString(dateString))).add(1, 'months').format("YYYY-MM-DD HH:mm")
|
|
|
|
|
let {allowlate}=this.state;
|
|
|
|
|
if(allowlate===true||allowlate===1){
|
|
|
|
|
this.setState({
|
|
|
|
|
publish_time:handleDateString(dateString),
|
|
|
|
|
publish_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
end_time:endtime,
|
|
|
|
|
latetime:moment(endtime).add(1, 'months'),
|
|
|
|
|
latetime:moment(moment(handleDateString(endtime))).add(1, 'months').format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
publish_time:handleDateString(dateString),
|
|
|
|
|
publish_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
end_time:endtime
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -240,12 +243,12 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
let {allowlate}=this.state;
|
|
|
|
|
if(allowlate===true||allowlate===1){
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:handleDateString(dateString),
|
|
|
|
|
latetime:moment(handleDateString(dateString)).add(1, 'months'),
|
|
|
|
|
end_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
latetime:moment(moment(handleDateString(dateString))).add(1, 'months').format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:handleDateString(dateString)
|
|
|
|
|
end_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -288,7 +291,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
latepenalty:5,
|
|
|
|
|
allowlate:e.target.value,
|
|
|
|
|
latetime:end_time===null?"":moment(end_time).add(1, 'months'),
|
|
|
|
|
latetime:end_time===null?"":moment(moment(handleDateString(end_time))).add(1, 'months').format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
@ -326,7 +329,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newtime
|
|
|
|
|
commenttime:moment(moment(newtime)).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
@ -410,7 +413,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
Topval:"发布设置均可修改",
|
|
|
|
|
Botvalleft:"点击修改",
|
|
|
|
|
Botval:"此设置将对所有分班生效",
|
|
|
|
|
starttime:moment(moment(handleDateString(this.props.getNowFormatDates(1))).add(1, 'months')).format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
starttime:moment(moment(handleDateString(this.props.getNowFormatDates(1)))).format("YYYY-MM-DD HH:mm") ,
|
|
|
|
|
starttimes:this.props.getNowFormatDates(1),
|
|
|
|
|
typs:"start",
|
|
|
|
|
endtime:endtime,
|
|
|
|
@ -558,6 +561,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
commenttimetype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
debugger
|
|
|
|
|
if(moment(this.state.commenttime)<moment(publish_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
commenttimetype:true,
|
|
|
|
@ -569,6 +573,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
commenttimetype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(moment(this.state.commenttime)<moment(end_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
commenttimetype:true,
|
|
|
|
@ -716,6 +721,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
if(resulet.data.status===0){
|
|
|
|
|
this.getsettings();
|
|
|
|
|
this.cancelmodel();
|
|
|
|
|
this.isgoback()
|
|
|
|
|
this.setState({
|
|
|
|
|
// Modalstype:true,
|
|
|
|
|
// Modalstopval:resulet.data.message,
|
|
|
|
@ -871,8 +877,8 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
|
|
|
|
|
//编辑
|
|
|
|
|
editSetting = () => {
|
|
|
|
|
try {
|
|
|
|
|
if (this.state.settingdata.is_end === true) {
|
|
|
|
|
|
|
|
|
|
if (this.state.settingdata&&this.state.settingdata.is_end === true) {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// modalsType: true,
|
|
|
|
|
// modalsTopval: "课堂已结束不能再修改!",
|
|
|
|
@ -886,9 +892,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
flagPageEdit: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1025,8 +1029,8 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE">
|
|
|
|
|
<div className="mt10 clearfix edu-back-white poll_list pl20">
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE" id={"publishtimestart"}>
|
|
|
|
|
<div className="mt10 clearfix edu-back-white poll_list pl20" id={"publishtimeend"}>
|
|
|
|
|
|
|
|
|
|
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
|
|
|
|
|
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
|
|
|
|
@ -1113,7 +1117,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"h20 mb30 ml30"} id={"publishtimestart"}>
|
|
|
|
|
<div className={"h20 mb30 ml30"} >
|
|
|
|
|
<span>发布时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isAdmin()===true?starttimetype===true?"时间已过,不能再修改":"":""}>
|
|
|
|
|
<span>
|
|
|
|
@ -1150,7 +1154,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
{this.state.publishTimetypesval}
|
|
|
|
|
</div>:""}
|
|
|
|
|
|
|
|
|
|
<div className={"h20 mb30 ml30"} id={"publishtimeend"}>
|
|
|
|
|
<div className={"h20 mb30 ml30"} >
|
|
|
|
|
<span>截止时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isAdmin()===true?endtimetype===true?"时间已过,不能再修改":"":""}>
|
|
|
|
|
<span>
|
|
|
|
@ -1166,7 +1170,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
value={end_time===null||end_time===""?"":moment(end_time, dateFormat)}
|
|
|
|
|
onChange={this.onChangeTimeend}
|
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
|
disabled={this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
|
|
|
|
|
disabled={this.props.isSuperAdmin()===true?flagPageEdit===true?false:true:this.props.isAdmin()===true?endtimetype===true?true:flagPageEdit===true?false:true:true}
|
|
|
|
|
className={this.state.endTimetypes===true||end_timetype===true?"noticeTip":""}
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|