|
|
@ -38,10 +38,10 @@ function renderScore(score, content) {
|
|
|
|
function getScoreTip(score, dom) {
|
|
|
|
function getScoreTip(score, dom) {
|
|
|
|
return score == '--' ? '未评分' : score == '**' ? '未公开' : dom
|
|
|
|
return score == '--' ? '未评分' : score == '**' ? '未公开' : dom
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function buildColumns(that, student_works) {
|
|
|
|
function buildColumns(that, student_works, studentData) {
|
|
|
|
let gotWorkGroup = false;
|
|
|
|
let gotWorkGroup = false;
|
|
|
|
let gotProjectInfo = false;
|
|
|
|
let gotProjectInfo = false;
|
|
|
|
if (student_works) {
|
|
|
|
if (student_works && student_works.length) {
|
|
|
|
student_works.forEach(item => {
|
|
|
|
student_works.forEach(item => {
|
|
|
|
if (item.work_group) {
|
|
|
|
if (item.work_group) {
|
|
|
|
gotWorkGroup = true
|
|
|
|
gotWorkGroup = true
|
|
|
@ -50,6 +50,13 @@ function buildColumns(that, student_works) {
|
|
|
|
gotProjectInfo = true;
|
|
|
|
gotProjectInfo = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
} else if (studentData && studentData[0]) {
|
|
|
|
|
|
|
|
if (studentData[0].work_group) {
|
|
|
|
|
|
|
|
gotWorkGroup = true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (studentData[0].project_info) {
|
|
|
|
|
|
|
|
gotProjectInfo = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let courseId= that.props.match.params.coursesId;
|
|
|
|
let courseId= that.props.match.params.coursesId;
|
|
|
|
let workId= that.props.match.params.workId;
|
|
|
|
let workId= that.props.match.params.workId;
|
|
|
@ -431,6 +438,9 @@ class CommonWorkList extends Component{
|
|
|
|
group_id:arg_course_group,
|
|
|
|
group_id:arg_course_group,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchData = () => {
|
|
|
|
|
|
|
|
this.fetchList()
|
|
|
|
|
|
|
|
}
|
|
|
|
fetchList = () => {
|
|
|
|
fetchList = () => {
|
|
|
|
let workId=this.props.match.params.workId;
|
|
|
|
let workId=this.props.match.params.workId;
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
@ -542,7 +552,7 @@ class CommonWorkList extends Component{
|
|
|
|
late_penalty, absence_penalty, appeal_penalty
|
|
|
|
late_penalty, absence_penalty, appeal_penalty
|
|
|
|
|
|
|
|
|
|
|
|
,end_immediately ,publish_immediately
|
|
|
|
,end_immediately ,publish_immediately
|
|
|
|
, homework_id, visible
|
|
|
|
, homework_id, visible, work_group, project_info
|
|
|
|
} =this.state;
|
|
|
|
} =this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -566,7 +576,6 @@ class CommonWorkList extends Component{
|
|
|
|
return { label: `${item.name}(${item.count})`, value: item.id }
|
|
|
|
return { label: `${item.name}(${item.count})`, value: item.id }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const columns = buildColumns(this, student_works)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
const isStudent = this.props.isStudent()
|
|
|
|
const isStudent = this.props.isStudent()
|
|
|
@ -579,9 +588,11 @@ class CommonWorkList extends Component{
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score,
|
|
|
|
StudentData=isStudent ? [{ id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score,
|
|
|
|
ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count,
|
|
|
|
ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count,
|
|
|
|
late_penalty, absence_penalty, appeal_penalty,
|
|
|
|
late_penalty, absence_penalty, appeal_penalty, project_info,
|
|
|
|
work_group: '', isMine: true }] : []
|
|
|
|
work_group, isMine: true }] : []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const columns = buildColumns(this, student_works, StudentData)
|
|
|
|
|
|
|
|
|
|
|
|
let params = this._getRequestParams()
|
|
|
|
let params = this._getRequestParams()
|
|
|
|
let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`;
|
|
|
|
let exportUrl = `/api/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`;
|
|
|
|
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`;
|
|
|
|
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`;
|
|
|
|