From 3bf8e6d80175ad6402d8a4ed374ef45e7ac93074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Mar 2020 21:05:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 271 +----------------- 1 file changed, 7 insertions(+), 264 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 5944e9c6f..1d391bb2c 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1207,262 +1207,7 @@ class Studentshavecompletedthelist extends Component { ) }, ], - columnsystwo: [ - { - title: '序号', - dataIndex: 'number', - key: 'number', - align: 'center', - className: "edu-txt-center font-14", - render: (text, record) => ( - - {record.number === "--" ? - -- - : - {record.number} - } - - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - className: "edu-txt-center font-14", - - render: (text, record) => ( - - {record.name==="--"? - {record.name} - : - {record.name} - } - - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - className: "edu-txt-center font-14", - sorter: true, - sortDirections: sortDirections, - render: (text, record) => ( - - {record.stduynumber === "--" ? - {record.stduynumber} - : - {record.stduynumber} - } - - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - className: "edu-txt-center font-14 maxnamewidth260 ", - width:'260px', - render: (text, record) => ( - - {record.classroom==="--"? - {record.classroom} - : - {record.classroom} - } - - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - className: "edu-txt-center font-14", - render: (text, record) => ( - - {record.submitstate} - - - ) - - }, - { - title: '提交时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className: "edu-txt-center font-14", - sorter: true, - defaultSortOrder: 'descend', - sortDirections: sortDirections, - render: (text, record) => ( - - {record.updatetime==="--"? - -- - : - {record.updatetime} - } - - ), - }, - { - title: '客观题得分', - dataIndex: 'completion', - key: 'completion', - align: 'center', - className: "edu-txt-center font-14", - render: (text, record) => ( - - {record.completion=== "--"? - -- - : - {record.completion} - } - - ) - }, - { - title: '主观题得分', - dataIndex: 'levelscore', - key: 'levelscore', - align: 'center', - className: "edu-txt-center font-14", - render: (text, record) => ( - - {record.levelscore==="--"? - -- - : - {record.levelscore} - } - - ) - }, - { - title: '最终成绩', - dataIndex: 'efficiencyscore', - key: 'efficiencyscore', - align: 'center', - className: "edu-txt-center font-14", - sorter: true, - sortDirections: sortDirections, - render: (text, record) => ( - - {record.efficiencyscore === "--" ? - -
未评分
- }> - -- -
- : - record.commit_method===5? - -
最终调整成绩:{record.efficiencyscore}分
- }> - 90 ? { - color: '#DD1717', - textAlign: "center", - } : parseInt(record.efficiencyscore) <= 90 ? { - color: '#FF6800', - textAlign: "center", - } : parseInt(record.efficiencyscore) <= 60 ? { - color: '#747A7F', - textAlign: "center", - } : { - color: '#747A7F', - textAlign: "center", - }}>{record.efficiencyscore} -
- : - 90 ? { - color: '#DD1717', - textAlign: "center", - } : parseInt(record.efficiencyscore) <= 90 ? { - color: '#FF6800', - textAlign: "center", - } : parseInt(record.efficiencyscore) <= 60 ? { - color: '#747A7F', - textAlign: "center", - } : { - color: '#747A7F', - textAlign: "center", - }}>{record.efficiencyscore} - } -
- ) - }, - { - title: '操作', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - className: "edu-txt-center font-14", - render: (text, record) => ( - - { - record.submitstate === "未提交"||record.commit_method===5? - (//是否助教 - this.props.isAssistant()&&this.props.isAssistant()===true? - (//助教是否有权限 - this.props.assistant_auth&&this.props.assistant_auth===true? - this.Adjustment(record.user_id)}>评阅 - : - (//是否截止 - this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status===3? - this.Adjustment(record.user_id)}>评阅 - : - -- - ) - ) - : - this.Adjustment(record.user_id)}>评阅 - ) - :record.submitstate === "已提交"? - (//是否助教 - this.props.isAssistant()&&this.props.isAssistant()===true? - (//助教是否有权限 - this.props.assistant_auth&&this.props.assistant_auth===true? - {record.finalscore} - : - (//是否截止 - this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status===3? - //是助教就是评阅 - {record.finalscore} - : - -- - ) - ) - : - //是老师就是评阅 - {record.finalscore} - ) - : - -- - } - - ) - }, - ],//columnsystwo 也会被columnsys当作参数接收 + columnsystwo: [],// 也会被columnsys当作参数接收 exercise_status:0, order_type: "desc", exeuserid: 0, @@ -1523,20 +1268,18 @@ class Studentshavecompletedthelist extends Component { } componentDidMount() { - // if(this.props.isAdmin() === true){ - // this.Teacherliststudentlistsy(); - // //console.log("1111111111111111"); - // //console.log(this.props.isAdmin()); - // }else { + //被columnsys当作参数接收 + this.setState({ + columnsystwo:this.state.columnsys, + }) this.Teacherliststudentlist(); - // //console.log("2222222222222"); - // //console.log(this.props.isAdmin()); - // } + try { this.props.triggerRef(this); }catch (e) { } + } componentWillReceiveProps = (nextProps) => {