diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 6c4a20fa9..8b7eb02d6 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -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参考来控制 diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js index be85e5087..d1a5ae1d7 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksnew.js @@ -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() } } }) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index da74baff6..21672ba65 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -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) => ( - + 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) => ( + {record.stduynumber} - ), - }, { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - className:'edu-txt-center', - render: (text, record) => ( - + ), + }, { + title: '分班', + key: 'classroom', + dataIndex: 'classroom', + className:'edu-txt-center', + render: (text, record) => ( + {record.classroom==="未分班"?"--":record.classroom} - ), - }, { - title: '分组', - key: 'grouping', - dataIndex: 'grouping', - className:'edu-txt-center', - render: (text, record) => ( - + ), + }, { + title: '分组', + key: 'grouping', + dataIndex: 'grouping', + className:'edu-txt-center', + render: (text, record) => ( + {record.grouping} ) - },{ - title: '关联项目', - dataIndex: 'associationitems', - key: 'associationitems', - className:'edu-txt-center', - render: (text, record) => ( -
- -
{record.associationitems.name}
-
-
- ), - },{ - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - className:'edu-txt-center', - render: (text, record) => ( - - {record.submitstate} - - ), - }, { - title: '更新时间', - dataIndex: 'turnovertime', - key: 'turnovertime', - className:'edu-txt-center', - render: (text, record) => ( - - - {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} - - - ), - }, { - title: '教师评分', - key: 'teacherrating', - dataIndex: 'teacherrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} - - - ), - }, { - title: '交叉评分', - key: 'crossrating', - dataIndex: 'crossrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} - - - ), - }, { - title: '最终成绩', - key: 'finalscore', - dataIndex: 'finalscore', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} - - - ), - }, { - title: '操作', - key: 'operation', - dataIndex: 'operation', - className:'edu-txt-center', - render: operation => ( -
- {this.props.isAdmin()?operation.map((tag,key) => { - return( -
- 调整学生最终成绩
- 其它历史评分将全部失效:""}> - - {tag.name==="评阅"?tag.status===0?"--": - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> - {tag.status===0?"":tag.name} - - } - -
-
- ) - }):""} - { - this.props.isStudent()? - operation.map((tag,key) => { - return( -
- {tag.status===0?"--":查看} -
- )} - ):"" - } -
- - ), - }]; - - }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) => ( - - {record.stduynumber} - - ), - },{ - title: '分组', - key: 'grouping', - dataIndex: 'grouping', - className:'edu-txt-center', - render: (text, record) => ( - - {record.grouping} - ) - },{ - title: '关联项目', - dataIndex: 'associationitems', - key: 'associationitems', - className:'edu-txt-center', - render: (text, record) => ( -
- -
{record.associationitems.name}
-
-
- ), - },{ - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - className:'edu-txt-center', - render: (text, record) => ( - + },{ + title: '关联项目', + dataIndex: 'associationitems', + key: 'associationitems', + className:'edu-txt-center', + render: (text, record) => ( +
+ +
{record.associationitems.name}
+
+
+ ), + },{ + title: '提交状态', + dataIndex: 'submitstate', + key: 'submitstate', + className:'edu-txt-center', + render: (text, record) => ( + {record.submitstate} - ), - }, { - title: '更新时间', - dataIndex: 'turnovertime', - key: 'turnovertime', - className:'edu-txt-center', - render: (text, record) => ( - + ), + }, { + title: '更新时间', + dataIndex: 'turnovertime', + key: 'turnovertime', + className:'edu-txt-center', + render: (text, record) => ( + {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} - ), - }, { - title: '教师评分', - key: 'teacherrating', - dataIndex: 'teacherrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} - - - ), - }, { - title: '交叉评分', - key: 'crossrating', - dataIndex: 'crossrating', - className:'none edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} - - - ), - }, { - title: '最终成绩', - key: 'finalscore', - dataIndex: 'finalscore', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} - - - ), - }, { - title: '操作', - key: 'operation', - dataIndex: 'operation', - className:'edu-txt-center', - render: operation => ( -
- {this.props.isAdmin()?operation.map((tag,key) => { - return( -
- 调整学生最终成绩
- 其它历史评分将全部失效:""}> - {tag.name==="评阅"?tag.status===0?"--": - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.status===0?"":tag.name} - } - -
- -
- ) - }):""} - { - this.props.isStudent()? - operation.map((tag,key) => { - return( -
- {tag.status===0?"--": - 查看 - } -
- )} - ):"" - } -
- - ), - }]; - - } - - - }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) => ( - - {record.stduynumber} - - ), - }, { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - className:'edu-txt-center', - render: (text, record) => ( - - {record.classroom==="未分班"?"--":record.classroom} - - ), - }, { - title: '分组', - key: 'grouping', - dataIndex: 'grouping', - className:'edu-txt-center', - render: (text, record) => ( - - {record.grouping} - ) - },{ - title: '关联项目', - dataIndex: 'associationitems', - key: 'associationitems', - className:'edu-txt-center', - render: (text, record) => ( - - ), - },{ - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - className:'edu-txt-center', - render: (text, record) => ( - - {record.submitstate} - - ), - }, { - title: '更新时间', - dataIndex: 'turnovertime', - key: 'turnovertime', - className:'edu-txt-center', - render: (text, record) => ( - - - {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} - - - ), - }, { - title: '教师评分', - key: 'teacherrating', - dataIndex: 'teacherrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} - - - ), - }, { - title: '交叉评分', - key: 'crossrating', - dataIndex: 'crossrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} - - - ), - }, { - title: '最终成绩', - key: 'finalscore', - dataIndex: 'finalscore', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} - - - ), - }, { - title: '操作', - key: 'operation', - dataIndex: 'operation', - className:'edu-txt-center', - render: operation => ( -
- {this.props.isAdmin()?operation.map((tag,key) => { - return( -
- - 调整学生最终成绩
- 其它历史评分将全部失效:""}> - {tag.name==="评阅"?tag.status===0?"--": - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.status===0?"":tag.name} - } -
-
- ) - }):""} - - { - this.props.isStudent()? - operation.map((tag,key) => { - return( -
- {tag.status===0?"--": - 查看 - } -
- )} - ):"" - } -
- ), - }]; - } - 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) => ( - - {record.stduynumber} - - ), - }, { - title: '分组', - key: 'grouping', - dataIndex: 'grouping', - className:'edu-txt-center', - render: (text, record) => ( - - {record.grouping} - ) - },{ - title: '关联项目', - dataIndex: 'associationitems', - key: 'associationitems', - className:'edu-txt-center', - render: (text, record) => ( - - ), - },{ - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - className:'edu-txt-center', - render: (text, record) => ( - - {record.submitstate} - - ), - }, { - title: '更新时间', - dataIndex: 'turnovertime', - key: 'turnovertime', - className:'edu-txt-center', - render: (text, record) => ( - - - {record.turnovertime===""?"--":moment(record.turnovertime).format('YYYY-MM-DD HH:mm:ss')} - - - ), - }, { - title: '教师评分', - key: 'teacherrating', - dataIndex: 'teacherrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} - - - ), - }, { - title: '交叉评分', - key: 'crossrating', - dataIndex: 'crossrating', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.crossrating)>60&&parseInt(record.crossrating)<90?"#FF6800":'#747A7F'}}>{record.crossrating==="--"||record.crossrating==="未批阅"?"--":record.crossrating} - - - ), - }, { - title: '最终成绩', - key: 'finalscore', - dataIndex: 'finalscore', - className:'edu-txt-center', - render: (text, record) => ( - - - 90?'#DD1717':parseInt(record.finalscore)>60&&parseInt(record.finalscore)<90?"#FF6800":'#747A7F'}}>{record.finalscore==="--"?"--":record.finalscore} - - - ), - }, { - title: '操作', - key: 'operation', - dataIndex: 'operation', - className:'edu-txt-center', - render: operation => ( -
- {this.props.isAdmin()?operation.map((tag,key) => { - console.log("1179"); - console.log(key); - console.log(tag); - return( -
- - 调整学生最终成绩
+ ), + }, { + title: '教师评分', + key: 'teacherrating', + dataIndex: 'teacherrating', + className:'edu-txt-center', + render: (text, record) => ( + + + 90?'#DD1717':parseInt(record.teacherrating)>60&&parseInt(record.teacherrating)<90?"#FF6800":'#747A7F'}}>{record.teacherrating==="--"||record.teacherrating==="未批阅"?"--":record.teacherrating} + + + ), + }, { + title: '交叉评分', + key: 'crossrating', + dataIndex: 'crossrating', + className:'edu-txt-center', + render: (text, record) => ( + + + {record.crossrating.cross_comment_num}名老师进行了交叉评阅
+ 有效平均分:{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} +
+
+ ), + }, { + + // 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) => ( + + + {record.final_score.username}{(record.final_score.login)}
+ {record.ultimate_score===true?"":"教师评分:"+record.final_score.teacher_comment_score+"分"}
+ {taskslistdata.cross_comment===true?"":"交叉评分:"+record.final_score.cross_comment_score+"分"}
+ {record.final_score.late_penalty===undefined?"":"迟交扣分:"+record.final_score.late_penalty+"分"}
+ 最终成绩:{record.final_score.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} +
+
+ ), + }, { + title: '操作', + key: 'operation', + dataIndex: 'operation', + className:'edu-txt-center', + render: operation => ( +
+ {this.props.isAdmin()?operation.map((tag,key) => { + return( +
+ 调整学生最终成绩
其它历史评分将全部失效:""}> - {tag.name==="评阅"?tag.status===0?"--": - {tag.name} - - : - this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""} - >{tag.status===0?"":tag.name} - } -
-
- ) - }):""} - - { - this.props.isStudent()? - operation.map((tag,key) => { - return( -
- {tag.status===0?"--": - 查看} -
- )} - ):"" - } -
- ), - }]; - - } - } + {tag.name==="评阅"?tag.status===0?"--": + {tag.name} + + : + this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}> + {tag.status===0?"":tag.name} + + } + +
+
+ ) + }):""} + { + this.props.isStudent()? + operation.map((tag,key) => { + return( +
+ {tag.status===0?"--":查看} +
+ )} + ):"" + } +
+ ), + }]; 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==="关联项目"){