From 48a1810b686a977e22621f7528c21076167a503a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 23 Sep 2019 16:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4=E6=AF=95=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 53 +++++++++++-------- .../tasks/GraduationTaskssettinglist.js | 18 +++---- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 3adf9c06e..25fde5926 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -80,6 +80,7 @@ class GraduationTaskssettingapp extends Component{ starttime:undefined, DownloadType:false, DownloadMessageval:undefined, + commentstatustype:undefined } } @@ -102,10 +103,10 @@ class GraduationTaskssettingapp extends Component{ } let starttype=false; let endtype=false; - if(moment(result.data.publish_time){ - 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 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 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===""){ - this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea) - }else{ - this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes) - } - }else{ - if(end_time===null||end_time===""){ - this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb) + if(commenttimetype===true){ + + if(allowlate===1||allowlate===true){ + if(latetime===null||latetime===""){ + this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea) + }else{ + this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes) + } }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{ this.setState({ crosscomment:e.target.checked, - commenttime:undefined + commenttime:undefined }) } } @@ -519,7 +525,7 @@ class GraduationTaskssettingapp extends Component{ } - if(moment(end_time)评分设置
最终成绩组成 (取各教师最终评分的平均分)
启用交叉评阅 (给老师分配其他指导老师的学生作品) + disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 (给老师分配其他指导老师的学生作品) {crosscomment===true?
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 20a34ab89..fd140846d 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -856,21 +856,21 @@ class GraduationTaskssettinglist extends Component{ dataIndex: 'operation', className:'edu-txt-center', render: operation => ( -
+
{this.props.isAdmin()?operation.map((tag,key) => { return( { tag.name && - 调整学生最终成绩
其它历史评分将全部失效:""}> - {tag.name==="评阅"? + 调整学生最终成绩
其它历史评分将全部失效:""}> + {tag.name==="评阅"?

{tag.name} - +

: - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> - {tag.name} - +

this.showModulationtype(tag.id):tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":()=>this.showAllocationModal(tag.id):""}> + {tag.name==="分配"?taskslistdata&&taskslistdata.cross_comment===true?"":tag.name:tag.name} +

}
} @@ -973,7 +973,7 @@ class GraduationTaskssettinglist extends Component{ white-space: nowrap; } .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ - padding: 16px 10px + padding: 10px 0px } `