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