dev_forum
杨树明 6 years ago
parent 6317999c12
commit e790de87e7

@ -18,7 +18,7 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
const debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
const debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
window._debugType = debugType;
export function initAxiosInterceptors(props) {
@ -31,7 +31,7 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080"
//proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -159,7 +159,7 @@ class GraduationTasksnew extends Component {
cancelAttachment = () => {
this.setState({
Modalstype: false,
Modalstopval: '确定要删除这个附件吗?',
Modalstopval: '',
ModalSave: "",
ModalCancel: ""
})
@ -182,6 +182,7 @@ class GraduationTasksnew extends Component {
fileList: newFileList,
};
});
this.cancelAttachment()
}
}
})

@ -103,8 +103,14 @@ class GraduationTaskssettinglist extends Component{
turnovertime:worklists[i].update_time,
associationitems:result.data.have_grouping==false?"": {name:worklists[i].project_info === undefined ?"--": worklists[i].project_info.name,id:worklists[i].project_info.id},
teacherrating: worklists[i].teacher_comment_score,
crossrating: worklists[i].cross_comment_score,
finalscore: worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
crossrating: {cross_comment_score:worklists[i].cross_comment_score,cross_comment_num:worklists[i].cross_comment_num},
finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
teacher_comment_score:worklists[i].teacher_comment_score,
cross_comment_score:worklists[i].cross_comment_score,
late_penalty:worklists[i].late_penalty,
final_score:worklists[i].final_score,
ultimate_score:worklists[i].ultimate_score
},
operation: this.props.isAdmin()?[{name: worklists[i].assign === true ? "分配" : "", id: worklists[i].id,status:worklists[i].status}, {
name: "调分",
id: worklists[i].id,
@ -625,623 +631,192 @@ class GraduationTaskssettinglist extends Component{
course_groups
} =this.state;
let columns;
// console.log("taskslistdata.course_group_count");
// console.log(taskslistdata);
if(taskslistdata&&taskslistdata.have_grouping===true){
if(taskslistdata&&taskslistdata.course_group_count>0){
//分班有显示
columns = [{
title: '序号',
dataIndex: 'number',
key: 'number',
className:'edu-txt-center'
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center'
}, {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => (
<span>
let columns = [{
title: '序号',
dataIndex: 'number',
key: 'number',
className:'edu-txt-center'
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center'
}, {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
</span>
),
}, {
title: '分班',
key: 'classroom',
dataIndex: 'classroom',
className:'edu-txt-center',
render: (text, record) => (
<span>
),
}, {
title: '分班',
key: 'classroom',
dataIndex: 'classroom',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a>
</span>
),
}, {
title: '分组',
key: 'grouping',
dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => (
<span>
),
}, {
title: '分组',
key: 'grouping',
dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#676767'}}>{record.grouping}</a>
</span>)
},{
title: '关联项目',
dataIndex: 'associationitems',
key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => (
<div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
<div className={"projectsdiv"} title={record.associationitems.name}>{record.associationitems.name}</div>
</a>
</div>
),
},{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
</span>
),
}, {
title: '更新时间',
dataIndex: 'turnovertime',
key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')}
</a>
</span>
),
}, {
title: '教师评分',
key: 'teacherrating',
dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip>
</span>
),
}, {
title: '交叉评分',
key: 'crossrating',
dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip>
</span>
),
}, {
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip>
</span>
),
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.status===0?"":tag.name}
</a>
}
</Tooltip>
</div>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div>
)}
):""
}
</div>
),
}];
}else {
//分班没有显示
columns = [{
title: '序号',
dataIndex: 'number',
key: 'number',
className:'edu-txt-center',
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center',
}, {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
</span>
),
},{
title: '分组',
key: 'grouping',
dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#676767'}}>{record.grouping}</a>
</span>)
},{
title: '关联项目',
dataIndex: 'associationitems',
key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => (
<div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
<div className={"projectsdiv"} title={record.associationitems.name}>{record.associationitems.name}</div>
</a>
</div>
),
},{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => (
<span>
},{
title: '关联项目',
dataIndex: 'associationitems',
key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => (
<div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
<div className={"projectsdiv"} title={record.associationitems.name}>{record.associationitems.name}</div>
</a>
</div>
),
},{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
</span>
),
}, {
title: '更新时间',
dataIndex: 'turnovertime',
key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => (
<span>
),
}, {
title: '更新时间',
dataIndex: 'turnovertime',
key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')}
</a>
</span>
),
}, {
title: '教师评分',
key: 'teacherrating',
dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip>
</span>
),
}, {
title: '交叉评分',
key: 'crossrating',
dataIndex: 'crossrating',
className:'none edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip>
</span>
),
}, {
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip>
</span>
),
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
</div>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
查看
</a>}
</div>
)}
):""
}
</div>
),
}];
}
}else{
//有分班
if(taskslistdata&&taskslistdata.course_group_count>0) {
columns = [{
title: '序号',
dataIndex: 'number',
key: 'number',
className:'edu-txt-center',
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center',
}, {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
</span>
),
}, {
title: '分班',
key: 'classroom',
dataIndex: 'classroom',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.classroom==="未分班"?"--":record.classroom}</a>
</span>
),
}, {
title: '分组',
key: 'grouping',
dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#676767'}}>{record.grouping}</a>
</span>)
},{
title: '关联项目',
dataIndex: 'associationitems',
key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => (
<div>
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
<div className={"projectsdiv"} title={record.associationitems.name}>{record.associationitems.name}
</div>
</a>
</div>
),
},{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
</span>
),
}, {
title: '更新时间',
dataIndex: 'turnovertime',
key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')}
</a>
</span>
),
}, {
title: '教师评分',
key: 'teacherrating',
dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip>
</span>
),
}, {
title: '交叉评分',
key: 'crossrating',
dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip>
</span>
),
}, {
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip>
</span>
),
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
</div>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--": <a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
查看
</a>}
</div>
)}
):""
}
</div>
),
}];
}
else {
//没有分班
columns = [{
title: '序号',
dataIndex: 'number',
key: 'number',
className:'edu-txt-center',
}, {
title: '姓名',
dataIndex: 'name',
key: 'name',
className:'edu-txt-center',
}, {
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#9A9A9A'}}>{record.stduynumber}</a>
</span>
),
}, {
title: '分组',
key: 'grouping',
dataIndex: 'grouping',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:'#676767'}}>{record.grouping}</a>
</span>)
},{
title: '关联项目',
dataIndex: 'associationitems',
key: 'associationitems',
className:'edu-txt-center',
render: (text, record) => (
<div className={"projectsdiv"} >
<a style={{color:'#4CACFF'}} href={"/projects/"+record.associationitems.id} target={"_blank"}>
<div title={record.associationitems.name}>
{record.associationitems.name}
</div>
</a>
</div>
),
},{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a style={{color:record.submitstate==="按时提交"?'#29BD8B':record.submitstate==="未提交"?"#9A9A9A":"#DD1717"}}>{record.submitstate}</a>
</span>
),
}, {
title: '更新时间',
dataIndex: 'turnovertime',
key: 'turnovertime',
className:'edu-txt-center',
render: (text, record) => (
<span>
<a href="javascript:;" style={{color:'#989898'}}>
{record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')}
</a>
</span>
),
}, {
title: '教师评分',
key: 'teacherrating',
dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip>
</span>
),
}, {
title: '交叉评分',
key: 'crossrating',
dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.crossrating==="--"||record.crossrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.crossrating)>90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating}</a>
</Tooltip>
</span>
),
}, {
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅":""}>
<a style={{color:parseInt(record.finalscore)>90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore}</a>
</Tooltip>
</span>
),
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
console.log("1179");
console.log(key);
console.log(tag);
return(
<div key={key}>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
),
}, {
title: '教师评分',
key: 'teacherrating',
dataIndex: 'teacherrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.teacherrating==="--"||record.teacherrating==="未批阅"?"未评阅":""}>
<a style={{color:parseInt(record.teacherrating)>90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating}</a>
</Tooltip>
</span>
),
}, {
title: '交叉评分',
key: 'crossrating',
dataIndex: 'crossrating',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.crossrating.cross_comment_score==="--"||record.crossrating.cross_comment_score==="未批阅"?"未评阅":
<pre>
{record.crossrating.cross_comment_num}名老师进行了交叉评阅<br/>
有效平均分{record.crossrating.cross_comment_score}
</pre>}>
<a style={{color:parseInt(record.crossrating.cross_comment_score)>90?'#DD1717':parseInt(record.crossrating.cross_comment_score)>60&&parseInt(record.crossrating.cross_comment_score)<90?"#FF6800":'#747A7F'}}>{record.crossrating.cross_comment_score==="--"||record.crossrating.cross_comment_score==="未批阅"?"--":record.crossrating.cross_comment_score}</a>
</Tooltip>
</span>
),
}, {
// finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
// teacher_comment_score:worklists[i].teacher_comment_score,
// cross_comment_score:worklists[i].cross_comment_score,
// late_penalty:worklists[i].late_penalty
// },
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
className:'edu-txt-center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅": <pre>
{record.final_score.username}{(record.final_score.login)}<br/>
{record.ultimate_score===true?"":"教师评分:"+record.final_score.teacher_comment_score+"分"}<br/>
{taskslistdata.cross_comment===true?"":"交叉评分:"+record.final_score.cross_comment_score+"分"}<br/>
{record.final_score.late_penalty===undefined?"":"迟交扣分:"+record.final_score.late_penalty+"分"}<br/>
最终成绩{record.final_score.work_score}<br/>
</pre>}>
<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
</Tooltip>
</span>
),
}, {
title: '操作',
key: 'operation',
dataIndex: 'operation',
className:'edu-txt-center',
render: operation => (
<div>
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
</div>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
查看</a>}
</div>
)}
):""
}
</div>
),
}];
}
}
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}>
{tag.status===0?"":tag.name}
</a>
}
</Tooltip>
</div>
)
}):""}
{
this.props.isStudent()?
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>}
</div>
)}
):""
}
</div>
),
}];
let courseId=this.props.match.params.coursesId;
let position=this.props.match.params.position;
let category_id=this.props.match.params.category_id;
let task_Id = this.props.match.params.task_Id;
if(taskslistdata&&taskslistdata.course_group_count<=0){
//分班有显示
columns.map((item,key)=>{
if(item.title==="分班"){
columns.splice(key,1)
}
})
}
if(taskslistdata&&taskslistdata.cross_comment===false){
columns.map((item,key)=>{
@ -1249,6 +824,7 @@ class GraduationTaskssettinglist extends Component{
columns.splice(key,1)
}
})
if(taskslistdata&&taskslistdata.have_grouping===false){
columns.map((item,key)=>{
if(item.title==="关联项目"){

Loading…
Cancel
Save