From 90b9a661d64b19cf92084285590e1ed5513eb0f0 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 18:08:54 +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 --- .../shixunHomework/Listofworksstudentone.js | 3 +-- .../shixunHomework/ShixunHomeworkPage.js | 22 ++++++++----------- .../shixunHomework/ShixunStudentWork.js | 7 ++++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 7f9ab561f..a83fec2ee 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1591,7 +1591,6 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; @@ -2640,7 +2639,7 @@ class Listofworksstudentone extends Component { :"") : - (teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "": + (teacherdata&&teacherdata.time_status!==undefined&&teacherdata.time_status=== 0? "": this.props.isNotMember()===false?
计算成绩 diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index aa2e32c49..9e731f105 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -24,7 +24,7 @@ class ShixunHomeworkPage extends Component { super(props); // this.answerMdRef = React.createRef(); this.state = { - tab: 0, + tab: ["0"], jobsettingsdata: undefined, teacherdata: undefined, code_review: false, @@ -141,9 +141,8 @@ class ShixunHomeworkPage extends Component { render() { let {tab, teacherdata, jobsettingsdata} = this.state; + const isAdmin = this.props.isAdmin(); - console.log(tab); - console.log("147147147147147147147"); return (
@@ -188,8 +187,8 @@ class ShixunHomeworkPage extends Component { onClick={(e) => this.ChangeTab(2)}> 代码查重 : ""} {parseInt(tab) === 3? - + } :""} this.ChangeTab(3)} @@ -280,13 +279,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 81b98a854..ed399af98 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -76,9 +76,12 @@ class ShixunStudentWork extends Component { console.log("ShixunStudentWork"); console.log("componentDidMount"); this.props.triggerRef(this); - this.getupdata(); - this.getTrainingjobsetting(); + this.getTrainingjobsettings(); } + getTrainingjobsettings=()=>{ + this.getupdata(); + this.getTrainingjobsetting(); +} // 获取数据地方 getTrainingjobsetting = () => { From 49de0206bd3496680d035b2c4ea97e95e71c0133 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:12:02 +0800 Subject: [PATCH 2/4] content_modified --- public/react/src/modules/page/MainContentContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/MainContentContainer.js b/public/react/src/modules/page/MainContentContainer.js index d24a5cefb..02bda180e 100644 --- a/public/react/src/modules/page/MainContentContainer.js +++ b/public/react/src/modules/page/MainContentContainer.js @@ -675,7 +675,7 @@ class MainContentContainer extends Component { const timeOut = time_limit; // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993 // const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` - const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}` + const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${!!content_modified ? 1 : 0}&sec_key=${sec_key}` // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 From fb076159a995572e1e5982c469b23456d0ee98b5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Sat, 20 Jul 2019 18:12:51 +0800 Subject: [PATCH 3/4] reset_my_game --- public/react/src/modules/tpm/TPMBanner.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 68113f133..866ca3583 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -349,6 +349,7 @@ class TPMBanner extends Component { // }); // } + // reset_my_game hidestartshixunsreplace=(url)=>{ this.setState({ isSpin:true, @@ -358,7 +359,7 @@ class TPMBanner extends Component { // let path="/shixuns/"+response.data.shixun_identifier+"/challenges"; // this.props.history.push(path); message.success('重置成功,正在进入实训!'); - this.startshixunCombat(response.data.shixun_identifier); + this.startshixunCombat(response.data.shixun_identifier, 1); this.setState({ shixunsreplace:false, isSpin:false, @@ -379,7 +380,7 @@ class TPMBanner extends Component { //开始实战按钮 - startshixunCombat=(id)=>{ + startshixunCombat=(id, reset)=>{ let {shixunsDetails} = this.props if( shixunsDetails.shixun_status>1){ this.setState({ @@ -393,7 +394,10 @@ class TPMBanner extends Component { } - let url="/shixuns/"+id+"/shixun_exec.json"; + let url="/shixuns/"+id+"/shixun_exec.json" ; + if (reset) { + url += '?reset=' + reset + } axios.get(url).then((response) => { if(response.status===200){ if(response.data.status===-2){ From db2779c1626fc30c8dc8a17e02b9cdb248a29221 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 18:13:03 +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 --- .../react/src/modules/user/FindPasswordComponent.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 18243ea4a..1617ae52d 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -213,10 +213,7 @@ class LoginRegisterComponent extends Component { }) return } - if (this.state.password !== this.state.passwords==="") { - this.openNotification(`两次输入的密码不一致`); - return - } + else if (this.state.password !==undefined&&this.state.password.length>0&&this.state.password.length<8){ this.setState({ Phonenumberisnotcosmmm:"密码不能少于8位", @@ -239,6 +236,13 @@ class LoginRegisterComponent extends Component { }) return } + if (this.state.password !== this.state.passwords) { + this.setState({ + Phonenumberisnotcosmmm:"两次输入的密码不一致", + Phonenumberisnotcosymmmm:"两次输入的密码不一致", + }) + return + } if (this.state.codes === undefined|| this.state.codes.length ===0 || this.state.codes === "") { this.setState({ Phonenumberisnotcosyzm:"验证码不能为空"