调整毕设

dev_oauth
杨树明 5 years ago
parent 0877e5fc0c
commit 48a1810b68

@ -80,6 +80,7 @@ class GraduationTaskssettingapp extends Component{
starttime:undefined, starttime:undefined,
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
commentstatustype:undefined
} }
} }
@ -102,10 +103,10 @@ class GraduationTaskssettingapp extends Component{
} }
let starttype=false; let starttype=false;
let endtype=false; let endtype=false;
if(moment(result.data.publish_time)<moment()){ if(moment(result.data.publish_time)<=moment()){
starttype=true starttype=true
} }
if(moment(result.data.end_time)<moment()){ if(moment(result.data.end_time)<=moment()){
endtype=true endtype=true
} }
@ -130,6 +131,7 @@ class GraduationTaskssettingapp extends Component{
taskname: result.data.task_name, taskname: result.data.task_name,
coursename: result.data.course_name, coursename: result.data.course_name,
commentstatus: result.data.comment_status, commentstatus: result.data.comment_status,
commentstatustype:result.data.status,
commentnum: result.data.comment_num, commentnum: result.data.comment_num,
operworks: result.data.open_work, operworks: result.data.open_work,
opergrade: result.data.open_score, opergrade: result.data.open_score,
@ -364,7 +366,9 @@ class GraduationTaskssettingapp extends Component{
} }
funcrosscomment=(e)=>{ funcrosscomment=(e)=>{
let {latetime,end_time,allowlate}=this.state; let {latetime,end_time,allowlate,commenttime}=this.state;
let commenttimetype=commenttime===null||commenttime==="";
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");
@ -377,26 +381,28 @@ class GraduationTaskssettingapp extends Component{
let newend_timed=moment(end_time).add(7, '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 newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newtime;
if(e.target.checked===true){ if(e.target.checked===true){
if(commenttimetype===true){
if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){ if(allowlate===1||allowlate===true){
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea) if(latetime===null||latetime===""){
}else{ this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes) }else{
} this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
}else{ }
if(end_time===null||end_time===""){
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
}else{ }else{
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed) if(end_time===null||end_time===""){
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
}else{
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
}
} }
} }
}else{ }else{
this.setState({ this.setState({
crosscomment:e.target.checked, crosscomment:e.target.checked,
commenttime:undefined commenttime:undefined
}) })
} }
} }
@ -519,7 +525,7 @@ class GraduationTaskssettingapp extends Component{
} }
if(moment(end_time)<moment(publish_time)){ if(moment(end_time)<=moment(publish_time)){
this.setState({ this.setState({
endTimetypes:true, endTimetypes:true,
endTimetypesval:"截止时间不能早于发布时间" endTimetypesval:"截止时间不能早于发布时间"
@ -531,13 +537,13 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
if(moment(latetime)<moment(publish_time)){ if(moment(latetime)<=moment(publish_time)){
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)){
this.setState({ this.setState({
latetimetype:true, latetimetype:true,
latetimetypeval:"结束时间不能早于截止时间" latetimetypeval:"结束时间不能早于截止时间"
@ -562,7 +568,7 @@ class GraduationTaskssettingapp extends Component{
commenttimetype:false commenttimetype:false
}) })
} }
if(moment(this.state.commenttime)<moment(publish_time)){ if(moment(this.state.commenttime)<=moment(publish_time)){
this.setState({ this.setState({
commenttimetype:true, commenttimetype:true,
commenttimevalue:"开始时间不能小于发布时间", commenttimevalue:"开始时间不能小于发布时间",
@ -574,7 +580,7 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
if(moment(this.state.commenttime)<moment(end_time)){ if(moment(this.state.commenttime)<=moment(end_time)){
this.setState({ this.setState({
commenttimetype:true, commenttimetype:true,
commenttimevalue:"开始时间不能小于截止时间", commenttimevalue:"开始时间不能小于截止时间",
@ -918,7 +924,8 @@ class GraduationTaskssettingapp extends Component{
endtimetype, endtimetype,
commenttimetype, commenttimetype,
commenttimevalue, commenttimevalue,
flagPageEdit flagPageEdit,
commentstatustype
} =this.state; } =this.state;
let courseId=this.props.match.params.coursesId; let courseId=this.props.match.params.coursesId;
@ -1154,7 +1161,7 @@ class GraduationTaskssettingapp extends Component{
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div> <div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div> <div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>取各教师最终评分的平均分</span></div>
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment} <Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span> disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>给老师分配其他指导老师的学生作品</span>
</Checkbox> </Checkbox>
{crosscomment===true?<div> {crosscomment===true?<div>
<div className={"h20 mb30 ml30 mt20 ml87"}> <div className={"h20 mb30 ml30 mt20 ml87"}>

@ -856,21 +856,21 @@ class GraduationTaskssettinglist extends Component{
dataIndex: 'operation', dataIndex: 'operation',
className:'edu-txt-center', className:'edu-txt-center',
render: operation => ( render: operation => (
<div> <div style={{cursor: 'pointer'}}>
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<React.Fragment> <React.Fragment>
{ {
tag.name && tag.name &&
<Tooltip key={key} placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}> <Tooltip key={key} placement="bottom" title={tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF',padding:"0px 5px"}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} > {tag.name==="评阅"?<p style={{color:'#4CACFF',padding:"0px 5px"}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name} {tag.name}
</a> </p>
: :
<a style={{color:tag.name==="调分"?"#000":'#4CACFF',padding:"0px 5px"}} <p style={{color:tag.name==="调分"?"#000":'#4CACFF',padding:"0px 5px"}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":()=>this.showAllocationModal(tag.id):""}>
{tag.name} {tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":tag.name:tag.name}
</a> </p>
} }
</Tooltip> </Tooltip>
} }
@ -973,7 +973,7 @@ class GraduationTaskssettinglist extends Component{
white-space: nowrap; white-space: nowrap;
} }
.ant-table-tbody>tr>td, .ant-table-thead>tr>th{ .ant-table-tbody>tr>td, .ant-table-thead>tr>th{
padding: 16px 10px padding: 10px 0px
} }
` `

Loading…
Cancel
Save