|
|
|
@ -43,6 +43,7 @@ function range(start, end) {
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function disabledDateTime() {
|
|
|
|
|
return {
|
|
|
|
|
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
|
|
|
|
@ -128,6 +129,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
late_timesbool: false,
|
|
|
|
|
work_efficiencys: false,
|
|
|
|
|
task_pass: false, //是否允许跳关
|
|
|
|
|
CalculateMax: 100,//总分值
|
|
|
|
|
}
|
|
|
|
|
// console.log("获取到的值")
|
|
|
|
|
// console.log("Trainingjobsetting")
|
|
|
|
@ -150,11 +152,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
this.props.triggerRef(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.props.isAdmin() === false) {
|
|
|
|
|
this.cancelEdit()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// componentWillReceiveProps(nextProps) {
|
|
|
|
|
// // console.log("+++++++++916");
|
|
|
|
|
// // console.log(nextProps);
|
|
|
|
@ -304,7 +306,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
if (bool === true) {
|
|
|
|
|
if (this.props.isAdmin() !== undefined) {
|
|
|
|
|
if (this.props.isAdmin() === true) {
|
|
|
|
|
|
|
|
|
|
this.editSettings(result);
|
|
|
|
|
this.Calculatethetotalscore(result.data.eff_score, result.data.challenge_settings);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -319,10 +323,63 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// 找到锚点
|
|
|
|
|
let anchorElement = document.getElementById(anchorName);
|
|
|
|
|
// 如果对应id的锚点存在,就跳转到锚点
|
|
|
|
|
if(anchorElement) { anchorElement.scrollIntoView(); }
|
|
|
|
|
if (anchorElement) {
|
|
|
|
|
anchorElement.scrollIntoView();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//计算总分值
|
|
|
|
|
Calculatethetotalscore = (latedeductiontwos, challenge_settings) => {
|
|
|
|
|
//latedeductiontwos 效率分
|
|
|
|
|
//challenge_settings 总分
|
|
|
|
|
|
|
|
|
|
var datas = challenge_settings;
|
|
|
|
|
var challenge_scoredata = [];
|
|
|
|
|
for (var i = 0; i < datas.length; i++) {
|
|
|
|
|
if (datas[i].checked === true) {
|
|
|
|
|
// var object = {
|
|
|
|
|
// challenge_id: datas[i].challenge_id,
|
|
|
|
|
// challenge_score: datas[i].challenge_score,
|
|
|
|
|
// };
|
|
|
|
|
challenge_scoredata.push(datas[i].challenge_score);
|
|
|
|
|
// array.push(object)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// if(array === "[]" || array.length === 0){
|
|
|
|
|
// this.props.showNotification(`没有关卡不能更新设置`);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// var latedeductiontwos = 0;
|
|
|
|
|
// //效率分是否勾选 勾选获取效分
|
|
|
|
|
// if (this.state.completionefficiencyscore === true) {
|
|
|
|
|
// latedeductiontwos = this.state.latedeductiontwo;
|
|
|
|
|
// }
|
|
|
|
|
// if(challenge_scoredata.length>0){
|
|
|
|
|
let len = 0;
|
|
|
|
|
console.log(challenge_scoredata);
|
|
|
|
|
for (var k = 0; k < challenge_scoredata.length; k++) {
|
|
|
|
|
len = len + parseFloat(challenge_scoredata[k]);
|
|
|
|
|
// console.log(challenge_scoredata[k]);
|
|
|
|
|
// console.log(len);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let max = latedeductiontwos + len;
|
|
|
|
|
let maxs = max.toFixed(1);
|
|
|
|
|
console.log("Calculatethetotalscore");
|
|
|
|
|
console.log(maxs);
|
|
|
|
|
this.setState({
|
|
|
|
|
CalculateMax: maxs,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交数据
|
|
|
|
|
pustdate = () => {
|
|
|
|
|
var thiss = this;
|
|
|
|
@ -339,14 +396,14 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
};
|
|
|
|
|
challenge_scoredata.push(datas[i].challenge_score);
|
|
|
|
|
array.push(object)
|
|
|
|
|
console.log("datas[i].challenge_score");
|
|
|
|
|
console.log(i);
|
|
|
|
|
console.log(datas[i].challenge_score);
|
|
|
|
|
// console.log("datas[i].challenge_score");
|
|
|
|
|
// console.log(i);
|
|
|
|
|
// console.log(datas[i].challenge_score);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log("提交的数据"+"pustdate");
|
|
|
|
|
console.log("提交的数据"+"pustdate");
|
|
|
|
|
// console.log("提交的数据"+"pustdate");
|
|
|
|
|
// console.log("提交的数据"+"pustdate");
|
|
|
|
|
|
|
|
|
|
if (this.state.jobsettingsdata.data.unified_setting === true) {
|
|
|
|
|
if (this.state.unifiedsetting === true) {
|
|
|
|
@ -473,8 +530,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
let rulesdata = this.state.rulesdata;
|
|
|
|
|
console.log("pustdate123131312321321321");
|
|
|
|
|
console.log(rulesdata);
|
|
|
|
|
if (
|
|
|
|
|
rulesdata.length === 0) {
|
|
|
|
|
this.props.showNotification(`分班发布设置不能为空`);
|
|
|
|
@ -485,9 +540,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.allowreplenishment === true) {
|
|
|
|
|
if (this.state.latededuction === undefined) {
|
|
|
|
|
this.props.showNotification(`请输入迟交扣分数`);
|
|
|
|
@ -522,28 +574,28 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
if (this.state.completionefficiencyscore === true) {
|
|
|
|
|
if (this.state.latedeductiontwo === undefined) {
|
|
|
|
|
this.props.showNotification(`请输入占比分数`);
|
|
|
|
|
this.props.showNotification(`请输入效率分数`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (this.state.latedeductiontwo === null) {
|
|
|
|
|
this.props.showNotification(`请输入占比分数`);
|
|
|
|
|
this.props.showNotification(`请输入效率分数`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.state.latedeductiontwo === "") {
|
|
|
|
|
this.props.showNotification(`请输入占比分数`);
|
|
|
|
|
this.props.showNotification(`请输入效率分数`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.state.latedeductiontwo <= 0) {
|
|
|
|
|
this.props.showNotification(`占比分数不能小于等于零`);
|
|
|
|
|
this.props.showNotification(`效率分数不能小于等于零`);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if(this.state.latedeductiontwo >100){
|
|
|
|
|
// message.error("占比分不能大于100",1);
|
|
|
|
|
// message.error("效率分不能大于100",1);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if (this.state.proportion === undefined) {
|
|
|
|
@ -583,22 +635,22 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
var len = 0;
|
|
|
|
|
for (var k = 0; k < challenge_scoredata.length; k++) {
|
|
|
|
|
len = len + parseFloat(challenge_scoredata[k]);
|
|
|
|
|
console.log(len);
|
|
|
|
|
console.log(challenge_scoredata[k]);
|
|
|
|
|
console.log(len);
|
|
|
|
|
// console.log(len);
|
|
|
|
|
// console.log(challenge_scoredata[k]);
|
|
|
|
|
// console.log(len);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var max = latedeductiontwos + len;
|
|
|
|
|
if (max > 100) {
|
|
|
|
|
console.log("max>100");
|
|
|
|
|
this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(max<100){
|
|
|
|
|
console.log("max<100");
|
|
|
|
|
this.props.showNotification(`总分值+效率占比分之和要等于100,现在分值为` + max);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (max > 100) {
|
|
|
|
|
// console.log("max>100");
|
|
|
|
|
// this.props.showNotification(`总分值+效率效率分之和要等于100,现在分值为` + max);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if(max<100){
|
|
|
|
|
// console.log("max<100");
|
|
|
|
|
// this.props.showNotification(`总分值+效率效率分之和要等于100,现在分值为` + max);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var url = `/homework_commons/${homeworkid}/update_settings.json`;
|
|
|
|
@ -622,7 +674,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
|
|
work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比
|
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分
|
|
|
|
|
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,
|
|
|
|
|
challenge_settings: array,
|
|
|
|
|
score_open: this.state.publicwork,
|
|
|
|
@ -652,7 +704,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
|
|
|
|
|
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
|
|
|
|
|
work_efficiency: this.state.work_efficiencys, //完成效率评分占比
|
|
|
|
|
eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//占比分
|
|
|
|
|
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,
|
|
|
|
|
challenge_settings: array,
|
|
|
|
|
score_open: this.state.publicwork,
|
|
|
|
@ -660,7 +712,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log("pustdate");
|
|
|
|
|
// console.log(data);
|
|
|
|
|
// console.log(JSON.stringify(data));
|
|
|
|
@ -814,11 +865,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
this.state.proportion = e.target.value
|
|
|
|
|
if (e.target.value === "均分比例") {
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo);
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e.target.value === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo);
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (e.target.value === "自定义分值") {
|
|
|
|
@ -838,11 +889,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
onChangeslevelproportiontwo = (value) => {
|
|
|
|
|
if (value === "均分比例") {
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo);
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (value === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo);
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (value === "自定义分值") {
|
|
|
|
@ -860,15 +911,16 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//均分比例
|
|
|
|
|
Equalproportion = (latedeductiontwo) => {
|
|
|
|
|
Equalproportion = (latedeductiontwo, Proportions, mybool) => {
|
|
|
|
|
|
|
|
|
|
var challenge_settingsdata = this.state.challenge_settings;
|
|
|
|
|
var latedeductiontwos = latedeductiontwo;
|
|
|
|
|
if (latedeductiontwos === undefined || latedeductiontwos === null || latedeductiontwos === "") {
|
|
|
|
|
latedeductiontwos = 0;
|
|
|
|
|
}
|
|
|
|
|
//占比分
|
|
|
|
|
//效率分
|
|
|
|
|
if (challenge_settingsdata.length > 0) {
|
|
|
|
|
var Proportion=100;
|
|
|
|
|
var Proportion = Proportions;
|
|
|
|
|
var oushution = 0;
|
|
|
|
|
//获取占用分后的值
|
|
|
|
|
Proportion = Proportion - latedeductiontwos;
|
|
|
|
@ -950,22 +1002,26 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
flagPageEdits: false,
|
|
|
|
|
challenge_settings: challenge_settingsdata,
|
|
|
|
|
})
|
|
|
|
|
if (mybool === true) {
|
|
|
|
|
this.Calculatethetotalscore(latedeductiontwo, challenge_settingsdata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//经验值比例
|
|
|
|
|
Empiricalvalueratio=(latedeductiontwo)=>{
|
|
|
|
|
Empiricalvalueratio = (latedeductiontwo, ionsps, mybool) => {
|
|
|
|
|
var shixun_exp = this.state.shixun_exp;
|
|
|
|
|
var challenge_settingsdata = this.state.challenge_settings;
|
|
|
|
|
var latedeductiontwos = latedeductiontwo;
|
|
|
|
|
if (latedeductiontwos === undefined || latedeductiontwos === null || latedeductiontwos === "") {
|
|
|
|
|
latedeductiontwos = 0;
|
|
|
|
|
}
|
|
|
|
|
// //占比分
|
|
|
|
|
// //效率分
|
|
|
|
|
if (shixun_exp !== undefined) {
|
|
|
|
|
if (shixun_exp > 0) {
|
|
|
|
|
if (challenge_settingsdata.length > 0) {
|
|
|
|
|
var ionsp=100;
|
|
|
|
|
//获取占比分之后的值
|
|
|
|
|
var ionsp = ionsps;
|
|
|
|
|
//获取效率分之后的值
|
|
|
|
|
ionsp = ionsp - latedeductiontwos;
|
|
|
|
|
//获取道总分值
|
|
|
|
|
var Proportion = shixun_exp;
|
|
|
|
@ -1031,6 +1087,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
flagPageEdits: false,
|
|
|
|
|
challenge_settings: challenge_settingsdata,
|
|
|
|
|
})
|
|
|
|
|
if (mybool === true) {
|
|
|
|
|
this.Calculatethetotalscore(latedeductiontwo, challenge_settingsdata);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//完成效率评分占比
|
|
|
|
@ -1043,15 +1102,14 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
})
|
|
|
|
|
//均分比例
|
|
|
|
|
if (this.state.proportion === "均分比例") {
|
|
|
|
|
this.Equalproportion(20);
|
|
|
|
|
this.Equalproportion(20, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
} else if (this.state.proportion === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(20);
|
|
|
|
|
this.Empiricalvalueratio(20, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
this.state.latedeductiontwo = 0;
|
|
|
|
|
this.setState({
|
|
|
|
|
completionefficiencyscore: e.target.checked,
|
|
|
|
@ -1060,10 +1118,10 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
})
|
|
|
|
|
//均分比例
|
|
|
|
|
if (this.state.proportion === "均分比例") {
|
|
|
|
|
this.Equalproportion(0);
|
|
|
|
|
this.Equalproportion(0, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
} else if (this.state.proportion === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(0);
|
|
|
|
|
this.Empiricalvalueratio(0, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1081,28 +1139,67 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
|
|
|
|
|
var nubmer = value;
|
|
|
|
|
if (!re.test(nubmer)) {
|
|
|
|
|
this.props.showNotification(`请输入数字`);
|
|
|
|
|
this.props.showNotification(`请输入正确的数字`);
|
|
|
|
|
this.setState({
|
|
|
|
|
latededuction: 0
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (nubmer > 100) {
|
|
|
|
|
this.props.showNotification(`请输入小于100的数`);
|
|
|
|
|
|
|
|
|
|
// if (nubmer > 100) {
|
|
|
|
|
// this.props.showNotification(`请输入小于100的数`);
|
|
|
|
|
//
|
|
|
|
|
// this.setState({
|
|
|
|
|
// latededuction: 0
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
this.setState({
|
|
|
|
|
latededuction: 0
|
|
|
|
|
latededuction: value,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//总比分
|
|
|
|
|
Totalscorecalculation = (value) => {
|
|
|
|
|
if (value === "" || value === undefined) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
|
|
|
|
|
var nubmer = value;
|
|
|
|
|
if (!re.test(nubmer)) {
|
|
|
|
|
this.props.showNotification(`请输入正确的数字`);
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
latededuction: value,
|
|
|
|
|
CalculateMax: 0
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (nubmer > 100) {
|
|
|
|
|
// this.props.showNotification(`请输入小于100的数`);
|
|
|
|
|
//
|
|
|
|
|
// this.setState({
|
|
|
|
|
// CalculateMax: 0
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
//获取效率分
|
|
|
|
|
let myvalues = this.state.latedeductiontwo;
|
|
|
|
|
//均分比例
|
|
|
|
|
if (this.state.proportion === "均分比例") {
|
|
|
|
|
this.Equalproportion(myvalues, value, true);
|
|
|
|
|
|
|
|
|
|
} else if (this.state.proportion === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(myvalues, value, true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
CalculateMax: value,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// //占比分
|
|
|
|
|
|
|
|
|
|
// //效率分
|
|
|
|
|
changeTopicNametwo = (value) => {
|
|
|
|
|
// console.log("TrainingjobsettingTrainingjobsetting", value)
|
|
|
|
|
if (value === "" || value === undefined) {
|
|
|
|
@ -1111,7 +1208,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
|
|
|
|
|
var nubmer = value;
|
|
|
|
|
if (!re.test(nubmer)) {
|
|
|
|
|
this.props.showNotification(`请输入数字`);
|
|
|
|
|
this.props.showNotification(`请输入正确的数字`);
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
latedeductiontwo: 0
|
|
|
|
@ -1119,31 +1216,31 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (nubmer > 100) {
|
|
|
|
|
this.props.showNotification(`请输入小于100的数`);
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
latedeductiontwo: 0
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// if (nubmer > 100) {
|
|
|
|
|
// this.props.showNotification(`请输入小于100的数`);
|
|
|
|
|
//
|
|
|
|
|
// this.setState({
|
|
|
|
|
// latedeductiontwo: 0
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
this.setState({
|
|
|
|
|
latedeductiontwo: value,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//均分比例
|
|
|
|
|
if (this.state.proportion === "均分比例") {
|
|
|
|
|
this.Equalproportion(value);
|
|
|
|
|
this.Equalproportion(value, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
} else if (this.state.proportion === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(value);
|
|
|
|
|
this.Empiricalvalueratio(value, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hangeTopicNametwodatasheet = (value, index) => {
|
|
|
|
|
// console.log("2e.target.value", value)
|
|
|
|
|
if (value === "" || value === undefined) {
|
|
|
|
@ -1152,7 +1249,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字 //判断正整数 /^[1-9]+[0-9]*]*$/
|
|
|
|
|
var nubmer = value;
|
|
|
|
|
if (!re.test(nubmer)) {
|
|
|
|
|
this.props.showNotification(`请输入数字`);
|
|
|
|
|
this.props.showNotification(`请输入正确的数字`);
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
// datasheet: 0
|
|
|
|
@ -1179,6 +1276,12 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
challenge_settings: challenge_settings
|
|
|
|
|
})
|
|
|
|
|
var latedeductiontwos = 0;
|
|
|
|
|
//效率分是否勾选 勾选获取效分
|
|
|
|
|
if (this.state.completionefficiencyscore === true) {
|
|
|
|
|
latedeductiontwos = this.state.latedeductiontwo;
|
|
|
|
|
}
|
|
|
|
|
this.Calculatethetotalscore(latedeductiontwos, challenge_settings);
|
|
|
|
|
// if (nubmer > 100) {
|
|
|
|
|
// message.error("请输入小于100的数");
|
|
|
|
|
// this.setState({
|
|
|
|
@ -1193,7 +1296,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// disabledEndDate = (end_time) => {
|
|
|
|
|
// const publish_time = this.state.publish_time;
|
|
|
|
|
// if (!end_time || !publish_time) {
|
|
|
|
@ -1247,7 +1349,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onChangedata = (field, value, dateString) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
[field]: handleDateString(dateString),
|
|
|
|
@ -1482,8 +1583,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
late_time: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) {
|
|
|
|
|
} else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) {
|
|
|
|
|
this.setState({
|
|
|
|
|
hand__e_tip: "补交时间不能早于截止时间",
|
|
|
|
|
hand_flags: true,
|
|
|
|
@ -1491,8 +1591,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
late_time: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
this.setState({
|
|
|
|
@ -1537,7 +1636,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//立即发布
|
|
|
|
@ -1786,10 +1884,10 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
//均分比例
|
|
|
|
|
try {
|
|
|
|
|
if (this.state.proportion === "均分比例") {
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo);
|
|
|
|
|
this.Equalproportion(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
} else if (this.state.proportion === "经验值比例") {
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo);
|
|
|
|
|
this.Empiricalvalueratio(this.state.latedeductiontwo, this.state.CalculateMax, true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
@ -1854,6 +1952,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
editSettings = (datas) => {
|
|
|
|
|
// console.log("编辑页面");
|
|
|
|
|
// console.log(datas);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if (datas.data.is_end === true) {
|
|
|
|
|
this.setState({
|
|
|
|
@ -1863,7 +1962,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
modalSave: this.cancelBox
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// debugger
|
|
|
|
|
//
|
|
|
|
|
var releasetime = true;
|
|
|
|
|
var deadline = true;
|
|
|
|
|
var endtime = true;
|
|
|
|
@ -1903,13 +2002,14 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ?
|
|
|
|
|
try {
|
|
|
|
|
if (datas.data.shixun_evaluation === 0) {
|
|
|
|
|
this.Equalproportion(datas.data.eff_score);
|
|
|
|
|
this.Equalproportion(datas.data.eff_score, this.state.CalculateMax, false);
|
|
|
|
|
|
|
|
|
|
} else if (datas.data.shixun_evaluation === 1) {
|
|
|
|
|
this.Empiricalvalueratio(datas.data.eff_score);
|
|
|
|
|
this.Empiricalvalueratio(datas.data.eff_score, this.state.CalculateMax, false);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.log("报错editSettings");
|
|
|
|
|
console.log(1);
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
|
@ -2101,6 +2201,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
DownloadMessageval: undefined
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2137,7 +2238,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// console.log(this.state.work_efficiencys);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className=" clearfix " ref='targetElementTrainingjobsetting' style={{margin: "auto", minWidth: "1200px"}}>
|
|
|
|
|
{this.state.showmodel === true ? <ShixunWorkModal
|
|
|
|
@ -2233,7 +2333,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white">
|
|
|
|
|
<div className=" pl20">
|
|
|
|
|
<p className=" clearfix " style={{height: "41px"}}>
|
|
|
|
|
<span className="font-16 fl "style={{color:"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{fontSize:"14px",textAlign:"left"}}></span></span>
|
|
|
|
|
<span className="font-16 fl " style={{color: "#05101A"}}>发布设置 <span className="ml15 color-grey-9"
|
|
|
|
|
style={{
|
|
|
|
|
fontSize: "14px",
|
|
|
|
|
textAlign: "left"
|
|
|
|
|
}}></span></span>
|
|
|
|
|
{
|
|
|
|
|
!flagPageEdit && this.props.isAdmin() === true ?
|
|
|
|
|
<a className="fr white-btn edu-blueline-btn mr10 mr20 lineh-24" onClick={this.editSetting}>
|
|
|
|
@ -2250,7 +2354,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<Checkbox className="ml15 font-16" style={{color: "#666666"}} onChange={this.onChange}
|
|
|
|
|
checked={this.state.unifiedsetting}
|
|
|
|
|
defaultChecked={this.state.boolUnite} disabled={!flagPageEdit}>统一设置<span
|
|
|
|
|
className={"font-14 ml15 color-grey-c"} style={{textAlign:"left"}}>(选中则所有分班使用相同的发布设置,否则各个分班单独设置)</span></Checkbox>
|
|
|
|
|
className={"font-14 ml15 color-grey-c"}
|
|
|
|
|
style={{textAlign: "left"}}>(选中则所有分班使用相同的发布设置,否则各个分班单独设置)</span></Checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
: <div></div>
|
|
|
|
|
}
|
|
|
|
@ -2267,7 +2372,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div>
|
|
|
|
|
<div className="clearfix mb5 ml15">
|
|
|
|
|
<span className="font-16 fl mt3" style={{color: "#999999"}}>发布时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={!flagPageEditstwo === true && publish_timebool === true?this.props.isAdmin()?"发布时间已过,则不能修改":"":""}>
|
|
|
|
|
<Tooltip placement="bottom"
|
|
|
|
|
title={!flagPageEditstwo === true && publish_timebool === true ? this.props.isAdmin() ? "发布时间已过,则不能修改" : "" : ""}>
|
|
|
|
|
<div className="fl yskspickers">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
@ -2290,17 +2396,20 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<span className="ml20 fl mt5 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生收到作业的时间)</span>
|
|
|
|
|
<span className="ml20 fl mt5 color-grey-c"
|
|
|
|
|
style={{textAlign: "left", fontSize: "14px"}}>(学生收到作业的时间)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="color-red lineh-25 clearfix" style={{height: "25px"}}>
|
|
|
|
|
{
|
|
|
|
|
unit_p_tip && unit_p_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_p_tip }</span>
|
|
|
|
|
unit_p_tip && unit_p_tip != "" ?
|
|
|
|
|
<span className="fl" style={{marginLeft: "94px"}}>{unit_p_tip}</span>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix ml15 mb5">
|
|
|
|
|
<span className=" fl mt3 font-16" style={{color: "#999999"}}>截止时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?this.props.isAdmin()?"截止时间已过,则不能修改":"": ""}>
|
|
|
|
|
<Tooltip placement="bottom"
|
|
|
|
|
title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true && end_timebool === true ? this.props.isAdmin() ? "截止时间已过,则不能修改" : "" : ""}>
|
|
|
|
|
<div className="fl yskspickers">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
@ -2325,11 +2434,13 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
|
|
<span className=" ml20 fl mt5 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生“按时”提交作品的时间截点)</span>
|
|
|
|
|
<span className=" ml20 fl mt5 color-grey-c"
|
|
|
|
|
style={{textAlign: "left", fontSize: "14px"}}>(学生“按时”提交作品的时间截点)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="color-red lineh-25 clearfix" style={{height: "25px"}}>
|
|
|
|
|
{
|
|
|
|
|
unit_e_tip && unit_e_tip != "" ? <span className="fl" style={{marginLeft: "94px"}}>{ unit_e_tip }</span> :""
|
|
|
|
|
unit_e_tip && unit_e_tip != "" ?
|
|
|
|
|
<span className="fl" style={{marginLeft: "94px"}}>{unit_e_tip}</span> : ""
|
|
|
|
|
}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
@ -2360,11 +2471,13 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
{/*value={this.state.allowreplenishment}*/}
|
|
|
|
|
<div className="ml40 mt10"
|
|
|
|
|
>
|
|
|
|
|
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
|
|
|
|
|
className={"font-14 ml10 color-grey-c"} style={{textAlign:"left",fontSize:"14px"}} >(选中,则允许学生延时提交作品)</span></Checkbox>
|
|
|
|
|
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} className="font-16 "
|
|
|
|
|
onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
|
|
|
|
|
className={"font-14 ml10 color-grey-c"}
|
|
|
|
|
style={{textAlign: "left", fontSize: "14px"}}>(选中,则允许学生延时提交作品)</span></Checkbox>
|
|
|
|
|
|
|
|
|
|
<div className={"h21 mb30 mt20"}>
|
|
|
|
|
<span style={{"width": "100px",color:"#999999"}}>迟交扣分:</span>
|
|
|
|
|
<span className="font-16" style={{"width": "100px", color: "#999999"}}>迟交扣分:</span>
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`.ant-input-number{
|
|
|
|
@ -2380,8 +2493,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
onChange={this.changeTopicName}
|
|
|
|
|
style={{color: "#999999", "height": "40px"}}
|
|
|
|
|
value={this.state.latededuction}/>
|
|
|
|
|
<span className="ml10 color-grey-9" >分</span>
|
|
|
|
|
<span className="ml15 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(延时提交作品时,学生成绩将被扣减的分值)</span>
|
|
|
|
|
<span className="ml10 color-grey-9 font-16">分</span>
|
|
|
|
|
<span className="ml15 color-grey-c"
|
|
|
|
|
style={{textAlign: "left", fontSize: "14px"}}>(延时提交作品时,学生成绩将被扣减的分值)</span>
|
|
|
|
|
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
@ -2399,7 +2513,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
<div className={"h20 mb20 yskspickerss"}>
|
|
|
|
|
<span style={{"width": "100px",color:"#999999"}}>结束时间:</span>
|
|
|
|
|
<span className="font-16" style={{"width": "100px", color: "#999999"}}>结束时间:</span>
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
|
id={"late_timeid"}
|
|
|
|
@ -2418,7 +2532,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
dropdownClassName="hideDisable"
|
|
|
|
|
className={handclass}
|
|
|
|
|
/>
|
|
|
|
|
<span className="ml15 color-grey-c" style={{textAlign:"left",fontSize:"14px"}}>(学生“延时”提交作品的时间截点)</span>
|
|
|
|
|
<span className="ml15 color-grey-c"
|
|
|
|
|
style={{textAlign: "left", fontSize: "14px"}}>(学生“延时”提交作品的时间截点)</span>
|
|
|
|
|
{/*{latetimetype===true?<div className={"color-red "}>结束时间不能小于截止时间</div>:""}*/}
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
@ -2431,7 +2546,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</style>
|
|
|
|
|
<p className="color-red lineh-25 clearfix ml70" style={{height: "25px"}}>
|
|
|
|
|
{
|
|
|
|
|
this.state.hand__e_tip && this.state.hand__e_tip != "" ? <span className="fl">{ this.state.hand__e_tip }</span>:""
|
|
|
|
|
this.state.hand__e_tip && this.state.hand__e_tip != "" ?
|
|
|
|
|
<span className="fl">{this.state.hand__e_tip}</span> : ""
|
|
|
|
|
}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
@ -2444,34 +2560,44 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt20">
|
|
|
|
|
<div className={"font-16 color-dark fl pl20 "} style={{color: "#05101A"}}>评分设置</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="yslflexhomes">
|
|
|
|
|
<div style={{width:"700px"}}>
|
|
|
|
|
<div className="ml20 mt10 mt20">
|
|
|
|
|
<span className="c_grey font-13" style={{color:"#333333"}}> 关卡任务的选择和分值设置 </span><span className="ml15 font-14 color-grey-c" style={{textAlign:"left"}}>(成绩 = 效率分+ 关卡任务总分)</span>
|
|
|
|
|
<div className="yslflexhomesysl1">
|
|
|
|
|
<div className="mt16" style={{marginLeft: "37px"}}>
|
|
|
|
|
<span style={{
|
|
|
|
|
color: "#666666",
|
|
|
|
|
fontWeight: "bold",
|
|
|
|
|
fontSize: "16px",
|
|
|
|
|
}}>总分值:</span>
|
|
|
|
|
<InputNumber min={0} className="ml10 color-grey-9"
|
|
|
|
|
style={{width: "100px", color: "#999999"}}
|
|
|
|
|
disabled={!flagPageEdit}
|
|
|
|
|
step={0.1}
|
|
|
|
|
onChange={this.Totalscorecalculation}
|
|
|
|
|
value={this.state.CalculateMax}
|
|
|
|
|
/>
|
|
|
|
|
<span className="ml10 font-16"
|
|
|
|
|
style={{color: "#999999", height: "28px", marginTop: "9px", lineHeight: "28px"}}>分</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt10" style={{marginLeft:" 40px"}}>
|
|
|
|
|
<Checkbox disabled={!flagPageEdit} className=" font-13 mt10"
|
|
|
|
|
<div className=" mt10 mt20" style={{marginLeft: "82px"}}>
|
|
|
|
|
<span className="c_grey font-16" style={{color: "#333333"}}> 关卡任务的选择和分值设置 </span><span
|
|
|
|
|
className="ml15 font-14" style={{textAlign: "left", color: "#FF8204"}}>(总分值 = 效率分+ 关卡任务总分)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="yslflexhome">
|
|
|
|
|
<div style={{width: "700px"}}>
|
|
|
|
|
<div className="yslflexhomes mt9" style={{width: "802px", lineHeight: "35px", marginLeft: "114px"}}>
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt10">
|
|
|
|
|
<Checkbox disabled={!flagPageEdit} className=" font-16 mt10"
|
|
|
|
|
onChange={this.onChangeeffectiveness}
|
|
|
|
|
checked={this.state.work_efficiencys} style={{color: "#666666"}}>效率分<span
|
|
|
|
|
className={"font-14 color-grey-c font-14 ml15"} style={{textAlign:"left"}}>(选中,则学生最终成绩包含效率分)</span>
|
|
|
|
|
className={"font-14 color-grey-c font-16 ml15"}
|
|
|
|
|
style={{textAlign: "left"}}>(选中,则学生最终成绩包含效率分)</span>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className=" mt20" style={{marginLeft:"75px"}}>
|
|
|
|
|
<span className="c_grey mr10" style={{color:"#999999"}}>分值</span>
|
|
|
|
|
<InputNumber min={0} disabled={!this.state.completionefficiencyscore} max={100} className="ml10 h40 mr10 color-grey-9"
|
|
|
|
|
style={{width: "100px",color:"#999999"}}
|
|
|
|
|
onChange={this.changeTopicNametwo}
|
|
|
|
|
value={this.state.latedeductiontwo}/>
|
|
|
|
|
<span className="ml10" style={{color:"#999999"}}>分</span>
|
|
|
|
|
<span className={"font-14 color-grey-9 "} style={{color:"#999999"}}></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div className="yslflexhomes invite-tipysl" style={{marginTop: "45px"}} >
|
|
|
|
|
<div className="yslflexhomes invite-tipysl">
|
|
|
|
|
<span className="to-back-left"></span>
|
|
|
|
|
<div className="padding20 invitecontent clearfix" style={{backgroundColor: " #FAFAFA"}}>
|
|
|
|
|
<p className="font-12 edu-txt-left">
|
|
|
|
@ -2482,30 +2608,50 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{marginLeft: "138px"}}>
|
|
|
|
|
<span className="c_grey mr10 font-16" style={{color: "#999999"}}>分值</span>
|
|
|
|
|
<InputNumber min={0} disabled={!this.state.completionefficiencyscore}
|
|
|
|
|
className="ml10 h40 mr10 color-grey-9"
|
|
|
|
|
style={{width: "100px", color: "#999999"}}
|
|
|
|
|
onChange={this.changeTopicNametwo}
|
|
|
|
|
step={0.1}
|
|
|
|
|
value={this.state.latedeductiontwo}/>
|
|
|
|
|
<span className="ml10 font-16" style={{color: "#999999"}}>分</span>
|
|
|
|
|
<span className={"font-14 color-grey-9 "} style={{color: "#999999"}}></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="yslflexhome">
|
|
|
|
|
<div>
|
|
|
|
|
<div className="ml20 mt40 mt20" >
|
|
|
|
|
<span className="c_grey font-13" style={{color:"#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
|
|
|
|
|
<Radio style={{ display: 'block',
|
|
|
|
|
<div className="ml20 mt40 mt20" style={{marginLeft: "114px"}}>
|
|
|
|
|
<span className="c_grey font-16" style={{color: "#333333"}}> 关卡任务分值设置规则 </span> <span> <RadioGroup
|
|
|
|
|
className="ml50" onChange={this.onChangeslevelproportion} value={this.state.proportion}>
|
|
|
|
|
<Radio style={{
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
color: "#666666",
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey mt20 "
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey mt20 font-14"
|
|
|
|
|
value={"均分比例"} style={{color: "#666666"}}>均分比例</Radio>
|
|
|
|
|
<Radio style={{ display: 'block',
|
|
|
|
|
<Radio style={{
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
color: "#666666",
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey ml30"
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey ml30 font-14"
|
|
|
|
|
value={"经验值比例"} style={{color: "#666666"}}>难易度</Radio>
|
|
|
|
|
<Radio style={{ display: 'block',
|
|
|
|
|
<Radio style={{
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
color: "#666666",
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey mt20 ml30"
|
|
|
|
|
}} disabled={!flagPageEdit} className="c_grey mt20 ml30 font-14"
|
|
|
|
|
value={"自定义分值"} style={{color: "#666666"}}>自定义分值
|
|
|
|
|
{testscripttiptype === true ?
|
|
|
|
|
<div className="invite-tipysls clearfix " id="test_script_tip" style={{left: '158px',width: '322px',zIndex: '10'}}>
|
|
|
|
|
<div className="invite-tipysls clearfix " id="test_script_tip"
|
|
|
|
|
style={{left: '158px', width: '322px', zIndex: '10'}}>
|
|
|
|
|
<span className="right-black-trangles"></span>
|
|
|
|
|
<div className="padding20 invitecontent clearfix">
|
|
|
|
|
<p className="font-12 edu-txt-left">
|
|
|
|
@ -2527,29 +2673,73 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
: ""}
|
|
|
|
|
</Radio>
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
<a onClick={()=>this.testscripttip(0)}><img style={{marginBottom:"3px",marginLeft:"20px"}} src={getImageUrl("images/educoder/problem.png") }/></a>
|
|
|
|
|
<a onClick={() => this.testscripttip(0)}><img
|
|
|
|
|
style={{marginBottom: "3px", marginLeft: "20px"}}
|
|
|
|
|
src={getImageUrl("images/educoder/problem.png")}/></a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="ml20 mt15 c_grey font-13 " style={{color:"#666666"}}> 关卡名称<span
|
|
|
|
|
className="color-orange-tip font-14 ml10">{task_pass === false ? "(请选中需要学生完成的关卡,该实训不支持跳关学习)" : "(请选中需要学生完成的关卡,该实训支持跳关学习)"}</span>
|
|
|
|
|
<p className="ml20 mt15 c_grey font-16 " style={{color: "#666666", marginLeft: "145px"}}> 关卡名称<span
|
|
|
|
|
className="color-orange-tips font-14 ml10"
|
|
|
|
|
style={{color: "#FF8204"}}>{task_pass === false ? "(请选中需要学生完成的关卡,该实训不支持跳关学习)" : "(请选中需要学生完成的关卡,该实训支持跳关学习)"}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div className="ml40 mt15" >
|
|
|
|
|
<div className=" mt15" style={{marginLeft: "165px"}}>
|
|
|
|
|
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<li>
|
|
|
|
|
<Checkbox className="ml110 mt20 "
|
|
|
|
|
<li className="yslflexhomes" key={index}>
|
|
|
|
|
<Checkbox className="ml110 font-16"
|
|
|
|
|
disabled={!flagPageEditsbox}
|
|
|
|
|
style={{"width": "480px",color:"#05101A"}}
|
|
|
|
|
style={{"width": "200px", color: "#05101A", lineHeight: "48px"}}
|
|
|
|
|
checked={object.checked}
|
|
|
|
|
onChange={(value) => this.onChangedatasheet(value, index)}
|
|
|
|
|
>{object.challenge_name}</Checkbox>
|
|
|
|
|
<InputNumber disabled={!flagPageEdits} className=" c_grey" min={0} max={100}
|
|
|
|
|
style={{"width": "100px", "margin-left": "30px",color:"#666666"}}
|
|
|
|
|
{
|
|
|
|
|
object.checked === false ?
|
|
|
|
|
<div style={{lineHeight: "48px", width: "60px"}}>
|
|
|
|
|
<div className="font-12" style={{
|
|
|
|
|
height: "20px",
|
|
|
|
|
background: "#FF8204",
|
|
|
|
|
color: "#FFFFFF",
|
|
|
|
|
lineHeight: "21px",
|
|
|
|
|
borderRadius: "10px",
|
|
|
|
|
width: "60px",
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
marginTop: "14px",
|
|
|
|
|
}}>可不做
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
|
<div style={{lineHeight: "48px", width: "60px"}}></div>
|
|
|
|
|
}
|
|
|
|
|
<InputNumber disabled={!flagPageEdits} className=" c_grey" min={0}
|
|
|
|
|
style={{"width": "100px", "margin-left": "100px", color: "#666666"}}
|
|
|
|
|
onChange={(value) => this.hangeTopicNametwodatasheet(value, index)}
|
|
|
|
|
step={0.1}
|
|
|
|
|
value={object.challenge_score}
|
|
|
|
|
/>
|
|
|
|
|
<span className="ml10" style={{color:"#999999"}}>分</span>
|
|
|
|
|
<span className="ml40">{object.difficulty}</span>
|
|
|
|
|
|
|
|
|
|
<span className="ml10 font-16" style={{
|
|
|
|
|
color: "#999999",
|
|
|
|
|
height: "28px",
|
|
|
|
|
marginTop: "9px",
|
|
|
|
|
lineHeight: "28px"
|
|
|
|
|
}}>分</span>
|
|
|
|
|
<span className="ml60 font-14" style={{
|
|
|
|
|
width: "50px",
|
|
|
|
|
color: "#FFFFFF",
|
|
|
|
|
height: "28px",
|
|
|
|
|
marginTop: "9px",
|
|
|
|
|
lineHeight: "28px",
|
|
|
|
|
background: "#50DBAD",
|
|
|
|
|
textAlign: "center",
|
|
|
|
|
borderRadius: "5px"
|
|
|
|
|
}}>{object.difficulty}</span>
|
|
|
|
|
<span className="ml10 font-16" style={{
|
|
|
|
|
color: "#666666",
|
|
|
|
|
height: "21px",
|
|
|
|
|
marginTop: "12px",
|
|
|
|
|
lineHeight: "21px",
|
|
|
|
|
textAlign: "center"
|
|
|
|
|
}}>金币奖励数:{object.challenge_exp}</span>
|
|
|
|
|
</li>
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
@ -2558,13 +2748,18 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<p className="ml20 mt40 c_grey font-13 " style={{color:"#333333"}}> 查看参考答案才通过评测的关卡扣分规则<span
|
|
|
|
|
className=" font-14 color-grey-c ml15" style={{textAlign:"left",marginLeft:"40px"}}>(学生通过评测后再查看参考答案,不对成绩产生影响)</span></p>
|
|
|
|
|
|
|
|
|
|
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
|
|
|
|
|
className="color-grey-c font-14 ml15" style={{textAlign:"left"}}>(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值)</span></Radio>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
|
|
|
|
|
<p className="ml20 mt40 c_grey font-16 "
|
|
|
|
|
style={{color: "#333333", marginLeft: "82px"}}> 查看参考答案才通过评测的关卡扣分规则<span
|
|
|
|
|
className=" font-14 color-grey-c ml15"
|
|
|
|
|
style={{textAlign: "left", marginLeft: "40px"}}>(学生通过评测后再查看参考答案,不对成绩产生影响)</span></p>
|
|
|
|
|
|
|
|
|
|
<RadioGroup className="mt20" style={{marginLeft: "114px"}} onChange={this.onChangeslevel}
|
|
|
|
|
value={this.state.level}>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey font-16"
|
|
|
|
|
value={"扣分"}>按查看答案级别扣分<span
|
|
|
|
|
className="color-grey-c font-14 ml15"
|
|
|
|
|
style={{textAlign: "left"}}>(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值)</span></Radio>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15 font-16"
|
|
|
|
|
value={"满分"}>不扣分 </Radio>
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
</div>
|
|
|
|
@ -2574,9 +2769,10 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div className={"font-16 color-dark fl pl20 "} style={{color: "#05101A"}}>公开设置</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className={"mb20 mt15"}>
|
|
|
|
|
<Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork}
|
|
|
|
|
<Checkbox disabled={!flagPageEdit} className="ml40 font-16" onChange={this.onChangepublicwork}
|
|
|
|
|
checked={this.state.publicwork} style={{color: "#666666"}}>公开成绩</Checkbox>
|
|
|
|
|
<span className="font-14 color-grey-c font-14 " style={{textAlign:"left"}}>(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)</span>
|
|
|
|
|
<span className="font-14 color-grey-c font-14 "
|
|
|
|
|
style={{textAlign: "left"}}>(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -2675,5 +2871,7 @@ export default Trainingjobsetting;
|
|
|
|
|
// {...this.props}
|
|
|
|
|
// data={ jobsettingsdata&& jobsettingsdata.data}
|
|
|
|
|
// />}
|
|
|
|
|
{/* </div>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
{/* </div>*/
|
|
|
|
|
}
|
|
|
|
|
{/*</div>*/
|
|
|
|
|
}
|
|
|
|
|