杨树林 5 years ago
commit fb73954804

@ -40,11 +40,15 @@ function getScoreTip(score, dom) {
}
function buildColumns(that, student_works) {
let gotWorkGroup = false;
let gotProjectInfo = false;
if (student_works) {
student_works.forEach(item => {
if (item.work_group) {
gotWorkGroup = true
}
if (item.project_info && item.project_info.name) {
gotProjectInfo = true;
}
})
}
let courseId= that.props.match.params.coursesId;
@ -136,6 +140,22 @@ function buildColumns(that, student_works) {
),
})
}
if (gotProjectInfo) {
columns.push({
width: 72,
title: '关联项目',
dataIndex: 'project_info',
key: 'project_info',
render: (project_info, record) => (
<span>
{project_info && project_info.name && <a href={`/projects/${project_info.id}`} target="_blank"
className="overflowHidden1" style={{color:'#4CACFF', width: '80px', margin: '0 auto', display: 'block'}} title={project_info.name}
>{project_info.name}</a>}
</span>
),
})
}
columns = columns.concat([{
width: 88,
title: '提交状态',
@ -176,7 +196,7 @@ function buildColumns(that, student_works) {
}])
if (!niPingAndIsStudent) {
columns.push({
width: 72,
width: 70,
title: '教师评分',
key: 'teacher_score',
dataIndex: 'teacher_score',
@ -192,7 +212,7 @@ function buildColumns(that, student_works) {
})
columns.push({
width: 72,
width: 70,
title: '助教评分',
key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score',
@ -251,7 +271,7 @@ function buildColumns(that, student_works) {
if (that.state.anonymous_appeal) {
columns.push({
width: 72,
width: 70,
title: '匿评申诉',
key: 'appeal_all_count',
dataIndex: 'appeal_all_count',
@ -271,7 +291,7 @@ function buildColumns(that, student_works) {
}
if (!niPingAndIsStudent) {
columns.push({
width: 72,
width: 70,
title: '最终成绩',
key: 'work_score',
dataIndex: 'work_score',

Loading…
Cancel
Save