chromesetting
杨树明 5 years ago
parent dc01f2630b
commit 0c4a92251e

@ -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<moment().format('YYYY-MM-DD HH:mm')){
if(dateString<=moment().format('YYYY-MM-DD HH:mm')){
this.setState({
unit_e_tip:"截止时间不能早于当前时间",
e_flag:true

@ -666,7 +666,7 @@ class GraduationTasks extends Component{
<React.Fragment>
{/*{this.props.isAdmin() ?<WordsBtn style="blue" className="mr30" onClick={() => this.addDir()}>题库选用</WordsBtn>:""}*/}
{/*{this.props.isAdmin() ?<a href={"/api/graduation_tasks/"+category_id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a> :""}*/}
{this.props.isAdmin() ? <WordsBtn style="blue" className="mr10 fr font-16">
{this.props.isAdmin() ? <WordsBtn style="blue" className=" fr font-16">
<Link to={"/courses/" + coursesId + "/graduation_tasks/"+category_id+"/new"}>
<span className={"color-blue font-16"}>新建</span>
</Link>

@ -589,7 +589,7 @@ class PollDetailTabForth extends Component{
<div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl">
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"":"截止时间已过,不能再修改":""}>
<Tooltip placement="bottom" title={un_change_end ? this.props.isAdmin()?"截止时间已过,不能再修改":"":""}>
<span>
<DatePicker
showToday={false}
@ -605,7 +605,7 @@ class PollDetailTabForth extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={ end_time && moment(end_time,dataformat) }
disabled={un_change_end == true ? this.props.isAdmin()?!flagPageEdit:true : !flagPageEdit }
disabled={un_change_end == true ?true : !flagPageEdit }
>
</DatePicker>
</span>

@ -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
}

Loading…
Cancel
Save