From 1cec2db4541f9fd3f6d5375a7b5a70413c20045d 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, 25 Sep 2019 17:12:08 +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 --- .../exercise/Studentshavecompletedthelist.js | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 6fdde6aeb..57f574ac4 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1278,20 +1278,6 @@ class Studentshavecompletedthelist extends Component { }catch (e) { } - try { - if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){ - this.setState({ - exercise_status:this.props.Commonheadofthetestpaper.exercise_status, - }) - }else{ - this.setState({ - exercise_status:0, - }) - } - }catch (e) { - - } - } componentWillReceiveProps = (nextProps) => { @@ -1330,7 +1316,7 @@ class Studentshavecompletedthelist extends Component { }) if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) { // 学生未截止 - + // console.log("试卷学生未截止"); this.Generatenewdatas(response.data.exercise_users); if (response.data.exercise_types.subjective === 0) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { @@ -1377,6 +1363,7 @@ class Studentshavecompletedthelist extends Component { } } else { //学生已截止 + // console.log("试卷学生已截止"); if (response.data.exercise_types.subjective === 0) { if (this.state.loadingstate === false) { var arr =[]; @@ -1458,7 +1445,7 @@ class Studentshavecompletedthelist extends Component { else if (response.data.exercise_types.user_permission === 0) { // console.log(response.data.exercise_users) // console.log(response) - + // console.log("试卷老师加载中"); if (thiss.state.loadingstate === false) { thiss.setState({ loadingstate: true, @@ -1469,7 +1456,9 @@ class Studentshavecompletedthelist extends Component { thiss.Generatenewdatasy(response.data.exercise_users, response); } }).catch((error) => { - console.log(error) + console.log(error); + console.log("其实数据加载失败了"); + console.log("1111"); }); @@ -2490,16 +2479,22 @@ class Studentshavecompletedthelist extends Component { let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; // console.log("Studentshavecompletedthelist"); // console.log(this.props.current_status); + // console.log("获取到的数据"); + // console.log(datas); + // console.log(data); + // console.log("this.props.Commonheadofthetestpaper.exercise_status"); + // console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status); + // console.log(exercise_status); return ( isAdmin === true ? (