From 5df41988fd9548af7df807a9fa8405389e5c288e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 18 Jul 2019 18:02:42 +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 --- .../shixunHomework/Listofworksstudentone.js | 459 +++++++++--------- 1 file changed, 232 insertions(+), 227 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index a832c5f7e..1ba8c85b7 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -911,8 +911,8 @@ class Listofworksstudentone extends Component { } } student=()=>{ - console.log("914"); - debugger + // console.log("914"); + // debugger this.props.triggerRef(this); var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); @@ -932,8 +932,8 @@ class Listofworksstudentone extends Component { // 获取作品列表 Getalistofworks = (homeworkid) => { // console.log("获取作品列表"); - console.log("935"); - debugger + // console.log("935"); + // debugger let urll = `/homework_commons/${homeworkid}/works_list.json`; var data = { search: "", @@ -948,9 +948,9 @@ class Listofworksstudentone extends Component { if(result === undefined){ return } - console.log("951"); - console.log(result); - debugger + // console.log("951"); + // console.log(result); + // debugger if (result.status === 200) { this.setState({ teacherdata: result.data, @@ -1109,11 +1109,11 @@ class Listofworksstudentone extends Component { }) // } - var teacherlist = { //分页 - total: teacherdata.student_works.length, //数据总数量 - pageSize: teacherdata.student_works.length, //一页显示几条 - current: this.state.page, - } + // var teacherlist = { //分页 + // total: teacherdata.student_works.length, //数据总数量 + // pageSize: teacherdata.student_works.length, //一页显示几条 + // current: this.state.page, + // } styletable = {"display": "block",} } else { // console.log("seacthdata设置数据2") @@ -1231,11 +1231,11 @@ class Listofworksstudentone extends Component { }) // } - var teacherlist = { //分页 - total: teacherdata.student_works.length, //数据总数量 - pageSize: teacherdata.student_works.length, //一页显示几条 - current: this.state.page, - } + // var teacherlist = { //分页 + // total: teacherdata.student_works.length, //数据总数量 + // pageSize: teacherdata.student_works.length, //一页显示几条 + // current: this.state.page, + // } } else { // console.log("seacthdata设置数据2") var teacherlist = undefined; @@ -1404,11 +1404,11 @@ class Listofworksstudentone extends Component { TablePagination = (e) => { // console.log(e.current); - var teacherlists = { //分页 - total: this.state.student_works.length, //数据总数量 - pageSize: 10, //一页显示几条 - current: e.current, - } + // var teacherlists = { //分页 + // total: this.state.student_works.length, //数据总数量 + // pageSize: 10, //一页显示几条 + // current: e.current, + // } this.setState({ page: e.current, teacherlists: teacherlists @@ -1468,7 +1468,7 @@ class Listofworksstudentone extends Component { // 获取作品列表 Getalistofworkst = (homeworkid) => { // console.log("获取作品列表");7009 - debugger + // debugger let urll = `/homework_commons/${homeworkid}/works_list.json`; // console.log(homeworkid); @@ -1488,7 +1488,7 @@ class Listofworksstudentone extends Component { limit:20, } axios.post(urll, data).then((result) => { - debugger + // debugger if (result !== undefined) { // console.log(url) // console.log("作品列表6789077") @@ -1583,7 +1583,7 @@ class Listofworksstudentone extends Component { // 设置数据 seacthdatat = (teacherdata,student_works,work_efficiency,course_group_info) => { - debugger + // debugger let {page, limit} = this.state; let datalist = []; let columns = this.state.columns; @@ -1615,11 +1615,11 @@ class Listofworksstudentone extends Component { } - var teacherlist = { //分页 - total: student_works.length, //数据总数量 - pageSize: 20, //一页显示几条 - current: page, - } + // var teacherlist = { //分页 + // total: student_works.length, //数据总数量 + // pageSize: 20, //一页显示几条 + // current: page, + // } if (work_efficiency === false) { if(JSON.stringify(course_group_info) === "[]"|| course_group_info === undefined||course_group_info === null){ //这里没有分班 没有 关卡得分 没有效率分 @@ -2198,9 +2198,12 @@ class Listofworksstudentone extends Component { // console.log(this.state.data); // console.log("841"); // console.log(this.state.columns); + // console.log(data); + // console.log("2202"); + // console.log(this.props.isAdmin()); + return ( - this.props.isAdmin === true ? - ( + this.props.isAdmin() === true ?
{visible === true ? { teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
+
@@ -2498,13 +2501,14 @@ class Listofworksstudentone extends Component {
- ) :( - - teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ? - // 学生不能查看别人的 -
- - {visibles === true ? -
- - + {visibles === true ? +
+ + + this.cancelModulationModels()} + /> +
+ : "" } - - this.cancelModulationModels()} - /> -
- : "" - } -
-
+
+
- {computeTimetype===false?
  • + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} + :""} - {JSON.stringify(data) !== "[]" ? -
    -
    + {JSON.stringify(data) !== "[]" ? +
    +
    -
    +
    {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}已交{teacherdata === undefined ? "" : teacherdata.uncommit_count}未交 {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata.left_time.status} @@ -2613,16 +2617,16 @@ class Listofworksstudentone extends Component { } -
    +
    - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false? -
    - 计算成绩 -
    - :"") +
    + 计算成绩 +
    + :"") : (teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": this.props.isNotMember()===false? @@ -2633,100 +2637,100 @@ class Listofworksstudentone extends Component { }
    } -
    +
    -
    +
    -
    -
    - -
    - {data === undefined ? "222222" : } - - - +
    + {data === undefined ? "222222" :
    } + + + + + : +
    +
    +
    + +

    没有数据可以显示!

    +
    +
    + +
    + } - : -
    -
    -
    - -

    没有数据可以显示!

    -
    - } - - - + + : + // 学生能查看别人的 +
    + -
    - : - // 学生能查看别人的 -
    - - - {visibles === true ? - this.cancelModulationModels()} - /> : "" - } -
    + {visibles === true ? + this.cancelModulationModels()} + /> : "" + } +
    -
    +
    - {computeTimetype===false?
  • + {computeTimetype===false?
  • 正在执行成绩计算,请稍后刷新页面查看结果 温馨提示:执行时间因作品数量而异 -
  • :""} - - -
    - {data === undefined ? "" :
    } - - {JSON.stringify(datas) !== "[]" ? -
    -
    -
    + :""} + + +
    + {data === undefined ? "" :
    } + + {JSON.stringify(datas) !== "[]" ? +
    +
    +
    {teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count} @@ -2739,8 +2743,8 @@ class Listofworksstudentone extends Component { style={{"color": '#FF6800'}}>{teacherdata.left_time.time}} - -
    + +
    - 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} - {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": + 计算成绩时间:{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')} + {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"": {computeTimetype===true? (this.props.isNotMember()===false?
    - 计算成绩 -
    :""): - teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": - (this.props.isNotMember()===false?
    - 计算成绩 -
    :"") + 计算成绩 +
    :""): + teacherdata&&teacherdata.homework_status[0]=== "未发布"? "": + (this.props.isNotMember()===false?
    + 计算成绩 +
    :"") } } -
    - {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} - {/*
    */} - {/*
      */} - {/*
    • */} +
    + {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} + {/*
    */} + {/**/} - {/**/} - {/**/} - {/*
    */} + {/*
    */} -
    +
    - + -
    - -
    - {datas === undefined ? "" :
    } - - { - teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? -
    - +
    + {datas === undefined ? "" :
    } + + { + teacherdata && teacherdata.work_count && teacherdata.work_count > limit ? +
    + +
    + : "" + } + + + : +
    +
    +
    + +

    没有数据可以显示!

    +
    - : "" - } -
    - - : -
    -
    -
    - -

    没有数据可以显示!

    -
    -
    -
    - } + + } - {/*///*/} + {/*///*/} - + - + + + } - ) ) }