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] =?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 (