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;