|
|
@ -196,8 +196,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
array.push({
|
|
|
|
array.push({
|
|
|
|
course_group_id: result.data.group_settings[i].group_id,
|
|
|
|
course_group_id: result.data.group_settings[i].group_id,
|
|
|
|
course_group_name: result.data.group_settings[i].group_name,
|
|
|
|
course_group_name: result.data.group_settings[i].group_name,
|
|
|
|
publish_time: result.data.group_settings[i].publish_time,
|
|
|
|
publish_time: moment(result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
end_time: result.data.group_settings[i].end_time,
|
|
|
|
end_time: moment(result.data.group_settings[i].end_time).format('YYYY-MM-DD HH:mm'),
|
|
|
|
publish_flag: "",
|
|
|
|
publish_flag: "",
|
|
|
|
end_flag: "",
|
|
|
|
end_flag: "",
|
|
|
|
class_flag: "",
|
|
|
|
class_flag: "",
|
|
|
@ -215,8 +215,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
arrays.push({
|
|
|
|
arrays.push({
|
|
|
|
course_group_id:result.data.group_settings[i].group_id,
|
|
|
|
course_group_id:result.data.group_settings[i].group_id,
|
|
|
|
course_group_name:result.data.group_settings[i].group_name,
|
|
|
|
course_group_name:result.data.group_settings[i].group_name,
|
|
|
|
publish_time:result.data.group_settings[i].publish_time,
|
|
|
|
publish_time:moment( result.data.group_settings[i].publish_time).format('YYYY-MM-DD HH:mm') ,
|
|
|
|
end_time:result.data.group_settings[i].end_time,
|
|
|
|
end_time:moment(result.data.group_settings[i].end_time ).format('YYYY-MM-DD HH:mm'),
|
|
|
|
course_choosed:0,
|
|
|
|
course_choosed:0,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -447,8 +447,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let rulesdata=this.state.rulesdata;
|
|
|
|
let rulesdata=this.state.rulesdata;
|
|
|
|
// console.log("pustdate123131312321321321");
|
|
|
|
console.log("pustdate123131312321321321");
|
|
|
|
// console.log(rulesdata);
|
|
|
|
console.log(rulesdata);
|
|
|
|
if(
|
|
|
|
if(
|
|
|
|
rulesdata.length === 0){
|
|
|
|
rulesdata.length === 0){
|
|
|
|
this.props.showNotification(`分班发布设置不能为空`);
|
|
|
|
this.props.showNotification(`分班发布设置不能为空`);
|
|
|
@ -577,6 +577,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
this.props.showNotification(`没有关卡不能更新设置`);
|
|
|
|
this.props.showNotification(`没有关卡不能更新设置`);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.state.unifiedsetting === true){
|
|
|
|
if(this.state.unifiedsetting === true){
|
|
|
|
console.log("统一设置");
|
|
|
|
console.log("统一设置");
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
@ -588,23 +590,37 @@ class Trainingjobsetting extends Component {
|
|
|
|
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, //扣分项
|
|
|
|
work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比
|
|
|
|
work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : 0,//占比分
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分
|
|
|
|
shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0,
|
|
|
|
shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0,
|
|
|
|
challenge_settings: array,
|
|
|
|
challenge_settings: array,
|
|
|
|
score_open: this.state.publicwork,
|
|
|
|
score_open: this.state.publicwork,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
//非统一配置
|
|
|
|
// //非统一配置
|
|
|
|
console.log("非统一设置");
|
|
|
|
// console.log("非统一设置");
|
|
|
|
|
|
|
|
let rulesdata=this.state.rulesdata;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let newlist=[]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rulesdata.map((item,key)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(item.publish_time==="Invalid date"||item.end_time==="Invalid date"||item.publiend_timesh_time==="Invalid date"){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
newlist.push(item)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
unified_setting: this.state.unifiedsetting, //非统一配置
|
|
|
|
unified_setting: this.state.unifiedsetting, //非统一配置
|
|
|
|
group_settings: this.state.rulesdata,
|
|
|
|
group_settings: newlist,
|
|
|
|
allow_late: this.state.allowreplenishment, //补交
|
|
|
|
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, //扣分项
|
|
|
|
work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比
|
|
|
|
work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : 0,//占比分
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分
|
|
|
|
shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0,
|
|
|
|
shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0,
|
|
|
|
challenge_settings: array,
|
|
|
|
challenge_settings: array,
|
|
|
|
score_open: this.state.publicwork,
|
|
|
|
score_open: this.state.publicwork,
|
|
|
@ -1710,8 +1726,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(rules)
|
|
|
|
console.log(rules);
|
|
|
|
console.log(datas)
|
|
|
|
console.log(datas);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
rules,
|
|
|
|
rules,
|
|
|
|
rulesdata:datas,
|
|
|
|
rulesdata:datas,
|
|
|
|