diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 0b3c1b338..4ddc71bd0 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -899,6 +899,7 @@ class Listofworksstudentone extends Component { ) }, ], + yslpros:false, } // console.log("902"); // console.log("902"); @@ -912,15 +913,26 @@ class Listofworksstudentone extends Component { } componentWillReceiveProps(nextProps) { - console.log("+++++++++913"); - console.log("+++++++++915"); - console.log("+++++++++916"); - console.log(nextProps); - console.log(this.props) + // 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"); + + console.log(this.props.isAdmin()); if(this.props.isAdmin() === true){ this.tearchar(); // console.log("909"); @@ -2217,6 +2229,9 @@ class Listofworksstudentone extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 60f84b0da..fc8fba188 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 { visible: false, showmodel:false, child:undefined, + yslpros:false, } } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index d4e1855ed..cf9374f08 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -81,6 +81,21 @@ 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(); + } + } + + } + + getTrainingjobsettings=()=>{ this.getupdata(); this.getTrainingjobsetting(); @@ -523,6 +538,9 @@ class ShixunStudentWork extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 16d5e2a04..3809940e2 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -141,6 +141,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() + + } + } + } // 获取数据地方 @@ -1744,6 +1758,9 @@ class Trainingjobsetting extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){ diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index a65346770..46f4835de 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -94,6 +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) + } + } + + } isupdatas = () => { var homeworkid = this.props.match.params.homeworkid; @@ -333,6 +348,9 @@ class Workquestionandanswer extends Component { confirmysl(url){ axios.get(url).then((response) => { + if(response === undefined){ + return + } if(response.data.status&&response.data.status===-1){ }else if(response.data.status&&response.data.status===-2){