From 3abe1610be090ac85a54147e580e5b1bf125c7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 20 Sep 2019 10:28:19 +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 | 623 +++++++++--------- .../exercise/Testpapersettinghomepage.js | 2 +- 2 files changed, 329 insertions(+), 296 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 60065f43e..bcb8876df 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -22,7 +22,7 @@ import 'moment/locale/zh-cn'; import './yslexercisetable.css'; import {getImageUrl, toPath} from 'educoder'; import CheckBoxGroup from "../../page/component/CheckBoxGroup"; - +import NoneData from '../../../modules/courses/coursesPublic/NoneData' const Search = Input.Search; const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; @@ -1217,6 +1217,7 @@ class Studentshavecompletedthelist extends Component { ) }, ], + exercise_status:0, } // console.log("Studentshavecompletedthelist"); // console.log(props.current_status); @@ -1277,6 +1278,20 @@ 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) => { @@ -2065,11 +2080,11 @@ class Studentshavecompletedthelist extends Component { this.setState({ loadingstate: false, }) - console.log(response); - console.log(1997); + // console.log(response); + // console.log(1997); this.Generatenewdatasy(response.data.exercise_users, response); }).catch((error) => { - console.log(error) + // console.log(error) this.setState({ loadingstate: false, }) @@ -2472,7 +2487,7 @@ class Studentshavecompletedthelist extends Component { render() { const isAdmin = this.props.isAdmin(); - let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable, 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; + 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); return ( @@ -2483,202 +2498,209 @@ class Studentshavecompletedthelist extends Component { " min-width": " 1200px", }}> {/*老师*/} -
- -
-
+ +
+
- {JSON.stringify(data) !== "[]" ? -
- -
- {data === undefined ? "" : } - - +
+ {data === undefined ? "" :
} + + - : -
-
-
- -

暂时还没有相关数据哦!

-
-
+ : +
+
+
+ +

暂时还没有相关数据哦!

+
+
-
- } +
+ } - - { - Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ? -
- +
+ { + Teacherliststudentlist && Teacherliststudentlist.exercise_types.total_users && Teacherliststudentlist.exercise_types.total_users > limit ? +
+ +
+ : "" + } - : "" } @@ -2691,16 +2713,20 @@ class Studentshavecompletedthelist extends Component {
-
+ { + exercise_status === 0 || exercise_status === 1 ? + + : +
-
+
-
+
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}} -
+
-
+
- {JSON.stringify(datas) === "[]" ? -
-
-
- -

暂时还没有相关数据哦!

-
-
+ {JSON.stringify(datas) === "[]" ? +
+
+
+ +

暂时还没有相关数据哦!

+
+
-
- : -
- -
- {datas === undefined ? "" :
} - - - } - +
+ {datas === undefined ? "" :
} + + + } - + + } @@ -2766,10 +2792,15 @@ class Studentshavecompletedthelist extends Component { "padding-bottom": "100px", " min-width": " 1200px" }}> -
- -
- {data === undefined ? "" :
} - - {JSON.stringify(datas) === "[]" ? - -
-
-
- -

暂时还没有相关数据哦!

+ } + +
+ {data === undefined ? "" :
} - + {JSON.stringify(datas) === "[]" ? - - : -
- < div id="graduation_work_list" style={{ - padding: '0px 30px 10px 30px', - "margin-top": "20px", - "margin-bottom": "10px" - }}> - -
+
+
+
+ +

暂时还没有相关数据哦!

+
+
+ +
+ : +
+ < div id="graduation_work_list" style={{ + padding: '0px 30px 10px 30px', + "margin-top": "20px", + "margin-bottom": "10px" + }}> + + - -
-
- -
- {datas === undefined ? "" :
} - +
+ {datas === undefined ? "" :
} + - + - } - + } + - { - mylistansum && mylistansum > limit ? -
- + { + mylistansum && mylistansum > limit ? +
+ +
+ : "" + }
- : "" } diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 5775bd240..ba3cee3d3 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -436,7 +436,7 @@ class Testpapersettinghomepage extends Component{ /> { // 教师列表 - parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status}> + parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}> } {/*统计结果*/}