From 75425d8532678a59fbf74cf718a9a412a5dda447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 20 Jul 2019 23:58:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/Trialapplication.js | 2 +- public/react/src/modules/login/Trialapplicationysl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index c40f14bdc..ebb4b98c2 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -271,7 +271,7 @@ class Trialapplication extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index b65725cef..e2afac010 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -287,7 +287,7 @@ class Trialapplicationysl extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ From 3cf11cdfc80a43ff7e9f5183fb7c0d02465c0b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 00:59:54 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/login/Trialapplication.js | 2 +- .../src/modules/login/Trialapplicationysl.js | 29 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/login/Trialapplication.js b/public/react/src/modules/login/Trialapplication.js index 02116ce7d..1730b17a4 100644 --- a/public/react/src/modules/login/Trialapplication.js +++ b/public/react/src/modules/login/Trialapplication.js @@ -271,7 +271,7 @@ class Trialapplication extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ diff --git a/public/react/src/modules/login/Trialapplicationysl.js b/public/react/src/modules/login/Trialapplicationysl.js index f38804810..ad61b460f 100644 --- a/public/react/src/modules/login/Trialapplicationysl.js +++ b/public/react/src/modules/login/Trialapplicationysl.js @@ -44,24 +44,23 @@ class Trialapplicationysl extends Component { Cancel = () => { // this.props.Cancel() } - componentWillReceiveProps(nextProps) { // console.log("46"); // console.log(nextProps); // console.log(this.props); - // if (nextProps.user != this.props.user) { - // // console.log("50"); - // // console.log(nextProps.user); - // if (nextProps.user !== undefined) { - // // console.log("53"); - // // console.log(nextProps.user); - // this.setState({ - // user_phone_binded: nextProps.user.user_phone_binded, - // }) - // } - // - // - // } + if (nextProps.user != this.props.user) { + // console.log("50"); + // console.log(nextProps.user); + if (nextProps.user !== undefined) { + // console.log("53"); + // console.log(nextProps.user); + this.setState({ + user_phone_binded: nextProps.user.user_phone_binded, + }) + } + + + } } @@ -287,7 +286,7 @@ class Trialapplicationysl extends Component { // console.log(result); // this.onTabChange("1"); if(result !== undefined){ - this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); + // this.props.showNotification(`试用申请已提交,我们将尽快完成审核`); // if (this.state.showTrial === false) { window.location.href = "/"; this.setState({ From 8c242888b301767f5047329364bb4876de636126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 15:37:53 +0800 Subject: [PATCH 3/4] =?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 | 47 +++++++++---------- .../shixunHomework/ShixunHomeworkPage.js | 8 ++-- .../shixunHomework/ShixunStudentWork.js | 26 +++++----- .../shixunHomework/Trainingjobsetting.js | 28 +++++------ .../shixunHomework/Workquestionandanswer.js | 30 ++++++------ 5 files changed, 69 insertions(+), 70 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 98401beca..c38c0aeff 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -912,23 +912,23 @@ class Listofworksstudentone extends Component { console.log(info); } - componentWillReceiveProps(nextProps) { - console.log("+++++++++916"); - console.log(nextProps); - console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo1"); - if(this.props.isAdmin() === true){ - this.tearchar(); - }else{ - this.student(); - } - } - } - - } + // componentWillReceiveProps(nextProps) { + // console.log("+++++++++916"); + // console.log(nextProps); + // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo1"); + // if(this.props.isAdmin() === true){ + // this.tearchar(); + // }else{ + // this.student(); + // } + // } + // } + // + // } componentDidMount() { console.log("componentDidMount"); @@ -1528,8 +1528,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, }) - this.props.Getdataback(result,result.data); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); + this.props.Getdataback(result,result.data); } }).catch((error) => { console.log(error) @@ -1587,8 +1587,8 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count:result.data.challenges_count, }) - this.props.Getdataback(result,result.data); this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,page); + this.props.Getdataback(result,result.data); // } } }).catch((error) => { @@ -1928,9 +1928,8 @@ class Listofworksstudentone extends Component { .then((response) => { if (response.data.status == '0') { this.setState({visible: false}); - this.props.showNotification(`调分成功`); - this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, this.state.page, this.state.limit); + this.props.showNotification(`调分成功`); } }) .catch(function (error) { @@ -1991,8 +1990,6 @@ class Listofworksstudentone extends Component { axios.get(url).then((response) => { if (response.status === 200) { - let starttime = this.props.getNowFormatDates(1); - let endtime = this.props.getNowFormatDates(2); this.setState({ modalname: "立即发布", modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, @@ -2010,6 +2007,8 @@ class Listofworksstudentone extends Component { Saves: this.homeworkstartend, course_groups: response.data.course_groups, }) + let starttime = this.props.getNowFormatDates(1); + let endtime = this.props.getNowFormatDates(2); } }).catch((error) => { console.log(error) @@ -2183,11 +2182,11 @@ class Listofworksstudentone extends Component { let url = "/homework_commons/"+homeworkid+"/update_score.json"; axios.get(url).then((response) => { - this.props.showNotification(`${response.data.message}`); this.setState({ loadingstate: true }) this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); + this.props.showNotification(`${response.data.message}`); }).catch((error) => { console.log(error) }); diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 7aa763f4e..6b3d0e991 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -252,10 +252,10 @@ class ShixunHomeworkPage extends Component { {/*/>*/} - {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index fa549d403..40af640db 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -81,19 +81,19 @@ class ShixunStudentWork extends Component { this.props.triggerRef(this); this.getTrainingjobsettings(); } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo1"); - this.getTrainingjobsettings(); - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo1"); + // this.getTrainingjobsettings(); + // } + // } + // + // } getTrainingjobsettings=()=>{ diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 3809940e2..1d530bfd1 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -142,20 +142,20 @@ class Trainingjobsetting extends Component { } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo4"); - this.getTrainingjobsetting() - - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo4"); + // this.getTrainingjobsetting() + // + // } + // } + // + // } // 获取数据地方 getTrainingjobsetting = () => { diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 46f4835de..385c2d4b8 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -94,21 +94,21 @@ class Workquestionandanswer extends Component { shixuntypes: type[3] }) } - componentWillReceiveProps(nextProps) { - // console.log("+++++++++916"); - // console.log(nextProps); - // console.log(this.props) - // console.log(this.props.isAdmin()); - if (nextProps.code_review != this.props.code_review) { - if (nextProps.code_review !== undefined) { - console.log("diaoyonglwangluo2"); - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - this.Gettitleinformation(homeworkid) - } - } - - } + // componentWillReceiveProps(nextProps) { + // // console.log("+++++++++916"); + // // console.log(nextProps); + // // console.log(this.props) + // // console.log(this.props.isAdmin()); + // if (nextProps.code_review != this.props.code_review) { + // if (nextProps.code_review !== undefined) { + // console.log("diaoyonglwangluo2"); + // var homeworkid = this.props.match.params.homeworkid; + // // console.log(homeworkid) + // this.Gettitleinformation(homeworkid) + // } + // } + // + // } isupdatas = () => { var homeworkid = this.props.match.params.homeworkid; From d28c6e85b725d2cdf0f26f12ff6d94527a063fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sun, 21 Jul 2019 19:15:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 9 - .../courses/shixunHomework/Listofworks.js | 1038 ----------------- .../shixunHomework/Listofworksstudentone.js | 217 ++-- .../shixunHomework/ShixunHomeworkPage.js | 51 +- .../shixunHomework/ShixunStudentWork.js | 3 +- .../shixunHomework/ShixunhomeWorkItem.js | 2 +- .../shixunHomework/Trainingjobsetting.js | 8 +- .../shixunHomework/Workquestionandanswer.js | 3 +- 8 files changed, 122 insertions(+), 1209 deletions(-) delete mode 100644 public/react/src/modules/courses/shixunHomework/Listofworks.js diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index f5e62a134..27424821f 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -89,10 +89,6 @@ const Trainingjobsetting= Loadable({ loading: Loading, }) //实训作业列表教师 -const Listofworks= Loadable({ - loader: () => import('./shixunHomework/Listofworks'), - loading: Loading, -}) // //实训作业列表学生未完成的 // const Studentnotcompleted= Loadable({ @@ -773,11 +769,6 @@ class CoursesIndex extends Component{ } > {/*/!*实训作品列表教师*!/*/} - {/* ()*/} - {/* }*/} - {/*>*/} {/*提交总结*/} ( - {record.number} - - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - className:'font-14', - width:'120px', - render: (text, record) => ( - {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.classroom} - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.submitstate} - - ) - - }, - { - title: '实战耗时', - dataIndex: 'cost_time', - key: 'cost_time', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - - ) - - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', - className:'font-14', - render: (text, record) => ( - - - -
已通过{record.completion}关,共{this.state.challenges_count}关
- }> - {record.completion+"/"+this.state.challenges_count} -
- -
- ) - }, - { - title: '关卡得分', - dataIndex: 'levelscore', - key: 'levelscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.levelscore} - - ) - }, - { - title: '效率分', - dataIndex: 'efficiencyscore', - key: 'efficiencyscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.efficiencyscore&& record.efficiencyscore=== "--"?( - this.state.allow_late&&this.state.allow_late===false? - -
作业截止时,系统根据学生在课堂成员中的效率表现自动评分
- }> - - -- - -
- : - this.state.allow_late&&this.state.allow_late===true? - -
补交结束时,系统根据学生在课堂成员中的效率表现自动评分
- }> - - -- - -
- : - - -- - - ) - : - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} - } - -
- ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.ultimate_score=== true? - -
{record.user_name}{record.user_login}
-
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
- }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
- : - -
{record.user_name}{record.user_login}
-
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
-
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
-
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
- }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
- - } -
- ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - className:'font-14', - render: (text, record) => ( - record.submitstate === "未提交" ? -- : - - this.Viewstudenttraininginformationt(record)}>{record.operating} - - ) - }, - ], - columnss: [ - { - title: '序号', - dataIndex: 'number', - key: 'number', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.number} - - ) - }, - { - title: '姓名', - dataIndex: 'name', - key: 'name', - align: 'center', - className:'font-14', - width:'120px', - render: (text, record) => ( - {record.name} - ) - }, - { - title: '学号', - dataIndex: 'stduynumber', - key: 'stduynumber', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber} - - ), - }, - { - title: '分班', - key: 'classroom', - dataIndex: 'classroom', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.classroom} - ) - }, - { - title: '提交状态', - dataIndex: 'submitstate', - key: 'submitstate', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.submitstate} - - ) - - }, - { - title: '更新时间', - dataIndex: 'updatetime', - key: 'updatetime', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.updatetime} - ), - }, - { - title: '实战耗时', - dataIndex: 'cost_time', - key: 'cost_time', - align: 'center', - className:'font-14', - render: (text, record) => ( - {record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time } - - ) - - }, - { - title: '完成情况', - dataIndex: 'completion', - key: 'completion', - align: 'center', - className:'font-14', - render: (text, record) => ( - - - -
已通过{record.completion}关,共{this.state.challenges_count}关
- }> - {record.completion+"/"+this.state.challenges_count} -
- -
- ) - }, - { - title: '关卡得分', - dataIndex: 'levelscore', - key: 'levelscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.levelscore} - - ) - }, - { - title: '效率分', - dataIndex: 'efficiencyscore', - key: 'efficiencyscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.efficiencyscore&& record.efficiencyscore=== "--"?( - this.state.allow_late&&this.state.allow_late===false? - -
作业截止时,系统根据学生在课堂成员中的效率表现自动评分
- }> - - -- - -
- : - this.state.allow_late&&this.state.allow_late===true? - -
补交结束时,系统根据学生在课堂成员中的效率表现自动评分
- }> - - -- - -
- : - - -- - - ) - : - = 90 ? { - "color": '#DD1717', - "text-align": "center" - } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore} - } - -
- ) - }, - { - title: '最终成绩', - dataIndex: 'finalscore', - key: 'finalscore', - align: 'center', - className:'font-14', - render: (text, record) => ( - - { - record.ultimate_score=== true? - -
{record.user_name}{record.user_login}
-
{record.finalscore === "--"?最终调整成绩:0分 :最终调整成绩:{record.finalscore}分}
- }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
- : - -
{record.user_name}{record.user_login}
-
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
-
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
-
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
- }> - { - record.finalscore&&record.finalscore==="--"? - {record.finalscore} - : - = 90 ? {"color": '#DD1717', "text-align": "center"} : { - "color": '#747A7F', - "text-align": "center" - }}>{record.finalscore} - } -
- - } -
- ) - }, - { - title: '操作', - dataIndex: 'operating', - key: 'operating', - display: 'block', - align: 'center', - className:'font-14', - render: (text, record) => ( - record.submitstate === "未提交" ? -- : - - this.Viewstudenttraininginformationt(record)}>{record.operating} - - ) - }, - ], - - - } - - } - - componentDidMount() { - console.log("Listofworks"); - console.log("componentDidMount"); - this.tearchar(); - - } - - - render() { - // console.log("Listofworks.js000") - - let {columns,computeTimetype, page, boolgalist,limit,experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, orders, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; - // - // console.log(teacherdata&&teacherdata.shixun_identifier) - // console.log(this.props.teacherdata&&this.props.teacherdata.publish_immediately) - // console.log(JSON.stringify(this.props)); - return ( -
- {visible === true ? this.saveModulationModal(value, num)} - /> : ""} - - {this.state.showmodel === true ? this.hideshowmodel()} - updatas={() => this.isupdatas()} - /> : ""} - - - {visibles === true ? -
- - this.cancelModulationModels()} - /> - -
- : "" - } - - {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - /> -
- - -
- - - - {computeTimetype===false?
  • - - 正在执行成绩计算,请稍后刷新页面查看结果 - 温馨提示:执行时间因作品数量而异 - -
  • :""} - - {/*作品状态GraduationTaskssettinglist*/} -
      -
    • - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - - {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?
      - 计算成绩 -
      : -
      - {teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": -
      - 计算成绩 -
      - } -
      } -
      - -
      - this.onSearchKeywordKeyUpt(e)} - onInput={this.inputSearchValuest} - onSearch={this.searchValuest} - > -
      -
    • - -
    • - - 作品状态: - this.notlimiteds()}>不限 - this.funtaskstatust(e, task_status && task_status)} - style={{paddingTop: '4px'}}> - - {task_status === undefined ? "" : task_status.map((item, key) => { - return ( - - {item.name} - ({item.count}) - - - - ) - })} - - {/*请输入姓名或学号搜索*/} - - -
    • - - - {/*分班情况*/} - -
    • - {JSON.stringify(course_group_info) === "[]" ? "" : course_group_info === undefined ? "" : course_group_info.length < 2 ? "" : -
      - 分班情况: - this.notlimitedst()}>不限 - this.funtaskstatustwot(e, course_group_info && course_group_info)} - style={{paddingTop: '4px',width:'1017px'}}> - {course_group_info === undefined ? "" : - course_group_info.map((item, key) => { - return ( - - {item.group_group_name} - ({item.count}) - - - ) - }) - } - -
      } -
    • - -
    - - - - { - JSON.stringify(data) === "[]" ? - -
    -
    -
    - -

    没有数据可以显示!

    -
    -
    - -
    - : - -
    - -
    - {data === undefined ? "" : } - - - } - - - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - -
    - : "" - } - - - - - ) - } -} - -export default Listofworks; - -{/*
    */} -{/*

    */} -{/* {jobsettingsdata === undefined ? "" : jobsettingsdata.data.course_name}*/} -{/* >*/} -{/* {jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}*/} -{/* >*/} -{/* 作业详情*/} -{/*

    */} -{/*
    */} -{/*
    */} -{/*

    */} -{/*{teacherdata === undefined ? "" : teacherdata.homework_name}*/} -{/*

    */} -{/**/} -{/*返回*/} -{/*实训详情*/} - - -{/*
    */} -//
    -//
    -// this.ChangeTab(0)}>作品列表 -// this.ChangeTab(1)}>作业问答 -// {this.props.isAdmin() ? -// this.state.code_review === true ||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"? "" : this.ChangeTab(2)}> -// 代码查重 : ""} -// this.ChangeTab(3)} -// >设置 -// {/*{this.props.isAdmin() ? 导出 : ""}*/} -// -// {this.props.isAdmin()?
  • -// 导出 -// -//
  • :""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.end_immediately === true ? -// 立即截止 -// : "" -// : ""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.publish_immediately === true ? -// 立即发布 -// : "" -// : ""} -// {this.props.isAdmin() ? -// teacherdata && teacherdata.code_review === true ? -// 代码查重 -// : "": ""} -{/*
    */} -{/*
    */} diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index c38c0aeff..3c031367f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -66,7 +66,7 @@ class Listofworksstudentone extends Component { pages: 1, limit: 20, loadingstate: true, - order: "updated_at", + order: "update_time", search: null, day: 0, hour: 0, @@ -96,23 +96,23 @@ class Listofworksstudentone extends Component { {record.number === undefined ? -- : record.number === "" ? -- : record.number === "--" ? -- : {record.number} } @@ -900,6 +900,8 @@ class Listofworksstudentone extends Component { }, ], yslpros:false, + datajs:[], + } // console.log("902"); // console.log("902"); @@ -930,22 +932,34 @@ class Listofworksstudentone extends Component { // // } componentDidMount() { - console.log("componentDidMount"); - - // console.log(this.props.isAdmin()); - if(this.props.isAdmin() === true){ - this.tearchar(); - // console.log("909"); - }else{ - this.student(); - // console.log("911"); - - } + // console.log("componentDidMount "); + // console.log("调用子组件 "); + // console.log(this.props); + // console.log(this.props.isAdmin()) + this.student(); } + isupdatas = () => { + var homeworkid = this.props.match.params.homeworkid; + // this.Gettitleinformation(homeworkid); + this.Getalistofworks(homeworkid); + } + /////////老师操作 + // tearchar=()=>{ + // var homeworkid = this.props.match.params.homeworkid; + // // console.log(homeworkid) + // // this.Gettitleinformation(homeworkid); + // this.Getalistofworkst(homeworkid); + // let query = this.props.location.pathname; + // const type = query.split('/'); + // this.setState({ + // shixuntypes: type[3] + // }) + // this.props.triggerRef(this) + // } student=()=>{ // console.log("914"); // debugger - this.props.triggerRef(this); + var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); let query = this.props.location.pathname; @@ -953,6 +967,7 @@ class Listofworksstudentone extends Component { this.setState({ shixuntypes: type[3] }) + this.props.triggerRef(this); } @@ -977,12 +992,11 @@ class Listofworksstudentone extends Component { course_group: "", } axios.post(urll, data).then((result) => { + console.log("980000000____________________"); + if(result === undefined){ return } - // console.log("951"); - // console.log(result); - // debugger this.setState({ teacherdata: result.data, task_status: result.data.task_status, @@ -996,13 +1010,17 @@ class Listofworksstudentone extends Component { code_review: result.data.code_review, challenges_count: result.data.challenges_count, view_report: result.data.view_report, + allow_late:result.data.allow_late, + loadingstate: false, }) - this.props.Getdataback(result,result.data); + this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); + if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(result.data); } else { this.seacthdatas(result.data, result.data.student_works); } + this.props.Getdataback(result,result.data); }).catch((error) => { console.log(error); @@ -1052,12 +1070,12 @@ class Listofworksstudentone extends Component { challenges_count:result.data.challenges_count, view_report:result.data.view_report, }) - this.props.Getdataback(result,result.data); if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(result.data); } else { this.seacthdatas(result.data,result.data.student_works); } + this.props.Getdataback(result,result.data); } }).catch((error) => { @@ -1152,7 +1170,8 @@ class Listofworksstudentone extends Component { if (student_works !== undefined) { for (var i = 0; i { console.log(error) @@ -1468,77 +1487,6 @@ class Listofworksstudentone extends Component { } - /////////老师操作 - tearchar=()=>{ - this.props.triggerRef(this) - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - // this.Gettitleinformation(homeworkid); - this.Getalistofworkst(homeworkid); - let query = this.props.location.pathname; - const type = query.split('/'); - this.setState({ - shixuntypes: type[3] - }) - } - - isupdatas = () => { - var homeworkid = this.props.match.params.homeworkid; - // this.Gettitleinformation(homeworkid); - this.Getalistofworkst(homeworkid); - } - - // 获取作品列表 - Getalistofworkst = (homeworkid) => { - // console.log("获取作品列表");7009 - // debugger - - let urll = `/homework_commons/${homeworkid}/works_list.json`; - // console.log(homeworkid); - - // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id - // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 - // course_group:分班情况 [232, 231], []:不限(空数组) - var data = { - search: "", - order: this.state.orders, - b_order: "desc", - work_status: "", - course_group: "", - page:1, - limit:20, - } - axios.post(urll, data).then((result) => { - if (result) { - // console.log(url) - // console.log("作品列表6789077") - // console.log(JSON.stringify(result)) - this.setState({ - teacherdata: result.data, - task_status: result.data.task_status, - allow_late:result.data.allow_late, - course_group_info: result.data.course_group_info, - loadingstate: false, - jobsettingsdata: result, - publish_immediately: result.data.publish_immediately, - work_efficiency: result.data.work_efficiency, - end_immediately: result.data.end_immediately, - code_review: result.data.code_review, - challenges_count:result.data.challenges_count, - }) - this.seacthdatat(result.data,result.data.student_works,result.data.work_efficiency,result.data.course_group_info,1); - this.props.Getdataback(result,result.data); - } - }).catch((error) => { - console.log(error) - this.setState({ - loadingstate: false, - }) - }) - } - //开始排序操作 Startsortingt = (ordervlue, checkedValuesine, checkedValuesineinfo, searchtext, page, limit) => { //要提交的作品状态checkedValuesine @@ -1607,14 +1555,19 @@ class Listofworksstudentone extends Component { seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { let {page, limit} = this.state; - let datalist = []; + let datalistjs = []; let columns = this.state.columns; - var columns2=[]; - if (teacherdata !== undefined) { + var columns2js=[]; + // console.log("1614++++++++++++++++++++++="); + // console.log(student_works); + // console.log(teacherdata); + if (student_works !== undefined) { + // console.log("1618____________________"); + // console.log(student_works); // console.log("1588"); for (var i = 0; i < student_works.length; i++) { var timedata = moment(student_works[i].update_time).format('YYYY-MM-DD HH:mm'); - datalist.push({ + datalistjs.push({ myid: student_works[i].id, number: (parseInt(page) - 1) * parseInt(limit) + (i + 1), name: student_works[i].user_name, @@ -1635,8 +1588,6 @@ class Listofworksstudentone extends Component { user_name: student_works[i].user_name, user_login: student_works[i].user_login, }) - // console.log(datalist); - // console.log("1612"); } @@ -1659,7 +1610,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1677,7 +1628,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1691,7 +1642,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } } @@ -1707,7 +1658,7 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } @@ -1723,11 +1674,11 @@ class Listofworksstudentone extends Component { else if(this.props.isNotMember()===true&&item.title==="学号") { }else{ - columns2.push(item); + columns2js.push(item); } } } - columns2=this.state.columnss; + columns2js=this.state.columnss; } } @@ -1737,8 +1688,8 @@ class Listofworksstudentone extends Component { // console.log(datalist); // console.log("1712"); this.setState({ - data: datalist, - columns: columns2, + datajs: datalistjs, + columns: columns2js, loadingstate: false, }) } @@ -2265,18 +2216,19 @@ class Listofworksstudentone extends Component { }) } render() { - let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; + let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state; - // console.log(this.state.data); + // console.log(this.state.student_works); // console.log("841"); // console.log(this.state.columns); - // console.log(data); + // console.log(datajs); // console.log("2202"); // console.log(this.props.isAdmin()); return ( this.props.isAdmin() === true ? + ( { - JSON.stringify(data) === "[]" ? + JSON.stringify(datajs) === "[]" ?
    -

    没有数据可以显示!

    +

    没有数据可以显示.!

    @@ -2558,8 +2510,8 @@ class Listofworksstudentone extends Component { } `}
    - {data === undefined ? "" :
    + ) : + (
    { teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? @@ -2679,8 +2633,8 @@ class Listofworksstudentone extends Component {
    @@ -2694,7 +2648,7 @@ class Listofworksstudentone extends Component { } {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata.left_time.time} + style={{color: '#FF6800'}}>{teacherdata.left_time.time} } @@ -2747,7 +2701,7 @@ class Listofworksstudentone extends Component {
    -

    没有数据可以显示!

    +

    没有数据可以显示,,!

    @@ -2808,8 +2762,8 @@ class Listofworksstudentone extends Component { {JSON.stringify(datas) !== "[]" ?
    @@ -2821,7 +2775,7 @@ class Listofworksstudentone extends Component { {teacherdata.left_time.status}} {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata.left_time.time}} + style={{color: '#FF6800'}}>{teacherdata.left_time.time}}
    - {/*/courses/1309/9373/listofworks*/} + {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} { this.props.isAdmin?自定义分值 {testscripttiptype===true? -
    +

    diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 385c2d4b8..1dc6a10fd 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -84,7 +84,6 @@ class Workquestionandanswer extends Component { componentDidMount() { console.log("Workquestionandanswer"); console.log("componentDidMount"); - this.props.triggerRef(this); var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) this.Gettitleinformation(homeworkid) @@ -93,6 +92,8 @@ class Workquestionandanswer extends Component { this.setState({ shixuntypes: type[3] }) + this.props.triggerRef(this); + } // componentWillReceiveProps(nextProps) { // // console.log("+++++++++916");