From de0836a3d5542cec2c8d698946b12c0ca5dafadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 16 Dec 2019 18:05:59 +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 --- .../shixunHomework/Listofworksstudentone.js | 265 +++++++++++++----- 1 file changed, 196 insertions(+), 69 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index ab75b6c89..435a9ca6e 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -46,6 +46,7 @@ const {Option} = Select; //作品列表(学生) let allow_lates=false; let answer_open_evaluation=false; +// Curcomlevel class Listofworksstudentone extends Component { //unifiedsetting 统一设置 //allowreplenishment 允许补交 @@ -269,7 +270,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: "center", @@ -277,15 +278,17 @@ class Listofworksstudentone extends Component { width: '98px', render: (text, record) => ( - {record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',} + : { + color: '#747A7F', + textAlign: "center", + width: '98px', + }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} ), @@ -310,14 +313,14 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : - {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} + } + >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} } @@ -340,7 +343,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -359,7 +381,9 @@ class Listofworksstudentone extends Component { ), }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -638,7 +662,7 @@ class Listofworksstudentone extends Component { ), }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: "center", @@ -646,15 +670,17 @@ class Listofworksstudentone extends Component { width: '98px', render: (text, record) => ( - {record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',} + : { + color: '#747A7F', + textAlign: "center", + width: '98px', + }}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate} ), @@ -709,7 +735,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: "center", @@ -728,7 +773,9 @@ class Listofworksstudentone extends Component { ), }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -967,19 +1014,21 @@ class Listofworksstudentone extends Component { ) }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: 'center', className: 'font-14', render: (text, record) => ( - {record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'} + : { + color: '#747A7F', + textAlign: "center" + }}>{record.submitstate} ) @@ -1036,7 +1085,26 @@ class Listofworksstudentone extends Component { // ), // }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', @@ -1051,7 +1119,9 @@ class Listofworksstudentone extends Component { ) }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -1094,12 +1164,12 @@ class Listofworksstudentone extends Component { { record.efficiencyscore && record.efficiencyscore === "--" ? ( this.state.allow_late && this.state.allow_late === false ? - + -- : this.state.allow_late && this.state.allow_late === true ? - + -- : @@ -1315,19 +1385,21 @@ class Listofworksstudentone extends Component { ) }, { - title: '提交状态', + title: '作品状态', dataIndex: 'submitstate', key: 'submitstate', align: 'center', className: 'font-14', render: (text, record) => ( - {record.submitstate} + } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"} + : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'} + : { + color: '#747A7F', + textAlign: "center" + }}>{record.submitstate} ) @@ -1360,20 +1432,39 @@ class Listofworksstudentone extends Component { } }> {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : - {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} - + } + >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} + } ) }, { - title: '完成情况', + title: '当前完成关卡', + dataIndex: 'curcomlevel', + key: 'curcomlevel', + align: "center", + className: 'font-14', + width: '99px', + render: (text, record) => ( + + {record.Curcomlevel + "/" + this.state.challenges_count} + + ), + }, + { + title: '截止前完成关卡', dataIndex: 'completion', key: 'completion', align: 'center', @@ -1388,7 +1479,9 @@ class Listofworksstudentone extends Component { ) }, { - title: '关卡得分', + title:关卡得分 + 截止前学员完成的关卡才有成绩
+ }>
, dataIndex: 'levelscore', key: 'levelscore', align: 'center', @@ -1431,12 +1524,12 @@ class Listofworksstudentone extends Component { { record.efficiencyscore && record.efficiencyscore === "--" ? ( this.state.allow_late && this.state.allow_late === false ? - + -- : this.state.allow_late && this.state.allow_late === true ? - + -- : @@ -1977,7 +2070,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1991,6 +2084,7 @@ class Listofworksstudentone extends Component { ultimate_score: teacherdata.ultimate_score, user_name: teacherdata.user_name, user_login: teacherdata.user_login, + Curcomlevel: teacherdata.current_complete_count===undefined||teacherdata.current_complete_count===null||teacherdata.current_complete_count===""?0:teacherdata.current_complete_count, }) // } @@ -2019,7 +2113,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2033,6 +2127,7 @@ class Listofworksstudentone extends Component { ultimate_score: student_works[i].ultimate_score, user_name: student_works[i].user_name, user_login: student_works[i].user_login, + Curcomlevel:student_works[i].current_complete_count===null||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count, }) } @@ -2178,7 +2273,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2192,6 +2287,8 @@ class Listofworksstudentone extends Component { ultimate_score: teacherdata.ultimate_score, user_name: teacherdata.user_name, user_login: teacherdata.user_login, + Curcomlevel: teacherdata.current_complete_count===null|| teacherdata.current_complete_count===undefined|| teacherdata.current_complete_count===""?0: teacherdata.current_complete_count, + }) // } @@ -2537,7 +2634,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2551,6 +2648,7 @@ class Listofworksstudentone extends Component { ultimate_score: student_works[i].ultimate_score, user_name: student_works[i].user_name, user_login: student_works[i].user_login, + Curcomlevel: student_works[i].current_complete_count===undefined||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count, }) } @@ -3356,13 +3454,42 @@ class Listofworksstudentone extends Component { } render() { - let {columns, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; + let {columns,columnss, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; const antIcon = ; let course_is_end = this.props.current_user && this.props.current_user.course_is_end; // console.log("Listofworksstudentone.js"); // console.log(orders); - + let homewrok=false; + if(homework_status && homework_status.length > 0){ + for(var i=0;i tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } `}
@@ -3846,10 +3973,10 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} } - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time} - } + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time} + } @@ -3901,7 +4028,7 @@ class Listofworksstudentone extends Component { height: 58px; } .ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } `}
@@ -4005,7 +4132,7 @@ class Listofworksstudentone extends Component { height: 58px; } .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { - padding: 9px; + padding: 0px; } ` } @@ -4043,9 +4170,9 @@ class Listofworksstudentone extends Component { {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status}} - {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : - {teacherdata.left_time.time}} + {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : + {teacherdata.left_time.time}}