dev_forum
杨树林 5 years ago
parent 85d6322367
commit df6f12a8ab

@ -67,14 +67,13 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: 'center', align: 'center',
width: "84px", className: "edu-txt-center font-14",
className: "edu-txt-center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.number === "--" ? {record.number === "--" ?
<a style={{"color": '#999999', "text-align": "center", "width": "84px",}}>{record.number}</a> <a style={{"color": '#999999', "text-align": "center"}}>{record.number}</a>
: :
<a style={{"color": '#07111B', "text-align": "center", "width": "84px",}}>{record.number}</a> <a style={{"color": '#07111B', "text-align": "center" }}>{record.number}</a>
} }
</span> </span>
@ -85,14 +84,13 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: 'center', align: 'center',
className: "edu-txt-center", className: "edu-txt-center font-14",
width: "110px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.name === "--" ? {record.name === "--" ?
<a style={{"color": '#999999', "text-align": "center", "width": "110px"}}>{record.name}</a> <a style={{"color": '#999999', "text-align": "center" }}>{record.name}</a>
: :
<a style={{"color": '#07111B', "text-align": "center", "width": "110px"}}>{record.name}</a> <a style={{"color": '#07111B', "text-align": "center" }}>{record.name}</a>
} }
</span> </span>
@ -103,27 +101,23 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: 'center', align: 'center',
className: "edu-txt-center", className: "edu-txt-center font-14",
width: "175px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.stduynumber === null ? {record.stduynumber === null ?
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "175px"
}}>--</a> : }}>--</a> :
record.stduynumber === record.stduynumber ===
"" ? "" ?
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "175px"
}}>--</a> : }}>--</a> :
<a style={{ <a style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
, "width": "175px"
}}>{record.stduynumber}</a> }}>{record.stduynumber}</a>
} }
@ -136,26 +130,22 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'classroom', dataIndex: 'classroom',
align: 'center', align: 'center',
className: "edu-txt-center", className: "edu-txt-center",
width: "120px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.classroom === null ? {record.classroom === null ?
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "120px"
}}>--</a> : }}>--</a> :
record.classroom === record.classroom ===
"" ? "" ?
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "120px"
}}>--</a> : }}>--</a> :
<a style={{ <a style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
, "width": "120px"
}}>{record.classroom}</a> }}>{record.classroom}</a>
} }
@ -167,18 +157,15 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: 'center', align: 'center',
width: "124px",
className: "edu-txt-center", className: "edu-txt-center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={record.submitstate === "未提交" ? { <a style={record.submitstate === "未提交" ? {
"color": '#999999', "color": '#999999',
"text-align": "center", "text-align": "center",
"width": "124px",
} : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : { } : record.submitstate === "已提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#29BD8B', "color": '#29BD8B',
"text-align": "center", "text-align": "center",
"width": "124px",
}}>{record.submitstate}</a> }}>{record.submitstate}</a>
</span> </span>
) )
@ -190,13 +177,12 @@ class Studentshavecompletedthelist extends Component {
key: 'updatetime', key: 'updatetime',
align: 'center', align: 'center',
className: "edu-txt-center", className: "edu-txt-center",
width: "236.4px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.updatetime === "--" ? {record.updatetime === "--" ?
<a style={{"color": '#999999', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a> <a style={{"color": '#999999', "text-align": "center" }}>{record.updatetime}</a>
: :
<a style={{"color": '#9A9A9A', "text-align": "center", "width": "236.4px",}}>{record.updatetime}</a> <a style={{"color": '#9A9A9A', "text-align": "center" }}>{record.updatetime}</a>
} }
</span> </span>
), ),
@ -207,14 +193,12 @@ class Studentshavecompletedthelist extends Component {
key: 'completion', key: 'completion',
align: 'center', align: 'center',
className: "edu-txt-center", className: "edu-txt-center",
width: "124px",
render: (text, record) => ( render: (text, record) => (
<span> { <span> {
record.completion === "--" ? record.completion === "--" ?
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "124px"
}}> }}>
{record.completion} {record.completion}
</a> </a>
@ -222,20 +206,16 @@ class Studentshavecompletedthelist extends Component {
<a style={parseInt(record.completion) > 90 ? { <a style={parseInt(record.completion) > 90 ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.completion) <= 90 ? { } : parseInt(record.completion) <= 90 ? {
"color": '#FF6800', "color": '#FF6800',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.completion) <= 60 ? { } : parseInt(record.completion) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : } :
{ {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
, "width": "124px"
}}>{record.completion}</a> }}>{record.completion}</a>
} }
@ -247,7 +227,6 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: 'center', align: 'center',
width: "124px",
className: "edu-txt-center", className: "edu-txt-center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -255,7 +234,6 @@ class Studentshavecompletedthelist extends Component {
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "124px"
}}> }}>
{record.levelscore} {record.levelscore}
</a> </a>
@ -263,15 +241,12 @@ class Studentshavecompletedthelist extends Component {
<a style={parseInt(record.levelscore) > 90 ? { <a style={parseInt(record.levelscore) > 90 ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.levelscore) <= 90 ? { } : parseInt(record.levelscore) <= 90 ? {
"color": '#FF6800', "color": '#FF6800',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.levelscore) <= 60 ? { } : parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a> } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
} }
</span> </span>
@ -282,7 +257,6 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'efficiencyscore', dataIndex: 'efficiencyscore',
key: 'efficiencyscore', key: 'efficiencyscore',
align: 'center', align: 'center',
width: "124px",
className: "edu-txt-center", className: "edu-txt-center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
@ -290,7 +264,6 @@ class Studentshavecompletedthelist extends Component {
<a style={{ <a style={{
"color": '#999999', "color": '#999999',
"text-align": "center" "text-align": "center"
, "width": "124px"
}}> }}>
{record.efficiencyscore} {record.efficiencyscore}
</a> </a>
@ -298,18 +271,15 @@ class Studentshavecompletedthelist extends Component {
<a style={parseInt(record.efficiencyscore) > 90 ? { <a style={parseInt(record.efficiencyscore) > 90 ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.efficiencyscore) <= 90 ? { } : parseInt(record.efficiencyscore) <= 90 ? {
"color": '#FF6800', "color": '#FF6800',
"text-align": "center" "text-align": "center"
, "width": "124px"
} : parseInt(record.efficiencyscore) <= 60 ? { } : parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center", "text-align": "center",
} : { } : {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
, "width": "124px"
}}>{record.efficiencyscore}</a> }}>{record.efficiencyscore}</a>
} }
</span> </span>
@ -1013,6 +983,10 @@ class Studentshavecompletedthelist extends Component {
} }
// console.log("Studentshavecompletedthelist"); // console.log("Studentshavecompletedthelist");
// console.log(props.current_status); // console.log(props.current_status);
// columnsys 老师列表
// columnss 学生只能看自己的 未截止页面
// columnstwo 截止显示自己的
// columns 截止后显示其他学生
} }
paginationonChange = (pageNumber) => { paginationonChange = (pageNumber) => {
@ -4715,8 +4689,9 @@ class Studentshavecompletedthelist extends Component {
( (
<div style={{ <div style={{
"margin": "0 auto", "margin": "0 auto",
" min-width": " 1250px", " min-width": " 1200px",
}}> }}>
{/*老师*/}
<div className="edu-back-white"> <div className="edu-back-white">
<ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}> <ul className="clearfix" style={{padding: '10px 30px 10px 30px'}}>

@ -159,7 +159,7 @@ class Testpapersettinghomepage extends Component{
return( return(
<div className="newMain clearfix "> <div className="newMain clearfix ">
<div className={"educontent mb20"} style={{width:"1250px"}}> <div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}
{this.state.Modalstype===true?<Modals {this.state.Modalstype===true?<Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -177,7 +177,7 @@ class Testpapersettinghomepage extends Component{
callback={this.callback} callback={this.callback}
/>:""} />:""}
<div className="educontent mb20" style={{width:"1250px"}}> <div className="educontent mb20" style={{width:"1200px"}}>
<p className="clearfix mb20 mt10"> <p className="clearfix mb20 mt10">
<ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn> <ActionBtn className=" btn colorgrey fl hovercolorblue " to={`/courses/${this.props.match.params.coursesId}/students}`}>{this.props.coursedata.name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
@ -195,7 +195,7 @@ class Testpapersettinghomepage extends Component{
`} `}
</style> </style>
<div className="educontent" style={{width:"1250px"}}> <div className="educontent" style={{width:"1200px"}}>
<p className=" fl color-black summaryname "> <p className=" fl color-black summaryname ">
{Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name} {Commonheadofthetestpaper === undefined?"":Commonheadofthetestpaper.exercise_name}
</p> </p>

@ -112,9 +112,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 +166,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,7 +187,7 @@ 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 = [];
@ -197,10 +197,10 @@ class Listofworksstudentone extends Component {
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 +209,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 +252,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,
}) })
} }
@ -300,12 +300,12 @@ class Listofworksstudentone extends Component {
}) })
} }
// 设置数据 // 设置数据
seacthdata = () => { seacthdata = (teacherdata) => {
let datalist = []; let datalist = [];
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,
@ -314,35 +314,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 {
@ -495,7 +495,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)
@ -537,31 +537,30 @@ class Listofworksstudentone extends Component {
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: "center", align: "center",
width: '96px', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.number === undefined ? {record.number === undefined ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}> --</a> }}> --</span>
: record.number === "" ? : record.number === "" ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: record.number === "--" ? : record.number === "--" ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: :
<a style={{ <span style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
}}> {record.number}</a> }}> {record.number}</span>
} }
</span> </span>
), ),
}, },
@ -570,37 +569,37 @@ class Listofworksstudentone extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: "center", align: "center",
width: '147px', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.name === undefined ? {record.name === undefined ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: :
record.name === "" ? record.name === "" ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: :
record.name === null ? record.name === null ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: :
record.name === "--" ? record.name === "--" ?
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>--</a> }}>--</span>
: :
<a style={{ <span style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
}}>{record.name}</a> }}>{record.name}</span>
} }
</span> </span>
@ -611,13 +610,13 @@ class Listofworksstudentone extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
width: '200px', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a> }}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</span>
</span> </span>
), ),
}, },
@ -626,12 +625,14 @@ class Listofworksstudentone extends Component {
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
className:'font-14',
width:'288px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</a> }}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
</span> </span>
), ),
}, },
@ -640,15 +641,16 @@ class Listofworksstudentone extends Component {
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: "center", align: "center",
className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={record.submitstate === "延时提交" ? { <span style={record.submitstate === "延时提交" ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : { } : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</a> }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span> </span>
), ),
@ -658,12 +660,13 @@ class Listofworksstudentone extends Component {
dataIndex: 'updatetime', dataIndex: 'updatetime',
key: 'updatetime', key: 'updatetime',
align: "center", align: "center",
className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{ <span style={{
"color": '#9A9A9A', "color": '#9A9A9A',
"text-align": "center" "text-align": "center"
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</a> }}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</span>
</span> </span>
), ),
}, },
@ -672,9 +675,10 @@ class Listofworksstudentone extends Component {
dataIndex: 'completion', dataIndex: 'completion',
key: 'completion', key: 'completion',
align: "center", align: "center",
className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a> <span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
</span> </span>
), ),
}, },
@ -683,23 +687,20 @@ class Listofworksstudentone extends Component {
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: "center", align: "center",
className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{ {
record.levelscore && record.levelscore === "--"? record.levelscore && record.levelscore === "--"?
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</a> <span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</span>
: :
<a style={parseInt(record.levelscore) > 90 ? { <span style={parseInt(record.levelscore) >=90 ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
} : parseInt(record.levelscore) <= 90 ? { } : parseInt(record.levelscore) <= 60?{
"color": '#FF6800', "color": '#FF6800',
"text-align": "center", "text-align": "center",
"margin-left": "20px" }: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</span>
} : parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
} }
</span> </span>
@ -710,25 +711,21 @@ class Listofworksstudentone extends Component {
dataIndex: 'operating', dataIndex: 'operating',
key: 'operating', key: 'operating',
align: "center", align: "center",
width: '96px', className:'font-14',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{ {
record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span> record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
: :
<a style={{"text-align": "center"}} <span style={{"text-align": "center"}}
className="color-blue" className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a> onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</span>
} }
</span> </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) === "[]" ?
// 学生不能查看别人的 // 学生不能查看别人的

Loading…
Cancel
Save