|
|
@ -221,7 +221,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time,
|
|
|
|
deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time,
|
|
|
|
late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
|
|
|
|
late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
|
|
|
|
late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
|
|
|
|
late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
|
|
|
|
allowreplenishment: result.data.allow_late === true ? "允许补交" : "禁止补交",
|
|
|
|
allowreplenishment: result.data.allow_late,
|
|
|
|
latededuction: result.data.late_penalty,
|
|
|
|
latededuction: result.data.late_penalty,
|
|
|
|
level: result.data.answer_open_evaluation === true ? "满分" : "扣分",
|
|
|
|
level: result.data.answer_open_evaluation === true ? "满分" : "扣分",
|
|
|
|
completionefficiencyscore: result.data.work_efficiency,
|
|
|
|
completionefficiencyscore: result.data.work_efficiency,
|
|
|
@ -231,10 +231,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
challenge_settings: result.data.challenge_settings,
|
|
|
|
challenge_settings: result.data.challenge_settings,
|
|
|
|
code_review:result.data.code_review
|
|
|
|
code_review:result.data.code_review
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -337,7 +333,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.state.allowreplenishment === "允许补交") {
|
|
|
|
if (this.state.allowreplenishment === true) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") {
|
|
|
|
if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") {
|
|
|
@ -409,7 +405,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.allowreplenishment === "允许补交") {
|
|
|
|
if (this.state.allowreplenishment === true) {
|
|
|
|
if (this.state.latededuction === undefined) {
|
|
|
|
if (this.state.latededuction === undefined) {
|
|
|
|
this.props.showNotification(`请输入迟交扣分数`);
|
|
|
|
this.props.showNotification(`请输入迟交扣分数`);
|
|
|
|
|
|
|
|
|
|
|
@ -530,7 +526,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
unified_setting: this.state.unifiedsetting, //统一配置
|
|
|
|
unified_setting: this.state.unifiedsetting, //统一配置
|
|
|
|
publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间
|
|
|
|
publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间
|
|
|
|
end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间
|
|
|
|
end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间
|
|
|
|
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
|
|
|
|
allow_late: this.state.allowreplenishment, //补交
|
|
|
|
late_penalty: parseInt(this.state.latededuction), //迟交扣分
|
|
|
|
late_penalty: parseInt(this.state.latededuction), //迟交扣分
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
@ -546,7 +542,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
unified_setting: this.state.unifiedsetting, //非统一配置
|
|
|
|
unified_setting: this.state.unifiedsetting, //非统一配置
|
|
|
|
group_settings: this.state.rulesdata,
|
|
|
|
group_settings: this.state.rulesdata,
|
|
|
|
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
|
|
|
|
allow_late: this.state.allowreplenishment, //补交
|
|
|
|
late_penalty: parseInt(this.state.latededuction), //迟交扣分
|
|
|
|
late_penalty: parseInt(this.state.latededuction), //迟交扣分
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
@ -651,9 +647,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//允许补交
|
|
|
|
//允许补交
|
|
|
|
onChanges = (e) => {
|
|
|
|
onChanges = (e) => {
|
|
|
|
// console.log("640");
|
|
|
|
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
if(e.target.value ==="允许补交"){
|
|
|
|
if(e.target.checked ===true){
|
|
|
|
if(this.state.end_time !== null && this.state.end_time!== undefined){
|
|
|
|
if(this.state.end_time !== null && this.state.end_time!== undefined){
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
|
|
|
|
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
|
|
|
@ -665,16 +660,19 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
allowreplenishment: e.target.value,
|
|
|
|
allowreplenishment: e.target.checked,
|
|
|
|
latededuction:5,
|
|
|
|
latededuction:5,
|
|
|
|
whethertopay:true,
|
|
|
|
whethertopay:true,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
allowreplenishment: e.target.value,
|
|
|
|
allowreplenishment: e.target.checked,
|
|
|
|
latededuction:0,
|
|
|
|
latededuction:0,
|
|
|
|
whethertopay:false,
|
|
|
|
whethertopay:false,
|
|
|
|
|
|
|
|
hand__e_tip: "",
|
|
|
|
|
|
|
|
hand_flags: false,
|
|
|
|
|
|
|
|
handclass:"",
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1239,7 +1237,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
publish_time:moment(handleDateString(dateString))
|
|
|
|
publish_time:moment(handleDateString(dateString))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(this.state.allowreplenishment === "允许补交") {
|
|
|
|
if(this.state.allowreplenishment === true) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
end_time:moment(handleDateString(dateString)).add(1, 'months'),
|
|
|
|
end_time:moment(handleDateString(dateString)).add(1, 'months'),
|
|
|
|
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
|
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
@ -1303,7 +1301,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
end_time:moment(handleDateString(dateString))
|
|
|
|
end_time:moment(handleDateString(dateString))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// this.onChangedata('end_time', value, dateString);
|
|
|
|
// this.onChangedata('end_time', value, dateString);
|
|
|
|
if(this.state.allowreplenishment === "允许补交"){
|
|
|
|
if(this.state.allowreplenishment === true){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
|
|
|
|
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_time:moment(handleDateString(dateString)).add(2, 'months'),
|
|
|
|
late_time:moment(handleDateString(dateString)).add(2, 'months'),
|
|
|
@ -1580,7 +1578,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
|
|
|
|
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
|
|
|
|
endtime=false;
|
|
|
|
endtime=false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(this.state.allowreplenishment === "禁止补交"){
|
|
|
|
if(this.state.allowreplenishment === false){
|
|
|
|
whethertopays=false;
|
|
|
|
whethertopays=false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -1985,11 +1983,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt10">
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt10">
|
|
|
|
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
|
|
|
|
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{/*value={this.state.allowreplenishment}*/}
|
|
|
|
<RadioGroup className="ml40 mt10" onChange={this.onChanges}
|
|
|
|
<div className="ml40 mt10"
|
|
|
|
value={this.state.allowreplenishment}>
|
|
|
|
>
|
|
|
|
<Radio style={radioStyle} value={"允许补交"} disabled={!flagPageEdit}>允许补交 <span
|
|
|
|
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
|
|
|
|
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中,则允许学生延时提交作品)</span></Radio>
|
|
|
|
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中,则允许学生延时提交作品)</span></Checkbox>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"h21 mb30 ml30 mt20"}>
|
|
|
|
<div className={"h21 mb30 ml30 mt20"}>
|
|
|
|
<span style={{"width": "100px","color":"#999999"}}>迟交扣分:</span>
|
|
|
|
<span style={{"width": "100px","color":"#999999"}}>迟交扣分:</span>
|
|
|
@ -2049,8 +2047,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>
|
|
|
|
{/*<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>*/}
|
|
|
|
</RadioGroup>
|
|
|
|
</div>
|
|
|
|
<div className="h20 mb10 "></div>
|
|
|
|
<div className="h20 mb10 "></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/*评分设置*/}
|
|
|
|
{/*评分设置*/}
|
|
|
|