杨树林 6 years ago
commit fb73954804

@ -40,11 +40,15 @@ function getScoreTip(score, dom) {
} }
function buildColumns(that, student_works) { function buildColumns(that, student_works) {
let gotWorkGroup = false; let gotWorkGroup = false;
let gotProjectInfo = false;
if (student_works) { if (student_works) {
student_works.forEach(item => { student_works.forEach(item => {
if (item.work_group) { if (item.work_group) {
gotWorkGroup = true gotWorkGroup = true
} }
if (item.project_info && item.project_info.name) {
gotProjectInfo = true;
}
}) })
} }
let courseId= that.props.match.params.coursesId; 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([{ columns = columns.concat([{
width: 88, width: 88,
title: '提交状态', title: '提交状态',
@ -176,7 +196,7 @@ function buildColumns(that, student_works) {
}]) }])
if (!niPingAndIsStudent) { if (!niPingAndIsStudent) {
columns.push({ columns.push({
width: 72, width: 70,
title: '教师评分', title: '教师评分',
key: 'teacher_score', key: 'teacher_score',
dataIndex: 'teacher_score', dataIndex: 'teacher_score',
@ -192,7 +212,7 @@ function buildColumns(that, student_works) {
}) })
columns.push({ columns.push({
width: 72, width: 70,
title: '助教评分', title: '助教评分',
key: 'teaching_asistant_score', key: 'teaching_asistant_score',
dataIndex: 'teaching_asistant_score', dataIndex: 'teaching_asistant_score',
@ -251,7 +271,7 @@ function buildColumns(that, student_works) {
if (that.state.anonymous_appeal) { if (that.state.anonymous_appeal) {
columns.push({ columns.push({
width: 72, width: 70,
title: '匿评申诉', title: '匿评申诉',
key: 'appeal_all_count', key: 'appeal_all_count',
dataIndex: 'appeal_all_count', dataIndex: 'appeal_all_count',
@ -271,7 +291,7 @@ function buildColumns(that, student_works) {
} }
if (!niPingAndIsStudent) { if (!niPingAndIsStudent) {
columns.push({ columns.push({
width: 72, width: 70,
title: '最终成绩', title: '最终成绩',
key: 'work_score', key: 'work_score',
dataIndex: 'work_score', dataIndex: 'work_score',

Loading…
Cancel
Save