@ -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 >
< / R e a c t . F r a g m e n t > ;
return (