|
|
|
@ -40,6 +40,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
props: props,
|
|
|
|
|
data: [],
|
|
|
|
|
datas: [],
|
|
|
|
|
view_report:false,
|
|
|
|
|
page: 1,
|
|
|
|
|
pages: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
@ -60,7 +61,202 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
"display": "none"
|
|
|
|
|
},
|
|
|
|
|
student_works: [],
|
|
|
|
|
startbtn: false
|
|
|
|
|
startbtn: false,
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
dataIndex: 'number',
|
|
|
|
|
key: 'number',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{record.number === undefined ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}> --</span>
|
|
|
|
|
: record.number === "" ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
: record.number === "--" ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#07111B',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}> {record.number}</span>
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '姓名',
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
key: 'name',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{record.name === undefined ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
record.name === "" ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
record.name === null ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
record.name === "--" ?
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#07111B',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.name}</span>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '学号',
|
|
|
|
|
dataIndex: 'stduynumber',
|
|
|
|
|
key: 'stduynumber',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '分班',
|
|
|
|
|
key: 'classroom',
|
|
|
|
|
dataIndex: 'classroom',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
width:'288px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提交状态',
|
|
|
|
|
dataIndex: 'submitstate',
|
|
|
|
|
key: 'submitstate',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={record.submitstate === "延时提交" ? {
|
|
|
|
|
"color": '#DD1717',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
|
|
"color": '#747A7F',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '更新时间',
|
|
|
|
|
dataIndex: 'updatetime',
|
|
|
|
|
key: 'updatetime',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '完成情况',
|
|
|
|
|
dataIndex: 'completion',
|
|
|
|
|
key: 'completion',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '最终成绩',
|
|
|
|
|
dataIndex: 'levelscore',
|
|
|
|
|
key: 'levelscore',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
record.levelscore && record.levelscore === "--"?
|
|
|
|
|
<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</span>
|
|
|
|
|
:
|
|
|
|
|
<span style={parseInt(record.levelscore) >=90 ? {
|
|
|
|
|
"color": '#DD1717',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
} : parseInt(record.levelscore) <= 60?{
|
|
|
|
|
"color": '#FF6800',
|
|
|
|
|
"text-align": "center",
|
|
|
|
|
}: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</span>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'operating',
|
|
|
|
|
key: 'operating',
|
|
|
|
|
align: "center",
|
|
|
|
|
className:'font-14',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
<span style={{"text-align": "center"}}
|
|
|
|
|
className="color-blue"
|
|
|
|
|
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</span>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
@ -110,11 +306,12 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
work_efficiency: result.data.work_efficiency,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
view_report:result.data.view_report,
|
|
|
|
|
})
|
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
|
this.seacthdata();
|
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
|
} else {
|
|
|
|
|
this.seacthdatas();
|
|
|
|
|
this.seacthdatas(result.data,result.data.student_works);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -164,11 +361,12 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
view_report:result.data.view_report,
|
|
|
|
|
})
|
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
|
this.seacthdata();
|
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
|
} else {
|
|
|
|
|
this.seacthdatas();
|
|
|
|
|
this.seacthdatas(result.data,result.data.student_works);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -187,20 +385,27 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
seacthdatas = () => {
|
|
|
|
|
seacthdatas = (teacherdata,student_works) => {
|
|
|
|
|
let {page, limit} = this.state;
|
|
|
|
|
let datalist = [];
|
|
|
|
|
let datalists = [];
|
|
|
|
|
var styletable = {"display": "none"}
|
|
|
|
|
|
|
|
|
|
// console.log("seacthdata设置数据3")
|
|
|
|
|
this.state.columns.map((item,key)=>{
|
|
|
|
|
if(this.props.isNotMember()===true) {
|
|
|
|
|
if(item.title==="学号"){
|
|
|
|
|
this.state.columns.splice(key,1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
let columns2=this.state.columns;
|
|
|
|
|
|
|
|
|
|
var teacherlist = undefined;
|
|
|
|
|
var teacherlists = undefined;
|
|
|
|
|
if (this.state.teacherdata !== undefined) {
|
|
|
|
|
if (teacherdata !== undefined) {
|
|
|
|
|
// console.log("seacthdata设置数据")
|
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
|
if (this.state.teacherdata.id === undefined) {
|
|
|
|
|
if (teacherdata.id === undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
data: [],
|
|
|
|
|
teacherlist: undefined,
|
|
|
|
@ -209,36 +414,36 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
console.log(this.state.teacherdata)
|
|
|
|
|
if (this.state.teacherdata.id !== undefined || this.state.teacherdata.id !== null || this.state.teacherdata.id !== "") {
|
|
|
|
|
console.log(teacherdata)
|
|
|
|
|
if (teacherdata.id !== undefined || teacherdata.id !== null || teacherdata.id !== "") {
|
|
|
|
|
// console.log("seacthdata设置数据1")
|
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
|
var timedata = moment(this.state.teacherdata.update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
datalist.push({
|
|
|
|
|
myid: this.state.teacherdata.id,
|
|
|
|
|
myid: teacherdata.id,
|
|
|
|
|
number: 1,
|
|
|
|
|
name: this.state.teacherdata.user_name,
|
|
|
|
|
stduynumber: this.state.teacherdata.student_id,
|
|
|
|
|
classroom: this.state.teacherdata.group_name,
|
|
|
|
|
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
name: teacherdata.user_name,
|
|
|
|
|
stduynumber: teacherdata.student_id,
|
|
|
|
|
classroom: teacherdata.group_name,
|
|
|
|
|
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
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,
|
|
|
|
|
completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
|
|
|
|
|
levelscore: teacherdata.final_score,
|
|
|
|
|
efficiencyscore: teacherdata.eff_score,
|
|
|
|
|
finalscore: 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,
|
|
|
|
|
late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
|
|
|
|
|
ultimate_score:teacherdata.ultimate_score,
|
|
|
|
|
user_name: teacherdata.user_name,
|
|
|
|
|
user_login: teacherdata.user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
var teacherlist = { //分页
|
|
|
|
|
total: this.state.teacherdata.student_works.length, //数据总数量
|
|
|
|
|
pageSize: this.state.teacherdata.student_works.length, //一页显示几条
|
|
|
|
|
total: teacherdata.student_works.length, //数据总数量
|
|
|
|
|
pageSize: teacherdata.student_works.length, //一页显示几条
|
|
|
|
|
current: this.state.page,
|
|
|
|
|
}
|
|
|
|
|
styletable = {"display": "block",}
|
|
|
|
@ -252,30 +457,30 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.student_works !== undefined) {
|
|
|
|
|
if (student_works !== undefined) {
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < this.state.student_works.length; i++) {
|
|
|
|
|
for (var i = 0; i <student_works.length; i++) {
|
|
|
|
|
|
|
|
|
|
var timedata = moment(this.state.student_works[i].update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
datalists.push({
|
|
|
|
|
myid: this.state.student_works[i].id,
|
|
|
|
|
myid: student_works[i].id,
|
|
|
|
|
number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
|
|
|
|
|
name: this.state.student_works[i].user_name,
|
|
|
|
|
stduynumber: this.state.student_works[i].student_id,
|
|
|
|
|
classroom: this.state.student_works[i].group_name,
|
|
|
|
|
submitstate: this.state.student_works[i].work_status === 0 ? "未提交" : this.state.student_works[i].work_status === 1 ? "按时提交" : this.state.student_works[i].work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
name: student_works[i].user_name,
|
|
|
|
|
stduynumber: student_works[i].student_id,
|
|
|
|
|
classroom: student_works[i].group_name,
|
|
|
|
|
submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" : student_works[i].work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
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,
|
|
|
|
|
completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0":student_works[i].complete_count,
|
|
|
|
|
levelscore: student_works[i].final_score,
|
|
|
|
|
efficiencyscore: student_works[i].eff_score,
|
|
|
|
|
finalscore: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,
|
|
|
|
|
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
|
|
|
|
|
ultimate_score:student_works[i].ultimate_score,
|
|
|
|
|
user_name: student_works[i].user_name,
|
|
|
|
|
user_login: student_works[i].user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -297,15 +502,25 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
teacherlists: teacherlists,
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
styletable: styletable,
|
|
|
|
|
columns:columns2,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 设置数据
|
|
|
|
|
seacthdata = () => {
|
|
|
|
|
seacthdata = (teacherdata) => {
|
|
|
|
|
let datalist = [];
|
|
|
|
|
if (this.state.teacherdata !== undefined) {
|
|
|
|
|
this.state.columns.map((item,key)=>{
|
|
|
|
|
if(this.props.isNotMember()===true) {
|
|
|
|
|
if(item.title==="学号"){
|
|
|
|
|
this.state.columns.splice(key,1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
let columns2=this.state.columns;
|
|
|
|
|
|
|
|
|
|
if (teacherdata !== undefined) {
|
|
|
|
|
// console.log("seacthdata设置数据")
|
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
|
if (this.state.teacherdata.id === undefined) {
|
|
|
|
|
if (teacherdata.id === undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
data: [],
|
|
|
|
|
teacherlist: undefined,
|
|
|
|
@ -314,35 +529,35 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
|
if (this.state.teacherdata.id !== undefined || this.state.teacherdata.id !== null || this.state.teacherdata.id !== "") {
|
|
|
|
|
if (teacherdata.id !== undefined || teacherdata.id !== null ||teacherdata.id !== "") {
|
|
|
|
|
// console.log("seacthdata设置数据1")
|
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
|
var timedata = moment(this.state.teacherdata.update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
var timedata = moment(teacherdata.update_time).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
datalist.push({
|
|
|
|
|
myid: this.state.teacherdata.id,
|
|
|
|
|
myid: teacherdata.id,
|
|
|
|
|
number: 1,
|
|
|
|
|
name: this.state.teacherdata.user_name,
|
|
|
|
|
stduynumber: this.state.teacherdata.student_id,
|
|
|
|
|
classroom: this.state.teacherdata.group_name,
|
|
|
|
|
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
name: teacherdata.user_name,
|
|
|
|
|
stduynumber: teacherdata.student_id,
|
|
|
|
|
classroom: teacherdata.group_name,
|
|
|
|
|
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
|
// updatetime:"",
|
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
|
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,
|
|
|
|
|
completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
|
|
|
|
|
levelscore: teacherdata.final_score,
|
|
|
|
|
efficiencyscore: teacherdata.eff_score,
|
|
|
|
|
finalscore: 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,
|
|
|
|
|
late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
|
|
|
|
|
ultimate_score:teacherdata.ultimate_score,
|
|
|
|
|
user_name: teacherdata.user_name,
|
|
|
|
|
user_login: teacherdata.user_login,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
var teacherlist = { //分页
|
|
|
|
|
total: this.state.teacherdata.student_works.length, //数据总数量
|
|
|
|
|
pageSize: this.state.teacherdata.student_works.length, //一页显示几条
|
|
|
|
|
total: teacherdata.student_works.length, //数据总数量
|
|
|
|
|
pageSize: teacherdata.student_works.length, //一页显示几条
|
|
|
|
|
current: this.state.page,
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -361,6 +576,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
data: datalist,
|
|
|
|
|
teacherlist: teacherlist,
|
|
|
|
|
loadingstate: false,
|
|
|
|
|
columns:columns2,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 查看学员实训信息
|
|
|
|
@ -494,8 +710,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
end_immediately: result.data.end_immediately,
|
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
|
view_report:result.data.view_report,
|
|
|
|
|
})
|
|
|
|
|
this.seacthdata();
|
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -530,205 +747,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
|
let columns = [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
dataIndex: 'number',
|
|
|
|
|
key: 'number',
|
|
|
|
|
align: "center",
|
|
|
|
|
width: '96px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{record.number === undefined ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}> --</a>
|
|
|
|
|
: record.number === "" ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
: record.number === "--" ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
:
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#07111B',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}> {record.number}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '姓名',
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
key: 'name',
|
|
|
|
|
align: "center",
|
|
|
|
|
width: '147px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{record.name === undefined ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
:
|
|
|
|
|
record.name === "" ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
:
|
|
|
|
|
record.name === null ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
:
|
|
|
|
|
record.name === "--" ?
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>--</a>
|
|
|
|
|
:
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#07111B',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.name}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '学号',
|
|
|
|
|
dataIndex: 'stduynumber',
|
|
|
|
|
key: 'stduynumber',
|
|
|
|
|
align: "center",
|
|
|
|
|
width: '200px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '分班',
|
|
|
|
|
key: 'classroom',
|
|
|
|
|
dataIndex: 'classroom',
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '提交状态',
|
|
|
|
|
dataIndex: 'submitstate',
|
|
|
|
|
key: 'submitstate',
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={record.submitstate === "延时提交" ? {
|
|
|
|
|
"color": '#DD1717',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
|
|
|
|
|
"color": '#747A7F',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</a>
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '更新时间',
|
|
|
|
|
dataIndex: 'updatetime',
|
|
|
|
|
key: 'updatetime',
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={{
|
|
|
|
|
"color": '#9A9A9A',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '完成情况',
|
|
|
|
|
dataIndex: 'completion',
|
|
|
|
|
key: 'completion',
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '最终成绩',
|
|
|
|
|
dataIndex: 'levelscore',
|
|
|
|
|
key: 'levelscore',
|
|
|
|
|
align: "center",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
record.levelscore && record.levelscore === "--"?
|
|
|
|
|
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
|
|
:
|
|
|
|
|
<a style={parseInt(record.levelscore) > 90 ? {
|
|
|
|
|
"color": '#DD1717',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
} : parseInt(record.levelscore) <= 90 ? {
|
|
|
|
|
"color": '#FF6800',
|
|
|
|
|
"text-align": "center",
|
|
|
|
|
"margin-left": "20px"
|
|
|
|
|
} : parseInt(record.levelscore) <= 60 ? {
|
|
|
|
|
"color": '#747A7F',
|
|
|
|
|
"text-align": "center"
|
|
|
|
|
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
|
|
|
|
|
}
|
|
|
|
|
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'operating',
|
|
|
|
|
key: 'operating',
|
|
|
|
|
align: "center",
|
|
|
|
|
width: '96px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
|
|
|
|
|
:
|
|
|
|
|
<a style={{"text-align": "center"}}
|
|
|
|
|
className="color-blue"
|
|
|
|
|
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
// console.log("teacherdatateacherdatateacherdata");
|
|
|
|
|
// console.log(teacherdata);
|
|
|
|
|
// console.log("teacherdata.work_count");
|
|
|
|
|
// console.log(teacherdata&&teacherdata.work_count);
|
|
|
|
|
return (
|
|
|
|
|
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
|
|
|
|
|
// 学生不能查看别人的
|
|
|
|
@ -794,10 +814,10 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
<Link
|
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
|
|
|
|
|
>设置</Link>
|
|
|
|
|
<Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/shixun_work_report`}>
|
|
|
|
|
查看实训报告
|
|
|
|
|
</Link>
|
|
|
|
|
</Link>:""}
|
|
|
|
|
{/*<a className="fr color-blue font-16">查看实训报告</a>*/}
|
|
|
|
|
{
|
|
|
|
|
teacherdata === undefined ? ""
|
|
|
|
@ -925,10 +945,10 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
<Link
|
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
|
|
|
|
|
>设置</Link>
|
|
|
|
|
<Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
{this.state.view_report===true?<Link className="fr color-blue font-16" target={"_blank"}
|
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}>
|
|
|
|
|
查看实训报告
|
|
|
|
|
</Link>
|
|
|
|
|
</Link>:""}
|
|
|
|
|
{
|
|
|
|
|
teacherdata === undefined ? ""
|
|
|
|
|
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
|
|
|
|
@ -981,12 +1001,12 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
<div className="fr color-grey-6 edu-menu-panel">
|
|
|
|
|
<div className="fr edu-menu-panel">
|
|
|
|
|
<ul>
|
|
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
|
|
<a className="font-12 color-grey-6">
|
|
|
|
|
<a className="font-12 ">
|
|
|
|
|
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
|
|
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
|
|
|
|
|
<i className="iconfont icon-xiajiantou ml5 font-12 "></i>
|
|
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
|
|
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
|
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
|
|
|
|
@ -1016,7 +1036,6 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
columns={columns}
|
|
|
|
|
pagination={false}
|
|
|
|
|
loading={loadingstate}
|
|
|
|
|
onChange={this.TablePagination}
|
|
|
|
|
/>}
|
|
|
|
|
</div>
|
|
|
|
|
{
|
|
|
|
|