|
|
@ -60,7 +60,202 @@ class Listofworksstudentone extends Component {
|
|
|
|
"display": "none"
|
|
|
|
"display": "none"
|
|
|
|
},
|
|
|
|
},
|
|
|
|
student_works: [],
|
|
|
|
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>
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//
|
|
|
|
//
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -112,9 +307,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
this.seacthdata();
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.seacthdatas();
|
|
|
|
this.seacthdatas(result.data,result.data.student_works);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -166,9 +361,9 @@ class Listofworksstudentone extends Component {
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") {
|
|
|
|
this.seacthdata();
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.seacthdatas();
|
|
|
|
this.seacthdatas(result.data,result.data.student_works);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -187,20 +382,27 @@ class Listofworksstudentone extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
seacthdatas = () => {
|
|
|
|
seacthdatas = (teacherdata,student_works) => {
|
|
|
|
let {page, limit} = this.state;
|
|
|
|
let {page, limit} = this.state;
|
|
|
|
let datalist = [];
|
|
|
|
let datalist = [];
|
|
|
|
let datalists = [];
|
|
|
|
let datalists = [];
|
|
|
|
var styletable = {"display": "none"}
|
|
|
|
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 teacherlist = undefined;
|
|
|
|
var teacherlists = undefined;
|
|
|
|
var teacherlists = undefined;
|
|
|
|
if (this.state.teacherdata !== undefined) {
|
|
|
|
if (teacherdata !== undefined) {
|
|
|
|
// console.log("seacthdata设置数据")
|
|
|
|
// console.log("seacthdata设置数据")
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
if (this.state.teacherdata.id === undefined) {
|
|
|
|
if (teacherdata.id === undefined) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
data: [],
|
|
|
|
data: [],
|
|
|
|
teacherlist: undefined,
|
|
|
|
teacherlist: undefined,
|
|
|
@ -209,36 +411,36 @@ class Listofworksstudentone extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
console.log(this.state.teacherdata)
|
|
|
|
console.log(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("seacthdata设置数据1")
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
// 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({
|
|
|
|
datalist.push({
|
|
|
|
myid: this.state.teacherdata.id,
|
|
|
|
myid: teacherdata.id,
|
|
|
|
number: 1,
|
|
|
|
number: 1,
|
|
|
|
name: this.state.teacherdata.user_name,
|
|
|
|
name: teacherdata.user_name,
|
|
|
|
stduynumber: this.state.teacherdata.student_id,
|
|
|
|
stduynumber: teacherdata.student_id,
|
|
|
|
classroom: this.state.teacherdata.group_name,
|
|
|
|
classroom: teacherdata.group_name,
|
|
|
|
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
// updatetime:"",
|
|
|
|
// updatetime:"",
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
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,
|
|
|
|
completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
|
|
|
|
levelscore: this.state.teacherdata.final_score,
|
|
|
|
levelscore: teacherdata.final_score,
|
|
|
|
efficiencyscore: this.state.teacherdata.eff_score,
|
|
|
|
efficiencyscore: teacherdata.eff_score,
|
|
|
|
finalscore: this.state.teacherdata.work_score,
|
|
|
|
finalscore: teacherdata.work_score,
|
|
|
|
operating: "查看",
|
|
|
|
operating: "查看",
|
|
|
|
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
|
|
|
|
late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
|
|
|
|
ultimate_score:this.state.teacherdata.ultimate_score,
|
|
|
|
ultimate_score:teacherdata.ultimate_score,
|
|
|
|
user_name: this.state.teacherdata.user_name,
|
|
|
|
user_name: teacherdata.user_name,
|
|
|
|
user_login: this.state.teacherdata.user_login,
|
|
|
|
user_login: teacherdata.user_login,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
var teacherlist = { //分页
|
|
|
|
var teacherlist = { //分页
|
|
|
|
total: this.state.teacherdata.student_works.length, //数据总数量
|
|
|
|
total: teacherdata.student_works.length, //数据总数量
|
|
|
|
pageSize: this.state.teacherdata.student_works.length, //一页显示几条
|
|
|
|
pageSize: teacherdata.student_works.length, //一页显示几条
|
|
|
|
current: this.state.page,
|
|
|
|
current: this.state.page,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
styletable = {"display": "block",}
|
|
|
|
styletable = {"display": "block",}
|
|
|
@ -252,30 +454,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({
|
|
|
|
datalists.push({
|
|
|
|
myid: this.state.student_works[i].id,
|
|
|
|
myid: student_works[i].id,
|
|
|
|
number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
|
|
|
|
number: (parseInt(page) - 1) * parseInt(limit) + (i + 1),
|
|
|
|
name: this.state.student_works[i].user_name,
|
|
|
|
name: student_works[i].user_name,
|
|
|
|
stduynumber: this.state.student_works[i].student_id,
|
|
|
|
stduynumber: student_works[i].student_id,
|
|
|
|
classroom: this.state.student_works[i].group_name,
|
|
|
|
classroom: 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 ? "延时提交" : "未提交",
|
|
|
|
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:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
// updatetime:"",
|
|
|
|
// updatetime:"",
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
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,
|
|
|
|
completion: student_works[i].complete_count === null ? "0" :student_works[i].complete_count === undefined ? "0":student_works[i].complete_count,
|
|
|
|
levelscore: this.state.student_works[i].final_score,
|
|
|
|
levelscore: student_works[i].final_score,
|
|
|
|
efficiencyscore: this.state.student_works[i].eff_score,
|
|
|
|
efficiencyscore: student_works[i].eff_score,
|
|
|
|
finalscore: this.state.student_works[i].work_score,
|
|
|
|
finalscore:student_works[i].work_score,
|
|
|
|
operating: "查看",
|
|
|
|
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,
|
|
|
|
late_penalty: student_works[i].late_penalty=== null?"0":student_works[i].late_penalty === undefined?"0":student_works[i].late_penalty,
|
|
|
|
ultimate_score:this.state.teacherdata.student_works[i].ultimate_score,
|
|
|
|
ultimate_score:student_works[i].ultimate_score,
|
|
|
|
user_name: this.state.teacherdata.student_works[i].user_name,
|
|
|
|
user_name: student_works[i].user_name,
|
|
|
|
user_login: this.state.teacherdata.student_works[i].user_login,
|
|
|
|
user_login: student_works[i].user_login,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -297,15 +499,25 @@ class Listofworksstudentone extends Component {
|
|
|
|
teacherlists: teacherlists,
|
|
|
|
teacherlists: teacherlists,
|
|
|
|
loadingstate: false,
|
|
|
|
loadingstate: false,
|
|
|
|
styletable: styletable,
|
|
|
|
styletable: styletable,
|
|
|
|
|
|
|
|
columns:columns2,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 设置数据
|
|
|
|
// 设置数据
|
|
|
|
seacthdata = () => {
|
|
|
|
seacthdata = (teacherdata) => {
|
|
|
|
let datalist = [];
|
|
|
|
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("seacthdata设置数据")
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
// console.log(this.state.teacherdata.id )
|
|
|
|
if (this.state.teacherdata.id === undefined) {
|
|
|
|
if (teacherdata.id === undefined) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
data: [],
|
|
|
|
data: [],
|
|
|
|
teacherlist: undefined,
|
|
|
|
teacherlist: undefined,
|
|
|
@ -314,35 +526,35 @@ class Listofworksstudentone extends Component {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
// 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("seacthdata设置数据1")
|
|
|
|
// console.log(this.state.teacherdata )
|
|
|
|
// 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({
|
|
|
|
datalist.push({
|
|
|
|
myid: this.state.teacherdata.id,
|
|
|
|
myid: teacherdata.id,
|
|
|
|
number: 1,
|
|
|
|
number: 1,
|
|
|
|
name: this.state.teacherdata.user_name,
|
|
|
|
name: teacherdata.user_name,
|
|
|
|
stduynumber: this.state.teacherdata.student_id,
|
|
|
|
stduynumber: teacherdata.student_id,
|
|
|
|
classroom: this.state.teacherdata.group_name,
|
|
|
|
classroom: teacherdata.group_name,
|
|
|
|
submitstate: this.state.teacherdata.work_status === 0 ? "未提交" : this.state.teacherdata.work_status === 1 ? "按时提交" : this.state.teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交",
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
// updatetime:this.state.teacherdata.student_works[i].update_time,
|
|
|
|
// updatetime:"",
|
|
|
|
// updatetime:"",
|
|
|
|
updatetime: timedata === "Invalid date" ? "--" : timedata,
|
|
|
|
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,
|
|
|
|
completion: teacherdata.complete_count === null ? "0" :teacherdata.complete_count === undefined ? "0": teacherdata.complete_count,
|
|
|
|
levelscore: this.state.teacherdata.final_score,
|
|
|
|
levelscore: teacherdata.final_score,
|
|
|
|
efficiencyscore: this.state.teacherdata.eff_score,
|
|
|
|
efficiencyscore: teacherdata.eff_score,
|
|
|
|
finalscore: this.state.teacherdata.work_score,
|
|
|
|
finalscore: teacherdata.work_score,
|
|
|
|
operating: "查看",
|
|
|
|
operating: "查看",
|
|
|
|
late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.late_penalty === undefined?"0":this.state.teacherdata.late_penalty,
|
|
|
|
late_penalty: teacherdata.late_penalty=== null?"0":teacherdata.late_penalty === undefined?"0":teacherdata.late_penalty,
|
|
|
|
ultimate_score:this.state.teacherdata.ultimate_score,
|
|
|
|
ultimate_score:teacherdata.ultimate_score,
|
|
|
|
user_name: this.state.teacherdata.user_name,
|
|
|
|
user_name: teacherdata.user_name,
|
|
|
|
user_login: this.state.teacherdata.user_login,
|
|
|
|
user_login: teacherdata.user_login,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
var teacherlist = { //分页
|
|
|
|
var teacherlist = { //分页
|
|
|
|
total: this.state.teacherdata.student_works.length, //数据总数量
|
|
|
|
total: teacherdata.student_works.length, //数据总数量
|
|
|
|
pageSize: this.state.teacherdata.student_works.length, //一页显示几条
|
|
|
|
pageSize: teacherdata.student_works.length, //一页显示几条
|
|
|
|
current: this.state.page,
|
|
|
|
current: this.state.page,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -361,6 +573,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
data: datalist,
|
|
|
|
data: datalist,
|
|
|
|
teacherlist: teacherlist,
|
|
|
|
teacherlist: teacherlist,
|
|
|
|
loadingstate: false,
|
|
|
|
loadingstate: false,
|
|
|
|
|
|
|
|
columns:columns2,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 查看学员实训信息
|
|
|
|
// 查看学员实训信息
|
|
|
@ -495,7 +708,7 @@ class Listofworksstudentone extends Component {
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
code_review: result.data.code_review,
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
challenges_count:result.data.challenges_count,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.seacthdata();
|
|
|
|
this.seacthdata(result.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
@ -530,205 +743,8 @@ class Listofworksstudentone extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
|
|
|
|
let {visibles, game_list,columns, 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>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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 (
|
|
|
|
return (
|
|
|
|
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
|
|
|
|
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
|
|
|
|
// 学生不能查看别人的
|
|
|
|
// 学生不能查看别人的
|
|
|
@ -981,12 +997,12 @@ class Listofworksstudentone extends Component {
|
|
|
|
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
|
|
|
|
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
|
|
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<div className="fr color-grey-6 edu-menu-panel">
|
|
|
|
<div className="fr edu-menu-panel">
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li className="edu-position edu-position-hidebox">
|
|
|
|
<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>
|
|
|
|
{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">
|
|
|
|
<ul className="edu-position-hide undis mt10">
|
|
|
|
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
|
|
|
|
<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
|
|
|
|
className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
|
|
|
@ -1016,7 +1032,6 @@ class Listofworksstudentone extends Component {
|
|
|
|
columns={columns}
|
|
|
|
columns={columns}
|
|
|
|
pagination={false}
|
|
|
|
pagination={false}
|
|
|
|
loading={loadingstate}
|
|
|
|
loading={loadingstate}
|
|
|
|
onChange={this.TablePagination}
|
|
|
|
|
|
|
|
/>}
|
|
|
|
/>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{
|
|
|
|
{
|
|
|
|