From 2141b068f97e5f6830be88fe19fa4766ba544ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 20 Jun 2019 19:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E6=97=B6=E9=97=B4=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssetting.js | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index a002911ec..9ef3d7091 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -480,7 +480,7 @@ class GraduationTaskssettingapp extends Component{ 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){ this.setState({ latepenaltytype:true, @@ -500,19 +500,19 @@ class GraduationTaskssettingapp extends Component{ } - - if(moment(publish_time) <= moment()){ - this.setState({ - publishTimetypes:true, - publishTimetypesval:"发布时间不能早于当前时间", - }) - return - }else{ - this.setState({ - publishTimetypes:false - }) - } - + if(starttimetype===false) { + if (moment(publish_time) <= moment()) { + this.setState({ + publishTimetypes: true, + publishTimetypesval: "发布时间不能早于当前时间", + }) + return + } else { + this.setState({ + publishTimetypes: false + }) + } + } if(moment(end_time)