From 0c4a92251ec344e54de909470c8601ab80ec17ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Dec 2019 14:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Exercisesetting.js | 19 ++++++------------- .../modules/courses/graduation/tasks/index.js | 2 +- .../courses/poll/PollDetailTabForth.js | 4 ++-- .../courses/poll/PollDetailTabForthRules.js | 2 +- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Exercisesetting.js b/public/react/src/modules/courses/exercise/Exercisesetting.js index df4167047..654da480c 100644 --- a/public/react/src/modules/courses/exercise/Exercisesetting.js +++ b/public/react/src/modules/courses/exercise/Exercisesetting.js @@ -178,16 +178,9 @@ class Exercisesetting extends Component{ } if(result.data.exercise.unified_setting == true && moment(result.data.exercise.end_time) <= moment()){ - - // if(this.props.isSuperAdmin()===true){ - // this.setState({ - // end_timetype:false - // }) - // }else{ this.setState({ end_timetype:true }) - // } } let group=result.data.published_course_groups; @@ -236,10 +229,10 @@ class Exercisesetting extends Component{ //提交form表单 handleSubmit = (e) => { e.preventDefault(); - if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){ - console.log("190"); - console.log(this.props.Commonheadofthetestpaper.exercise_status); - } + // if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){ + // console.log("190"); + // console.log(this.props.Commonheadofthetestpaper.exercise_status); + // } this.props.form.validateFieldsAndScroll((err, values) => { if(!err){ @@ -327,7 +320,7 @@ class Exercisesetting extends Component{ } } - if(this.state.end_timetype === false){ + if(this.state.end_timetype === false||this.props.isAdmin()==true){ if(moment(end_time,dataformat) <= moment(publish_time,dataformat)){ this.setState({ unit_e_tip:"截止时间不能小于发布时间" @@ -525,7 +518,7 @@ class Exercisesetting extends Component{ end_time:null }) }else{ - if(dateString {/*{this.props.isAdmin() ? this.addDir()}>题库选用:""}*/} {/*{this.props.isAdmin() ?导出成绩 :""}*/} - {this.props.isAdmin() ? + {this.props.isAdmin() ? 新建 diff --git a/public/react/src/modules/courses/poll/PollDetailTabForth.js b/public/react/src/modules/courses/poll/PollDetailTabForth.js index e2456d6d9..98127be7e 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForth.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForth.js @@ -589,7 +589,7 @@ class PollDetailTabForth extends Component{
截止时间:
- + diff --git a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js index 39176752b..1a53b1acd 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabForthRules.js +++ b/public/react/src/modules/courses/poll/PollDetailTabForthRules.js @@ -462,7 +462,7 @@ class PollDetailTabForthRules extends Component{ disabledTime={disabledDateTime} disabledDate={disabledDate} disabled={ - this.props.type==="polls"||this.props.type==="Exercise"? + this.props.type==="Exercise"? rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ?this.props.isAdmin()?!flagPageEdit: true : !flagPageEdit : rule.e_timeflag == true ? this.props.isAdmin()?!flagPageEdit :true : !flagPageEdit: rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit }