|
|
|
@ -90,7 +90,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
var data = {
|
|
|
|
|
search: "",
|
|
|
|
|
order: "",
|
|
|
|
|
b_order: "asc",
|
|
|
|
|
b_order: "desc",
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
work_status: "",
|
|
|
|
@ -107,6 +107,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
publish_immediately: result.data.publish_immediately,
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
id: result.data.id,
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
})
|
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
|
this.seacthdata();
|
|
|
|
@ -154,6 +157,13 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
task_status: result.data.task_status,
|
|
|
|
|
course_group_info: result.data.course_group_info,
|
|
|
|
|
student_works: result.data.student_works,
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
jobsettingsdata: result,
|
|
|
|
|
publish_immediately: result.data.publish_immediately,
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
})
|
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
|
this.seacthdata();
|
|
|
|
@ -214,11 +224,15 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0,
|
|
|
|
|
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count,
|
|
|
|
|
levelscore: this.state.teacherdata.final_score,
|
|
|
|
|
efficiencyscore: this.state.teacherdata.eff_score,
|
|
|
|
|
finalscore: this.state.teacherdata.work_score,
|
|
|
|
|
operating: "查看",
|
|
|
|
|
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
|
|
|
|
|
ultimate_score:this.state.teacherdata.ultimate_score,
|
|
|
|
|
user_name: this.state.teacherdata.user_name,
|
|
|
|
|
user_login: this.state.teacherdata.user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
@ -253,11 +267,15 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
completion: this.state.student_works[i].complete_count === 4 ? "4/4" : this.state.student_works[i].complete_count === 3 ? "3/4" : this.state.student_works[i].complete_count === 2 ? "2/4" : this.state.student_works[i].complete_count === 1 ? "1/4" : this.state.student_works[i].complete_count === 0 ? "0" : 0,
|
|
|
|
|
completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count,
|
|
|
|
|
levelscore: this.state.student_works[i].final_score,
|
|
|
|
|
efficiencyscore: this.state.student_works[i].eff_score,
|
|
|
|
|
finalscore: this.state.student_works[i].work_score,
|
|
|
|
|
operating: "查看",
|
|
|
|
|
late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty,
|
|
|
|
|
ultimate_score:this.state.teacherdata.student_works[i].ultimate_score,
|
|
|
|
|
user_name: this.state.teacherdata.student_works[i].user_name,
|
|
|
|
|
user_login: this.state.teacherdata.student_works[i].user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -310,11 +328,15 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0,
|
|
|
|
|
completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count,
|
|
|
|
|
levelscore: this.state.teacherdata.final_score,
|
|
|
|
|
efficiencyscore: this.state.teacherdata.eff_score,
|
|
|
|
|
finalscore: this.state.teacherdata.work_score,
|
|
|
|
|
operating: "查看",
|
|
|
|
|
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
|
|
|
|
|
ultimate_score:this.state.teacherdata.ultimate_score,
|
|
|
|
|
user_name: this.state.teacherdata.user_name,
|
|
|
|
|
user_login: this.state.teacherdata.user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
@ -333,8 +355,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
var teacherlist = undefined;
|
|
|
|
|
}
|
|
|
|
|
console.log("datalistdatalist文件");
|
|
|
|
|
console.log(datalist);
|
|
|
|
|
// console.log("datalistdatalist文件");
|
|
|
|
|
// console.log(datalist);
|
|
|
|
|
this.setState({
|
|
|
|
|
data: datalist,
|
|
|
|
|
teacherlist: teacherlist,
|
|
|
|
@ -361,7 +383,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
// console.log(JSON.stringify(result))
|
|
|
|
|
let datalist = [];
|
|
|
|
|
var game_list = result.data.game_list
|
|
|
|
|
|
|
|
|
|
var boolgalist=true;
|
|
|
|
|
var experience=0;
|
|
|
|
|
for (var i = 0; i < game_list.length; i++) {
|
|
|
|
|
|
|
|
|
|
datalist.push({
|
|
|
|
@ -371,7 +394,11 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
classroom: game_list[i].score,
|
|
|
|
|
complete_status: game_list[i].complete_status,
|
|
|
|
|
})
|
|
|
|
|
experience=game_list[i].score+experience;
|
|
|
|
|
|
|
|
|
|
if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){
|
|
|
|
|
boolgalist=false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// console.log("viewtraining");
|
|
|
|
|
// console.log(datalist);
|
|
|
|
@ -379,7 +406,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
viewtrainingdata: result.data,
|
|
|
|
|
visibles: true,
|
|
|
|
|
game_list: datalist
|
|
|
|
|
game_list: datalist,
|
|
|
|
|
experience:experience,
|
|
|
|
|
boolgalist:boolgalist,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -458,7 +487,13 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
task_status: result.data.task_status,
|
|
|
|
|
course_group_info: result.data.course_group_info,
|
|
|
|
|
student_works: result.data.student_works,
|
|
|
|
|
loadingstate: false
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
jobsettingsdata: result,
|
|
|
|
|
publish_immediately: result.data.publish_immediately,
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
})
|
|
|
|
|
this.seacthdata();
|
|
|
|
|
}
|
|
|
|
@ -495,7 +530,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
|
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
|
let columns = [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
@ -639,10 +674,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.completion === undefined ? "--" : record.completion === "" ? "--" : record.completion}</a>
|
|
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
@ -719,6 +751,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
viewtrainingdata={viewtrainingdata}
|
|
|
|
|
game_list={game_list}
|
|
|
|
|
visible={visibles}
|
|
|
|
|
experience={experience}
|
|
|
|
|
boolgalist={boolgalist}
|
|
|
|
|
Cancel={() => this.cancelModulationModels()}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
@ -851,6 +885,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
viewtrainingdata={viewtrainingdata}
|
|
|
|
|
game_list={game_list}
|
|
|
|
|
visible={visibles}
|
|
|
|
|
experience={experience}
|
|
|
|
|
boolgalist={boolgalist}
|
|
|
|
|
Cancel={() => this.cancelModulationModels()}
|
|
|
|
|
/> : ""
|
|
|
|
|
}
|
|
|
|
@ -925,7 +961,6 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
pagination={false}
|
|
|
|
|
loading={false}
|
|
|
|
|
showHeader={false}
|
|
|
|
|
scroll={{y: 240}}
|
|
|
|
|
/>}
|
|
|
|
|
</div>
|
|
|
|
|
{JSON.stringify(datas) !== "[]" ?
|
|
|
|
|