dev_static
杨树明 5 years ago
parent ade4b553bd
commit 5239351d7b

@ -638,7 +638,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('unified_setting')
(
<Checkbox disabled={flagPageEdit===true?polls&&polls.exercise_status===1?false:true:true} className="mr15 font-16 color-grey-6"
<Checkbox disabled={this.props.isAdmin()===true?flagPageEdit===true?polls&&polls.exercise_status===1?false:true:true:true} className="mr15 font-16 color-grey-6"
checked={unified_setting?true:false}
onChange={this.changeUnit}>统一设置</Checkbox>
)}
@ -664,7 +664,7 @@ class Exercisesetting extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimepublish}
value={publish_time && moment(publish_time,"YYYY-MM-DD HH:mm")}
disabled={ publish_timetype===true?true:!flagPageEdit }
disabled={ this.props.isAdmin()===true?publish_timetype===true?true:!flagPageEdit:true}
></DatePicker>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
@ -692,7 +692,7 @@ class Exercisesetting extends Component{
disabledDate={disabledDate}
onChange={this.onChangeTimeEnd}
value={end_time && moment(end_time,"YYYY-MM-DD HH:mm")}
disabled={ end_timetype===true?this.props.isAdmin()?!flagPageEdit:true:!flagPageEdit}
disabled={ this.props.isAdmin()===true? end_timetype===true?this.props.isAdmin()?!flagPageEdit:true:!flagPageEdit:true}
>
</DatePicker>
</Tooltip>
@ -729,7 +729,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('time')
(
<Input disabled={!flagPageEdit} className="mr10" style={{width:"100px",height:"35px" }}
<Input disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr10" style={{width:"100px",height:"35px" }}
value={time===-1?"":time}
onInput={this.funlatepenalty}/>
)}
@ -746,7 +746,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('question_random')
(
<Checkbox disabled={!flagPageEdit} className="mr15 font-16 color-grey-6" checked={question_random} onChange={this.questionrandom}>题目顺序随机打乱</Checkbox>
<Checkbox disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr15 font-16 color-grey-6" checked={question_random} onChange={this.questionrandom}>题目顺序随机打乱</Checkbox>
)}
</Form.Item>
<span className="color-grey-c">(选中则学生答题时题目顺序按照题型随机显示</span>
@ -755,7 +755,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('choice_random')
(
<Checkbox disabled={!flagPageEdit} className="mr15 font-16 color-grey-6" checked={choice_random} onChange={this.choicerandom}>选项顺序随机打乱</Checkbox>
<Checkbox disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr15 font-16 color-grey-6" checked={choice_random} onChange={this.choicerandom}>选项顺序随机打乱</Checkbox>
)}
</Form.Item>
<span className="color-grey-c">(选中则学生答题时选项顺序随机显示</span>
@ -776,7 +776,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('score_open')
(
<Checkbox disabled={!flagPageEdit} className="mr15 font-16 color-grey-6" checked={score_open} onChange={this.ChangeFlagPublic}>公开成绩</Checkbox>
<Checkbox disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr15 font-16 color-grey-6" checked={score_open} onChange={this.ChangeFlagPublic}>公开成绩</Checkbox>
)}
</Form.Item>
<span className="color-grey-c">(选中则在试卷截止时间之后已提交答题的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
@ -785,7 +785,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('answer_open')
(
<Checkbox disabled={!flagPageEdit} className="mr15 font-16 color-grey-6" checked={answer_open} onChange={this.ChangeFlagName}>公开答案</Checkbox>
<Checkbox disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr15 font-16 color-grey-6" checked={answer_open} onChange={this.ChangeFlagName}>公开答案</Checkbox>
)}
</Form.Item>
<span className="color-grey-c">(选中则在试卷截止时间之后已提交答题的学生可以查看试卷题目的答案否则不能查看)</span>
@ -794,7 +794,7 @@ class Exercisesetting extends Component{
<Form.Item className="fl pollForm">
{getFieldDecorator('show_statistic')
(
<Checkbox disabled={!flagPageEdit} className="mr15 font-16 color-grey-6" checked={show_statistic} onChange={this.showstatistic}>公开统计</Checkbox>
<Checkbox disabled={this.props.isAdmin()===true?!flagPageEdit:true} className="mr15 font-16 color-grey-6" checked={show_statistic} onChange={this.showstatistic}>公开统计</Checkbox>
)}
</Form.Item>
<span className="color-grey-c">(选中则在试卷截止时间之后已提交答题的学生可以查看答题统计否则不能查看)</span>

@ -402,7 +402,7 @@ class PollDetailTabForthRules extends Component{
}
value={rule.course_group_id}
onChange={(value,option)=>this.changeClasses(value,option,r)}
disabled={rule.p_timeflag===undefined?moment(rule.publish_time,dataformat) <= moment()?true:!flagPageEdit: rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
disabled={this.props.isAdmin()===true?rule.p_timeflag===undefined?moment(rule.publish_time,dataformat) <= moment()?true:!flagPageEdit: rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit:true}
>
{
courseGroup && courseGroup.length > 0 && courseGroup.map((team,t)=>{
@ -436,7 +436,7 @@ class PollDetailTabForthRules extends Component{
format="YYYY-MM-DD HH:mm"
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={ rule.p_timeflag===undefined?moment(rule.publish_time,dataformat) <= moment()?true:!flagPageEdit: rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
disabled={ this.props.isAdmin()===true?rule.p_timeflag===undefined?moment(rule.publish_time,dataformat) <= moment()?true:!flagPageEdit: rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit:true}
style={{"height":"42px",width:'100%'}}
></DatePicker>
</span>
@ -463,9 +463,10 @@ class PollDetailTabForthRules extends Component{
disabledTime={disabledDateTime}
disabledDate={disabledDate}
disabled={
this.props.isAdmin()===true?
this.props.type==="Exercise"||this.props.type==="polls"?
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
rule.e_timeflag === undefined ? rule.publish_time === null ? false : moment(rule.end_time, dataformat) <= moment() ? true : !flagPageEdit : rule.e_timeflag == true ? true : !flagPageEdit:true
}
style={{"height":"42px"}}
></DatePicker>

Loading…
Cancel
Save