完善普通作业分组作业毕设任务设置补交统一

issues25489
杨树林 5 years ago
parent ce97442fbc
commit 0ee2c7a696

@ -46,6 +46,7 @@ function disabledDateFunc(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
// 类似页面 http://localhost:3007/courses/1309/graduation/graduation_tasks/48/76/setting
//普通作业分组作业设置
class CommonWorkSetting extends Component{
constructor(props){
@ -411,10 +412,11 @@ class CommonWorkSetting extends Component{
}
// 补交设置 允许补交
allow_late_change=(e)=>{
// console.log(e.target.checked );
this.setState({
allow_late: e.target.value
allow_late: e.target.checked
})
if (e.target.value) {
if (e.target.checked) {
this.setState({
late_penalty: 5
})
@ -1155,12 +1157,16 @@ class CommonWorkSetting extends Component{
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>补交设置
<span className={"ml15 font-14 color-grey-9 "}>选中则允许学生延时提交作品</span>
<span className={"ml15 font-14 color-grey-9 "}></span>
</div>
<RadioGroup onChange={this.allow_late_change} value={allow_late}>
<Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>
<Checkbox style={radioStyle} value={"允许补交"} checked={allow_late} className="font-16 "
onChange={this.allow_late_change} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>开启补交 <span
className={"font-14 ml10 color-grey-c"}
style={{textAlign: "left", fontSize: "14px"}}>选中则允许学生延时提交作品</span></Checkbox>
<div className={"h21 mb10 ml30 mt20"}>
<span>迟交扣分</span>
@ -1205,9 +1211,7 @@ class CommonWorkSetting extends Component{
</div>
<Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>
</RadioGroup>
</div>
@ -1539,3 +1543,10 @@ class CommonWorkSetting extends Component{
const CommonWorkSettingForm = Form.create({ name: 'commonworkSettingForm' })(CommonWorkSetting);
export default CommonWorkSettingForm;
// {/*<RadioGroup onChange={this.allow_late_change} value={allow_late}>*/}
//
// {/* <Radio style={radioStyle} value={true} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>允许补交</Radio>*/}
// {/* <Radio style={radioStyle} value={false} disabled={noAuth || moment(init_late_time) < this.fetchMoment}>禁止补交</Radio>*/}
//
// {/*</RadioGroup>*/}

@ -31,7 +31,7 @@ function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
//毕设任务设置
class GraduationTaskssettingapp extends Component{
constructor(props){
@ -315,17 +315,17 @@ class GraduationTaskssettingapp extends Component{
allowlatefun=(e)=>{
let {end_time}=this.state;
if(e.target.value===true||e.target.value===1){
if(e.target.checked===true||e.target.checked===1){
this.setState({
latepenalty:5,
allowlate:e.target.value,
allowlate:e.target.checked,
latetime:end_time===null||end_time === ""?"":moment(moment(handleDateString(end_time))).add(1, 'months').format("YYYY-MM-DD HH:mm"),
})
}else{
this.setState({
latepenalty:0,
allowlate:e.target.value,
allowlate:e.target.checked,
latetime:""
})
}
@ -1120,10 +1120,10 @@ debugger
<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl36">
<div className={" font-16 color-dark h20 mb20"}>补交设置 </div>
<RadioGroup onChange={this.allowlatefun} value={allowlate===true||allowlate===1?1:2} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}>
<Radio style={radioStyle} value={1}>开启补交<span className={"font-14 color-grey-c "}>选中则允许学生延时提交作品</span></Radio>
<Checkbox style={radioStyle} value={"允许补交"} checked={allowlate} className="font-16 "
onChange={this.allowlatefun} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}>开启补交 <span
className={"font-14 ml10 color-grey-c"}
style={{textAlign: "left", fontSize: "14px"}}>选中则允许学生延时提交作品</span></Checkbox>
<div className={"h21 mb30 ml30 mt20"}>
<span>迟交扣分</span>
@ -1163,11 +1163,6 @@ debugger
{latetimetype===true?<div className={"color-red ml70"}>{this.state.latetimetypeval}</div>:""}
</div>
<Radio style={radioStyle} value={2}>禁止补交</Radio>
</RadioGroup>
</div>
@ -1308,3 +1303,9 @@ debugger
const GraduationTaskssetting = Form.create({ name: 'coursesNew' })(GraduationTaskssettingapp);
export default GraduationTaskssetting;
// {/*<RadioGroup onChange={this.allowlatefun} value={allowlate===true||allowlate===1?1:2} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}>*/}
//
// {/* <Radio style={radioStyle} value={1}>开启补交<span className={"font-14 color-grey-c "}>(选中,则允许学生延时提交作品)</span></Radio>*/}
// {/* <Radio style={radioStyle} value={2}>禁止补交</Radio>*/}
//
// {/*</RadioGroup>*/}

Loading…
Cancel
Save