From 1a8f581489982ab9ed4dcd462b1df2a89e5e005c 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, 17 Jul 2019 09:13:47 +0800 Subject: [PATCH 1/8] =?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/Testpapersettinghomepage.js | 92 ++++---- .../courses/shixunHomework/Listofworks.js | 2 + .../shixunHomework/ShixunHomeworkPage.js | 207 +++--------------- 3 files changed, 73 insertions(+), 228 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 81d5a6a27..398a45228 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -110,34 +110,34 @@ class Testpapersettinghomepage extends Component{ groupyslsval:list }) } - experiment=(url)=>{ - - axios.get(url).then((response) => { - console.log(response); - if(response.data.status&&response.data.status===-1){ - - }else if(response.data.status&&response.data.status===-2){ - if(response.data.messages === "100"){ - // 已超出文件导出的上限数量(100 ),建议: - this.setState({ - DownloadType:true, - DownloadMessageval:100 - }) - }else { - //因附件资料超过500M - this.setState({ - DownloadType:true, - DownloadMessageval:500 - }) - } - }else { - window.open("/api"+url, '_blank'); - } - }).catch((error) => { - console.log(error) - }); - - } + // experiment=(url)=>{ + // + // axios.get(url).then((response) => { + // console.log(response); + // if(response.data.status&&response.data.status===-1){ + // + // }else if(response.data.status&&response.data.status===-2){ + // if(response.data.messages === "100"){ + // // 已超出文件导出的上限数量(100 ),建议: + // this.setState({ + // DownloadType:true, + // DownloadMessageval:100 + // }) + // }else { + // //因附件资料超过500M + // this.setState({ + // DownloadType:true, + // DownloadMessageval:500 + // }) + // } + // }else { + // window.open("/api"+url, '_blank'); + // } + // }).catch((error) => { + // console.log(error) + // }); + // + // } setgameexercise=(url)=>{ @@ -169,18 +169,18 @@ class Testpapersettinghomepage extends Component{ Loadtype:false }) } - DownloadType=()=>{ - this.setState({ - DownloadType:false, - DownloadMessageval:undefined - }) - } - Downloadcal=()=>{ - this.setState({ - DownloadType:false, - DownloadMessageval:undefined - }) - } + // DownloadType=()=>{ + // this.setState({ + // DownloadType:false, + // DownloadMessageval:undefined + // }) + // } + // Downloadcal=()=>{ + // this.setState({ + // DownloadType:false, + // DownloadMessageval:undefined + // }) + // } render(){ let {tab,visible,Commonheadofthetestpaper}=this.state; const isAdmin =this.props.isAdmin(); @@ -188,12 +188,12 @@ class Testpapersettinghomepage extends Component{ return(
- + {/**/}
{/* 公用的提示弹框 */} {this.state.Modalstype===true? { + console.log("1160"); let homeworkid = this.props.match.params.homeworkid; let url = "/homework_commons/" + homeworkid + "/end_groups.json"; diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index a6663c600..2ee8bd7a8 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -18,9 +18,6 @@ import Workquestionandanswer from './Workquestionandanswer'; import CoursesListType from '../coursesPublic/CoursesListType'; import ShixunStudentWork from "./ShixunStudentWork"; import Startshixuntask from "../coursesPublic/Startshixuntask"; -import HomeworkModal from "../coursesPublic/HomeworkModal"; -import moment from 'moment'; - class ShixunHomeworkPage extends Component { constructor(props) { super(props); @@ -30,6 +27,8 @@ class ShixunHomeworkPage extends Component { teacherdata: undefined, code_review: false, view_report: false, + visible: false, + showmodel:false, } } @@ -76,190 +75,34 @@ class ShixunHomeworkPage extends Component { shixuntypes: types[3] }) } - //立即发布 - homeworkstart = () => { - debugger - let homeworkid = this.props.match.params.homeworkid; - let url = "/homework_commons/" + homeworkid + "/publish_groups.json"; - - - 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, - svisible: true, - Topval:"学生将立即收到作业", - // Botvalleft:"暂不发布", - Botval:`本操作只对"未发布"的分班有效`, - starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), - endtime: "截止时间:" + endtime, - starttimes:starttime, - typs:"start", - Cancelname: "暂不发布", - Savesname: "立即发布", - Cancel: this.homeworkhide, - Saves: this.homeworkstartend, - course_groups: response.data.course_groups, - }) - } - }).catch((error) => { - console.log(error) - }); + confirmysl(url) { + this.refs.DownloadMessage.confirmysl(url); } - - getcourse_groupslist = (id) => { - this.setState({ - course_groupslist: id - }) - + onRef = (ref) => { + console.log("84"); + console.log(ref); + this.child = ref } - - isupdatas = () => { - // var homeworkid = this.props.match.params.homeworkid; - // // this.Gettitleinformation(homeworkid); - // this.Getalistofworks(homeworkid); + homeworkendss(){ + this.child.homeworkends(); } - - homeworkhide = () => { - this.isupdatas() - this.setState({ - modalname: undefined, - modaltype: undefined, - svisible: false, - Topval: undefined, - Topvalright: undefined, - Botvalleft: undefined, - Botval: undefined, - starttime: undefined, - endtime: undefined, - Cancelname: undefined, - Savesname: undefined, - Cancel: undefined, - Saves: undefined, - StudentList_value: undefined, - addname: undefined, - addnametype: false, - addnametab: undefined, - course_groupyslstwo: undefined, - typs:undefined, - starttimes:undefined, - }) + homeworkstarts(){ + this.child.homeworkstart(); } -// 立即发布 - homeworkstartend = (ds,endtime) => { - var homeworkid = this.props.match.params.homeworkid; - let {course_groupslist} = this.state; - - let coursesId = this.props.match.params.coursesId; - let url = "/courses/" + coursesId + "/homework_commons/publish_homework.json"; - axios.post(url, { - homework_ids: [homeworkid], - group_ids: course_groupslist, - end_time:endtime, - }).then((result) => { - if (result.status === 200) { - if (result.data.status === 0) { - notification.open({ - message: "提示", - description: result.data.message - }); - this.homeworkhide() - } - - } - }).catch((error) => { - console.log(error); - }) + workshowmodels(){ + this.child.workshowmodel(); } - - //立即截止 - homeworkends = () => { - let homeworkid = this.props.match.params.homeworkid; - let url = "/homework_commons/" + homeworkid + "/end_groups.json"; - - axios.get(url).then((response) => { - - if (response.status === 200) { - this.setState({}) - this.setState({ - modalname: "立即截止", - modaltype: response.data.course_groups === null || response.data.course_groups.length === 0 ? 2 : 1, - svisible: true, - Topval:"学生将不能再提交作业", - // Botvalleft:"暂不截止", - Botval:`本操作只对"提交中"的分班有效`, - Cancelname: "暂不截止", - Savesname: "立即截止", - Cancel: this.homeworkhide, - Saves: this.coursetaskend, - starttime: undefined, - endtime: undefined, - course_groups: response.data.course_groups, - typs:"end", - }) - } - }).catch((error) => { - console.log(error) - }); - } - - //立即截止确定按钮 - coursetaskend = () => { - var homeworkid = this.props.match.params.homeworkid; - let {course_groupslist} = this.state; - - - const cid = this.props.match.params.coursesId; - let url = "/courses/" + cid + "/homework_commons/end_homework.json"; - axios.post(url, { - group_ids: course_groupslist, - homework_ids: [homeworkid], - }) - .then((response) => { - if (response.data.status == 0) { - notification.open({ - message: "提示", - description: response.data.message - }); - this.homeworkhide() - } - }) - .catch(function (error) { - console.log(error); - }); - } +///////////////教师截止 render() { - let {tab, jobsettingsdata, teacherdata} = this.state; + let {tab, teacherdata, jobsettingsdata} = this.state; + const isAdmin = this.props.isAdmin(); return (
- {/*立即发布*/} - this.getcourse_groupslist(id)} - starttimes={this.state.starttimes} - typs={this.state.typs} - />
@@ -358,17 +201,17 @@ class ShixunHomeworkPage extends Component { : ""} {this.props.isAdmin() ? teacherdata && teacherdata.end_immediately === true ? - 立即截止 + 立即截止 : "" : ""} {this.props.isAdmin() ? teacherdata && teacherdata.publish_immediately === true ? - 立即发布 + 立即发布 : "" : ""} {this.props.isAdmin() ? teacherdata && teacherdata.code_review === true ? - 代码查重 + 代码查重 : "" : ""} {this.state.view_report === true ? @@ -392,21 +235,21 @@ class ShixunHomeworkPage extends Component { { // 教师列表 parseInt(tab) === 0 ? (isAdmin === true ? - this.Getdataback(jobsettingsdata, teacherdata)}> : - this.Getdataback(jobsettingsdata, teacherdata)}>) : parseInt(tab) === 1 ? - this.Getdataback(jobsettingsdata, teacherdata)}> : parseInt(tab) === 2 ? - this.Getdataback(jobsettingsdata, teacherdata)}> : - this.Getdataback(jobsettingsdata, teacherdata)}> }
From 3deae54e9ac8dc8ea259a2f5f64be99d2d15279b 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, 17 Jul 2019 10:12:19 +0800 Subject: [PATCH 2/8] =?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/courses/poll/PollNew.js | 6 +++--- .../courses/shixunHomework/Listofworks.js | 1 - .../shixunHomework/ShixunHomeworkPage.js | 20 +++++++++++-------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index de0a5bbeb..e6dc94515 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -656,7 +656,7 @@ class PollNew extends Component { "question_title": "", "question_type": 1, "new": "new", - "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, + "newid":Whether=== true? id :ids+ 1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -691,7 +691,7 @@ class PollNew extends Component { "max_choices": 0, "min_choices": 0, "new": "new", - "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, + "newid":Whether=== true? id :ids+1, "answers": [ {"answer_id": 1, "answer_position": 1, "answer_text": ""}, {"answer_id": 2, "answer_position": 2, "answer_text": ""}, @@ -724,7 +724,7 @@ class PollNew extends Component { "question_title": "", "question_type": 3, "new": "new", - "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1, + "newid":Whether=== true? id :ids + 1, "answers": [] }; question = {"question": questiontwo}; diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 1e01b5d6d..584798247 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -597,7 +597,6 @@ class Listofworks extends Component { componentDidMount() { console.log("Listofworks"); console.log("componentDidMount"); - this.props.onRef(this) var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) // this.Gettitleinformation(homeworkid); diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 2ee8bd7a8..4cd0572a8 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -18,9 +18,12 @@ import Workquestionandanswer from './Workquestionandanswer'; import CoursesListType from '../coursesPublic/CoursesListType'; import ShixunStudentWork from "./ShixunStudentWork"; import Startshixuntask from "../coursesPublic/Startshixuntask"; +import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; class ShixunHomeworkPage extends Component { constructor(props) { super(props); + this.contentMdRef = React.createRef(); + // this.answerMdRef = React.createRef(); this.state = { tab: ["0"], jobsettingsdata: undefined, @@ -84,15 +87,16 @@ class ShixunHomeworkPage extends Component { console.log("84"); console.log(ref); this.child = ref + } homeworkendss(){ - this.child.homeworkends(); + this.contentMdRef.current.homeworkends(); } homeworkstarts(){ - this.child.homeworkstart(); + this.contentMdRef.current.homeworkstart(); } workshowmodels(){ - this.child.workshowmodel(); + this.contentMdRef.current.workshowmodel(); } ///////////////教师截止 @@ -235,21 +239,21 @@ class ShixunHomeworkPage extends Component { { // 教师列表 parseInt(tab) === 0 ? (isAdmin === true ? - this.Getdataback(jobsettingsdata, teacherdata)}> : - { this.child = ref}} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}>) : parseInt(tab) === 1 ? - { this.child = ref}} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> : parseInt(tab) === 2 ? - { this.child = ref}} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> : - { this.child = ref}} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}> }
From 2b3b1ac0adb4dae67ed7b0cca89f9a5379398f02 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, 17 Jul 2019 11:20:47 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 1 + .../shixunHomework/ShixunHomeworkPage.js | 25 ++++++++++++++----- .../src/modules/user/FindPasswordComponent.js | 5 +++- .../modules/user/LoginRegisterComponent.js | 5 ++++ 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 584798247..de4679256 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -597,6 +597,7 @@ class Listofworks extends Component { componentDidMount() { console.log("Listofworks"); console.log("componentDidMount"); + this.props.onRef(this); var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) // this.Gettitleinformation(homeworkid); diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 4cd0572a8..242e99db1 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -32,6 +32,7 @@ class ShixunHomeworkPage extends Component { view_report: false, visible: false, showmodel:false, + child:undefined, } } @@ -83,20 +84,32 @@ class ShixunHomeworkPage extends Component { confirmysl(url) { this.refs.DownloadMessage.confirmysl(url); } + onRef = (ref) => { console.log("84"); console.log(ref); - this.child = ref - + this.state.child= ref } + homeworkendss(){ - this.contentMdRef.current.homeworkends(); + // console.log(this.contentMdRef.current); + // // console.log(this.refs.childModel); + // console.log(this.state.child); + + // .homeworkends(); } homeworkstarts(){ - this.contentMdRef.current.homeworkstart(); + // console.log(this.contentMdRef.current); + // console.log(this.state.child); + + // .homeworkstart(); } workshowmodels(){ - this.contentMdRef.current.workshowmodel(); + // console.log(this.contentMdRef.current) + // console.log(this.state.child); + + + // .workshowmodel(); } ///////////////教师截止 @@ -239,7 +252,7 @@ class ShixunHomeworkPage extends Component { { // 教师列表 parseInt(tab) === 0 ? (isAdmin === true ? - this.Getdataback(jobsettingsdata, teacherdata)}> : { this.child = ref}} diff --git a/public/react/src/modules/user/FindPasswordComponent.js b/public/react/src/modules/user/FindPasswordComponent.js index 9609801b8..0526b0cb5 100644 --- a/public/react/src/modules/user/FindPasswordComponent.js +++ b/public/react/src/modules/user/FindPasswordComponent.js @@ -69,7 +69,7 @@ class LoginRegisterComponent extends Component { //这是判断是否手机正确 if(this.state.Phonenumberisnotcobool === true){ - this.openNotification(this.state.Phonenumberisnotcos); + this.openNotification(this.state.Phonenumberisnotco); this.setState({ Whethertoverify:this.state.Whethertoverify===true?false:true, }) @@ -211,6 +211,9 @@ class LoginRegisterComponent extends Component { } this.setState({ login: stirngt, + Phonenumberisnotco:undefined, + dragOk:false, + Whethertoverify:this.state.Whethertoverify===true?false:true, }) } loginInputonChanges = (e) => { diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index d895297fc..da5cb0889 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -497,10 +497,15 @@ class LoginRegisterComponent extends Component { Phonenumberisnotcos: undefined, Phonenumberisnotcobool: false, logins: stirngt, + dragOk:false, + Whethertoverify:this.state.Whethertoverify===true?false:true, }) }else{ this.setState({ logins: stirngt, + Phonenumberisnotcos: undefined, + dragOk:false, + Whethertoverify:this.state.Whethertoverify===true?false:true, }) } From b6d4d824c514cfc9bfaa698aeef83b0d86d3693d 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, 17 Jul 2019 13:58:41 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/Listofworks.js | 2 +- .../shixunHomework/Listofworksstudentone.js | 1 + .../shixunHomework/ShixunHomeworkPage.js | 45 +++++++++++-------- .../shixunHomework/ShixunStudentWork.js | 1 + .../shixunHomework/Trainingjobsetting.js | 1 + .../shixunHomework/Workquestionandanswer.js | 1 + 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index de4679256..1a721f8b3 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -597,7 +597,7 @@ class Listofworks extends Component { componentDidMount() { console.log("Listofworks"); console.log("componentDidMount"); - this.props.onRef(this); + this.props.triggerRef(this) var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) // this.Gettitleinformation(homeworkid); diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 8192e6a17..6d2f5c9c9 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -317,6 +317,7 @@ class Listofworksstudentone extends Component { componentDidMount() { console.log("Listofworksstudentone"); console.log("componentDidMount"); + this.props.triggerRef(this); var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); let query = this.props.location.pathname; diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 242e99db1..baf1d6232 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -81,8 +81,8 @@ class ShixunHomeworkPage extends Component { } - confirmysl(url) { - this.refs.DownloadMessage.confirmysl(url); + confirmysl(child,url) { + child.confirmysl(url); } onRef = (ref) => { @@ -91,33 +91,40 @@ class ShixunHomeworkPage extends Component { this.state.child= ref } - homeworkendss(){ - // console.log(this.contentMdRef.current); + homeworkendss(child){ + // console.log(child); // // console.log(this.refs.childModel); - // console.log(this.state.child); - - // .homeworkends(); + // console.log(child); + child.homeworkends(); + // } - homeworkstarts(){ + homeworkstarts(child){ // console.log(this.contentMdRef.current); // console.log(this.state.child); + child.homeworkstart(); + // .homeworkstart(); } - workshowmodels(){ + workshowmodels(child){ // console.log(this.contentMdRef.current) // console.log(this.state.child); + // console.log(this.child); + child.workshowmodel(); // .workshowmodel(); } + bindRef = ref => { this.child = ref } ///////////////教师截止 render() { let {tab, teacherdata, jobsettingsdata} = this.state; const isAdmin = this.props.isAdmin(); + // console.log("126"); + // console.log(this.child);/ return (
@@ -208,27 +215,27 @@ class ShixunHomeworkPage extends Component { 导出 : ""} {this.props.isAdmin() ? teacherdata && teacherdata.end_immediately === true ? - 立即截止 + this.homeworkendss(this.child)}>立即截止 : "" : ""} {this.props.isAdmin() ? teacherdata && teacherdata.publish_immediately === true ? - 立即发布 + this.homeworkstarts(this.child)}>立即发布 : "" : ""} {this.props.isAdmin() ? teacherdata && teacherdata.code_review === true ? - 代码查重 + this.workshowmodels(this.child)}>代码查重 : "" : ""} {this.state.view_report === true ? @@ -252,21 +259,21 @@ class ShixunHomeworkPage extends Component { { // 教师列表 parseInt(tab) === 0 ? (isAdmin === true ? - this.Getdataback(jobsettingsdata, teacherdata)}> : - { this.child = ref}} + this.Getdataback(jobsettingsdata, teacherdata)}>) : parseInt(tab) === 1 ? - { this.child = ref}} + this.Getdataback(jobsettingsdata, teacherdata)}> : parseInt(tab) === 2 ? - { this.child = ref}} + this.Getdataback(jobsettingsdata, teacherdata)}> : - { this.child = ref}} + 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 17e51258f..37ea4d1c3 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -76,6 +76,7 @@ class ShixunStudentWork extends Component { componentDidMount() { console.log("ShixunStudentWork"); console.log("componentDidMount"); + this.props.triggerRef(this); this.getupdata(); this.getTrainingjobsetting(); } diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index ae1058d8a..411855491 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -128,6 +128,7 @@ class Trainingjobsetting extends Component { componentDidMount() { console.log("Trainingjobsetting"); console.log("componentDidMount"); + this.props.triggerRef(this); this.getTrainingjobsetting(); let query = this.props.location.pathname; const type = query.split('/'); diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 52a214b7e..39a963023 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -84,6 +84,7 @@ 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) From 161c28ea893ebcf4f428e58cb7176a4fe666ec70 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, 17 Jul 2019 14:00:21 +0800 Subject: [PATCH 5/8] =?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/ShixunHomeworkPage.js | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index baf1d6232..1db93c2bd 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -22,7 +22,6 @@ import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; class ShixunHomeworkPage extends Component { constructor(props) { super(props); - this.contentMdRef = React.createRef(); // this.answerMdRef = React.createRef(); this.state = { tab: ["0"], @@ -85,35 +84,16 @@ class ShixunHomeworkPage extends Component { child.confirmysl(url); } - onRef = (ref) => { - console.log("84"); - console.log(ref); - this.state.child= ref - } - homeworkendss(child){ - // console.log(child); - // // console.log(this.refs.childModel); - // console.log(child); child.homeworkends(); - // } + homeworkstarts(child){ - // console.log(this.contentMdRef.current); - // console.log(this.state.child); child.homeworkstart(); - - // .homeworkstart(); } workshowmodels(child){ - // console.log(this.contentMdRef.current) - // console.log(this.state.child); - // console.log(this.child); child.workshowmodel(); - - - // .workshowmodel(); } bindRef = ref => { this.child = ref } @@ -123,8 +103,6 @@ class ShixunHomeworkPage extends Component { let {tab, teacherdata, jobsettingsdata} = this.state; const isAdmin = this.props.isAdmin(); - // console.log("126"); - // console.log(this.child);/ return (
From 8a76d8a81aec2385d881b53c4a5a5a05a3befb91 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, 17 Jul 2019 14:34:49 +0800 Subject: [PATCH 6/8] =?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/login/EducoderLogin.js | 1 - .../modules/user/LoginRegisterComponent.js | 38 ++++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/public/react/src/modules/login/EducoderLogin.js b/public/react/src/modules/login/EducoderLogin.js index 124c047ff..8e8bfd112 100644 --- a/public/react/src/modules/login/EducoderLogin.js +++ b/public/react/src/modules/login/EducoderLogin.js @@ -25,7 +25,6 @@ import '../courses/css/Courses.css'; import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png'; import educodernet from '../../../src/images/login/educodernet.png'; import LoginRegisterComponent from '../user/LoginRegisterComponent'; -import InterestpageComponent from '../user/Interestpage' import FindPasswordComponent from '../user/FindPasswordComponent'; import passopen from "../../images/login/passopen.png"; //educoder登入页面 diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index da5cb0889..943ac341e 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -36,12 +36,12 @@ class LoginRegisterComponent extends Component { activeKey: 0, classpass: "text", // 登录 - passopens: passopen, + passopens: passoff, seconds: 35, discodeBtn: false, clearInterval: false, autoLogin: true, - classpassbool: true, + classpassbool: false, // 注册 readAgreement: false, getverificationcodes: true, @@ -66,12 +66,12 @@ class LoginRegisterComponent extends Component { activeKey: '1', classpass: "text", // 登录 - passopens: passopen, + passopens: passoff, seconds: 35, discodeBtn: false, clearInterval: false, autoLogin: true, - classpassbool: true, + classpassbool: false, // 注册 readAgreement: false, getverificationcodes: true, @@ -252,20 +252,21 @@ class LoginRegisterComponent extends Component { code: this.state.codes, }).then((result) => { console.log(result); - try { - // this.onTabChange("1"); - this.setState({ - logins: "", - dragOk: false, - codes: "", - passwords: "", - Agreetotheterms: "", - }) - this.props.history.push("/interesse"); - // this.props.Setshowbool(2,this.state.logins,this.state.passwords); - } catch (e) { + if(result){ + try { + this.setState({ + logins: "", + dragOk: false, + codes: "", + passwords: "", + Agreetotheterms: "", + }) + } catch (e) { + } + }else{ } + }).catch((error) => { }) @@ -572,6 +573,7 @@ class LoginRegisterComponent extends Component { tab, dragOk, Whethertoverify, + classpassbool, // 注册 readAgreement, } = this.state @@ -580,7 +582,7 @@ class LoginRegisterComponent extends Component { // window.location.href='http://www.cnblogs.com/a-cat/'; } - // console.log(activeKey); + console.log(classpass); return (
@@ -764,7 +766,7 @@ class LoginRegisterComponent extends Component { } Date: Wed, 17 Jul 2019 14:35:42 +0800 Subject: [PATCH 7/8] =?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/user/LoginRegisterComponent.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 943ac341e..551db6a4b 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -253,7 +253,6 @@ class LoginRegisterComponent extends Component { }).then((result) => { console.log(result); if(result){ - try { this.setState({ logins: "", dragOk: false, @@ -261,12 +260,8 @@ class LoginRegisterComponent extends Component { passwords: "", Agreetotheterms: "", }) - } catch (e) { - - } - }else{ - } - + this.props.history.push("/interesse"); + } }).catch((error) => { }) From 37fc149a4df3be12d19b79ec9b6a8df5a75f2daa 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, 17 Jul 2019 15:20:55 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Studentshavecompletedthelist.js | 2 +- public/react/src/modules/user/LoginRegisterComponent.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 20a307ac6..5cd59f704 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -2675,7 +2675,7 @@ class Studentshavecompletedthelist extends Component { {data === undefined ? "" : { - console.log(result); if(result){ this.setState({ logins: "", @@ -356,13 +355,13 @@ class LoginRegisterComponent extends Component { console.log("显示于隐藏"); if (this.state.classpassbool === true) { this.setState({ - passopens: passoff, + passopens: passopen, classpass: "text", classpassbool: false, }) } else { this.setState({ - passopens: passopen, + passopens: passoff , classpass: "password", classpassbool: true, })