|
|
|
@ -281,14 +281,39 @@ class Statistics extends Component{
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let shixun_homeworktype=false;
|
|
|
|
|
let common_homeworktype=false;
|
|
|
|
|
let group_homeworktype=false;
|
|
|
|
|
let graduationtype=false;
|
|
|
|
|
let exercisetype=false;
|
|
|
|
|
let course_grouptype=false;
|
|
|
|
|
if(this.props&&this.props.course_modules!=undefined){
|
|
|
|
|
{this.props&&this.props.course_modules.map((item,key)=>{
|
|
|
|
|
if(item.type==="course_group"){
|
|
|
|
|
course_grouptype=true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(item.type==="shixun_homework"){
|
|
|
|
|
shixun_homeworktype=true
|
|
|
|
|
}
|
|
|
|
|
if(item.type==="common_homework"){
|
|
|
|
|
common_homeworktype=true
|
|
|
|
|
}
|
|
|
|
|
if(item.type==="group_homework"){
|
|
|
|
|
group_homeworktype=true
|
|
|
|
|
} if(item.type==="graduation"){
|
|
|
|
|
graduationtype=true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(item.type==="exercise"){
|
|
|
|
|
exercisetype=true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(course_grouptype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "分班") {
|
|
|
|
@ -298,25 +323,66 @@ class Statistics extends Component{
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(shixun_homeworktype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "实训作业") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(common_homeworktype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "普通作业") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(group_homeworktype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "分组作业") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(graduationtype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "毕设任务") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(exercisetype===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "试卷") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// console.log(this.props.isAdmin)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// "user_login": "p94602358",
|
|
|
|
|
// "user_name": "卿前程",
|
|
|
|
|
// "course_group": "电气工程1805", // 分班
|
|
|
|
|
// "common_score": 0.0, // 普通作业
|
|
|
|
|
// "group_score": 0.0, // 分组作业
|
|
|
|
|
// "practice_score": 747.1000061035156, // 实训作业
|
|
|
|
|
// "exercise_score": 0.0, // 试卷成绩
|
|
|
|
|
// "graduation_score": 0.0, // 毕设成绩
|
|
|
|
|
// "total_score": 747.1000061035156, // 总成绩
|
|
|
|
|
// "rank": 1 // 排名,学生身份才传
|
|
|
|
|
const operations = <React.Fragment>
|
|
|
|
|
<Dropdownbox
|
|
|
|
|
{course_grouptype===false||this.state.course_groups.length===0?"":<Dropdownbox
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
postwork_scoredata={(group_idss)=>this.getwork_scoredata(1,group_idss,'desc')}
|
|
|
|
|
/>
|
|
|
|
|
/>}
|
|
|
|
|
<a className={"ml20 ant-btn-link"} onClick={()=>this.derivefun(`/courses/${this.props.match.params.coursesId}/export_member_scores_excel.xlsx`)}>导出</a>
|
|
|
|
|
</React.Fragment>;
|
|
|
|
|
return(
|
|
|
|
|