From bda1eb5fdc787b986ed289dc41d28358ef2c6bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 29 Oct 2019 15:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkList.js | 139 ++++++------------ .../exercise/Studentshavecompletedthelist.js | 4 +- .../tasks/GraduationTaskssettinglist.js | 9 +- .../courses/poll/PollDetailTabFirst.js | 19 +-- 4 files changed, 61 insertions(+), 110 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 13535a61b..02ae6bbf3 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -88,7 +88,7 @@ function buildColumns(that, student_works, studentData) { // width: '110px', render: (text, record) => (
5 ? text : ''}> {/* */} - {record.is_leader ? + {record.is_leader ?
{text}
@@ -115,9 +115,9 @@ function buildColumns(that, student_works, studentData) { sorter: true, render: (text, record) => ( - 12 ? text : ''} - style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '98px', display: 'block', overflow: 'hidden' + 12 ? text : ''} + style={{color:'#9A9A9A', 'text-overflow': 'ellipsis', 'white-space': 'nowrap', 'width': '98px', display: 'block', overflow: 'hidden' , margin: '0 auto', cursor: 'default'}} >{record.student_id} @@ -161,9 +161,10 @@ function buildColumns(that, student_works, studentData) { render: (project_info, record) => ( - {project_info && project_info.name && {project_info.name}} ), @@ -201,12 +202,13 @@ function buildColumns(that, student_works, studentData) { dataIndex: 'update_time', key: 'update_time', sorter: true, + defaultSortOrder: 'descend', render: (update_time, record) => ( {update_time ? moment(update_time).format('YYYY-MM-DD HH:mm') : '--'} ), - }]) + }]) if (!niPingAndIsStudent) { columns.push({ width: 70, @@ -215,7 +217,7 @@ function buildColumns(that, student_works, studentData) { dataIndex: 'teacher_score', render: (teacher_score, record) => ( - + { renderScore(teacher_score) } @@ -232,7 +234,7 @@ function buildColumns(that, student_works, studentData) { /** * 2名助教进行了评分 平均分:85.0分 - * + * */ render: (teaching_asistant_score, record) => ( @@ -250,12 +252,11 @@ function buildColumns(that, student_works, studentData) { ), }) } - - - + + if (that.state.anonymous_comment) { - /** - 开启了匿评的才显示此列,悬浮TIP示例: + /** + 开启了匿评的才显示此列,悬浮TIP示例: 3名学生进行了匿评 有效平均分:80.0分 */ @@ -265,7 +266,7 @@ function buildColumns(that, student_works, studentData) { title:
匿评评分
, key: 'student_score', dataIndex: 'student_score', - + render: (student_score, record) => ( ), }) - } - + } + if (that.state.anonymous_appeal) { columns.push({ width: 70, title: '匿评申诉', key: 'appeal_all_count', dataIndex: 'appeal_all_count', - + render: (appeal_all_count, record) => ( - { !!appeal_all_count && + {!!appeal_all_count && {`${record.appeal_deal_count}/${appeal_all_count}`} @@ -317,8 +318,8 @@ function buildColumns(that, student_works, studentData) { getScoreTip(work_score,
{`${record.user_name}(${record.user_login})`}
- { record.ultimate_score ? -
最终调整成绩:{record.work_score}分
: + {record.ultimate_score ? +
最终调整成绩:{record.work_score}分
:
{ record.final_score &&
作业评分:{record.final_score}分
} { record.late_penalty >= 0 &&
迟交扣分:{record.late_penalty}分
} @@ -326,7 +327,7 @@ function buildColumns(that, student_works, studentData) { { record.appeal_penalty >= 0 &&
违规匿评扣分:{record.appeal_penalty}分
}
最终成绩:{record.work_score}分
} -
) +
) }> { renderScore(work_score) } @@ -355,7 +356,7 @@ function buildColumns(that, student_works, studentData) { {/* toWorkDetailPage */} {/* /courses/"+courseId+"/common_homeworks/"+workId+ '/' + record.id +"/appraise */} that.props.toWorkDetailPage(courseId, workId, record.id)} >{ isAdmin ? '评阅': '查看'} - +
), @@ -388,7 +389,7 @@ class CommonWorkList extends Component{ task_status: [], teacher_comment: [], course_group_info: [], - arg_work_status: [], + arg_work_status: [], arg_teacher_comment: [], arg_course_group: [], order: 'update_time', @@ -425,12 +426,12 @@ class CommonWorkList extends Component{ } componentWillUnmount() { - off('commonwork_fetch_all', this.fetchAllListener) + off('commonwork_fetch_all', this.fetchAllListener) } fetchAllListener = () => { this.fetchList() } - + _getRequestParams() { const {search, arg_work_status, arg_teacher_comment, arg_course_group, order, page, arg_member_work, b_order} = this.state return { @@ -474,7 +475,6 @@ class CommonWorkList extends Component{ }) - } teacherCommentOptionChange = (values, isAllChecked) => { this.setState({arg_teacher_comment: isAllChecked ? [] : values, page: 1}, () => { @@ -623,10 +623,10 @@ class CommonWorkList extends Component{ modulationModalVisible, work_statuses, id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score, - ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count, + ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count, late_penalty, absence_penalty, appeal_penalty - ,end_immediately ,publish_immediately + , end_immediately, publish_immediately , homework_id, visible, work_group, project_info, is_leader } =this.state; @@ -706,7 +706,7 @@ class CommonWorkList extends Component{ } const hasData = this.state.homework_status && this.state.homework_status.indexOf("未发布") == -1 // student_works && !!student_works.length && page == 1 && - + // console.log(StudentData) // console.log(student_works) return( @@ -715,7 +715,7 @@ class CommonWorkList extends Component{ ref="checkCodeModal" {...this.props} > - + this.saveModulationModal(value,num)} /> - - - {/* 内容区 */} + + + {/* 内容区 */}